From a70b5e44c20c115954634bce7287c63875ada576 Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 15 Nov 2004 15:26:13 +0000 Subject: Removed definition of deprecated routine IOUtil_PrepareFilename(). git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@218 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a --- src/CheckpointRecovery.c | 130 ---------------------------------------- src/ioutil_CheckpointRecovery.h | 7 --- 2 files changed, 137 deletions(-) diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c index c7589be..607504e 100644 --- a/src/CheckpointRecovery.c +++ b/src/CheckpointRecovery.c @@ -261,136 +261,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 diff --git a/src/ioutil_CheckpointRecovery.h b/src/ioutil_CheckpointRecovery.h index d5c27bf..7b48acf 100644 --- a/src/ioutil_CheckpointRecovery.h +++ b/src/ioutil_CheckpointRecovery.h @@ -38,13 +38,6 @@ char *IOUtil_AssembleFilename (const cGH *GH, int called_from, int file_ioproc, int file_unchunked); -/* IOUtil_PrepareFilename() is deprecated - don't use it anymore */ -void IOUtil_PrepareFilename (const cGH *GH, - const char *basefilename, - char *fname, - int called_from, - int ioproc, - int file_unchunked); /* register a new recovery method */ int IOUtil_RegisterRecover (const char *name, -- cgit v1.2.3