aboutsummaryrefslogtreecommitdiff
path: root/src/CheckpointRecovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/CheckpointRecovery.c')
-rw-r--r--src/CheckpointRecovery.c130
1 files changed, 0 insertions, 130 deletions
diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c
index c7589be..607504e 100644
--- a/src/CheckpointRecovery.c
+++ b/src/CheckpointRecovery.c
@@ -262,136 +262,6 @@ char *IOUtil_AssembleFilename (const cGH *GH,
/*@@
- @routine IOUtil_PrepareFilename
- @date Fri Aug 21 14:54:38 1998
- @author Gerd Lanfermann
- @desc
- This routine prepares the filenames for the checkpoint/recovery
- and filereader files, paying attention to the different types:
-
- * it returns the full filename (directory+filename)
-
- * it prepends "Ln_" level indicators to the filename
- and "low_"/"med_" for convergence levels > 1
-
- * for cp files it prepends the iteration number as "it_%d"
-
- * for chunked files it prepends the file number as "file_%d"
- @enddesc
- @calls
- @history
- @hdate Nov 4 1998 @hauthor Gabrielle Allen
- @hdesc A file_* in the name indicates it needs recombining
- @hdate Apr 14 1999 @hauthor Thomas Radke
- @hdesc Removed code for expanding "basedir" and "nameofparfile"
- @hdate May 06 1999 @hauthor Thomas Radke
- @hdesc Added parameter unchunked to be independent of
- current chunking mode for recovery
- @endhistory
-
- @var GH
- @vdesc pointer to CCTK grid hierarchy
- @vtype const cGH *
- @vio in
- @endvar
- @var basefilename
- @vdesc basefilename of the file(s) to recover from
- @vtype const char *
- @vio in
- @endvar
- @var fname
- @vdesc the resulting filename
- @vtype char *
- @vio out
- @endvar
- @var called_from
- @vdesc indicates the caller function:
- * either Filereader (FILEREADER_DATA)
- * or IOUtil_RecoverGH() (CP_RECOVER_DATA)
- @vtype int
- @vio in
- @endvar
- @var file_ioproc
- @vdesc the IO processor number (for chunked files)
- @vtype int
- @vio in
- @endvar
- @var file_unchunked
- @vdesc flag to indicate whether file mode is unchunked or not
- @vtype int
- @vio in
- @endvar
-@@*/
-void IOUtil_PrepareFilename (const cGH *GH,
- const char *basefilename,
- char *fname,
- int called_from,
- int file_ioproc,
- int file_unchunked)
-{
- DECLARE_CCTK_PARAMETERS
-
-
- CCTK_WARN (1, "IOUtil_PrepareFilename(): this routine is deprecated in "
- "beta15 and should not be used anymore. Please use "
- "IOUtil_AssembleFilename() instead.");
-
- /* get the right parameters */
- switch (called_from)
- {
- case CP_INITIAL_DATA:
- sprintf (fname, "%s/%s", checkpoint_dir, checkpoint_ID_file);
- break;
-
- case CP_EVOLUTION_DATA:
- sprintf (fname, "%s/%s", checkpoint_dir, checkpoint_file);
- break;
-
- case CP_RECOVER_DATA:
- case CP_RECOVER_PARAMETERS:
- case FILEREADER_DATA:
- sprintf (fname, "%s/%s", recover_dir, basefilename ? basefilename:recover_file);
- break;
-
- default:
- CCTK_VWarn (0, __LINE__, __FILE__, CCTK_THORNSTRING,
- "IOUtil_PrepareFilename: Unknown calling mode %d",
- called_from);
- break;
- }
-
-#if 0
- /* add refinement factor and convergence level (med/low) inbetween: */
- /* FIXME Gab ... asymmetric levfac */
- if (GH)
- {
- if (GH->cctk_levfac[0] > 1)
- {
- sprintf (fname, "%sL%d_", fname, GH->cctk_levfac[0]);
- }
- if (GH->cctk_convlevel > 0)
- {
- strcat (fname, GH->cctk_convlevel == 1 ? "med_" : "low_");
- }
- }
-#endif
-
- /* If checkpoint filename, merge in the iteration number
- and for chunked files also the file number */
- if (called_from == CP_INITIAL_DATA || called_from == CP_EVOLUTION_DATA)
- {
- sprintf (fname, "%s.it_%d", fname, (int) GH->cctk_iteration);
- }
-
- /* If not one unchunked file give a file number */
- if (! file_unchunked)
- {
- sprintf (fname, "%s.file_%d", fname, file_ioproc);
- }
-}
-
-
- /*@@
@routine IOUtil_RecoverFromFile
@date Jun 14 1999
@author Thomas Radke