aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a>2003-01-20 12:11:07 +0000
committertradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a>2003-01-20 12:11:07 +0000
commit80bbfb97dcc177c832081fb830293f2fa5337a8e (patch)
tree2671aa281a0f40d1bd1754de3836851fcafcb10a
parent9e4de2baa56d47db133817d4e208ad7569d544fd (diff)
Old I/O parameters are gone now. So we can get rid of internal routines
which checked whether an old I/O parameter was set, and then automatically set the value of its (new) counterpart. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@183 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a
-rw-r--r--schedule.ccl5
-rw-r--r--src/CheckpointRecovery.c22
-rw-r--r--src/Startup.c359
3 files changed, 1 insertions, 385 deletions
diff --git a/schedule.ccl b/schedule.ccl
index 037be57..9c4e95b 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -29,8 +29,3 @@ if (! CCTK_Equals (parfile_write, "no") && parfile_update_every)
LANG:C
} "Append steered parameters to parameter file"
}
-
-schedule IOUtil_FixRecoveryParameters at RECOVER_PARAMETERS
-{
- LANG:C
-} "Fix recovery parameter settings deprecated in beta13"
diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c
index 7f9fd78..3e96edb 100644
--- a/src/CheckpointRecovery.c
+++ b/src/CheckpointRecovery.c
@@ -543,21 +543,9 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH,
struct dirent *file;
filelist_t *filelist, *tmp;
#endif
- static int first_time_called = 1;
-
-
- /* FIXME: this can go in BETA12 */
- if (first_time_called)
- {
- extern int IOUtil_FixRecoveryParameters (void);
- IOUtil_FixRecoveryParameters ();
- first_time_called = 0;
- }
-{
- /* need to move this after IOUtil_FixRecoveryParameters() so that the new
- parameter settings are taken */
DECLARE_CCTK_PARAMETERS
+
if (CCTK_Equals (recover, "auto") || CCTK_Equals (recover, "autoprobe"))
{
#ifdef HAVE_DIRENT_H
@@ -702,14 +690,6 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH,
IOUtil_RecoverGH() */
checkpoint_file_exists = retval > 0;
- /* FIXME: this can go in BETA12 */
- if (retval > 0)
- {
- extern int IOUtil_FixParameters (void);
- IOUtil_FixParameters ();
- }
-}
-
return (retval);
}
diff --git a/src/Startup.c b/src/Startup.c
index 3e29dcc..2dc7d1c 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -40,8 +40,6 @@ CCTK_FILEVERSION(CactusBase_IOUtil_Startup_c)
********************************************************************/
void IOUtil_Startup (void);
int IOUtil_UpdateParFile (const cGH *GH);
-int IOUtil_FixParameters (void);
-int IOUtil_FixRecoveryParameters (void);
/********************************************************************
@@ -141,363 +139,6 @@ int IOUtil_UpdateParFile (const cGH *GH)
}
-int IOUtil_FixRecoveryParameters (void)
-{
- static int already_called = 0;
- DECLARE_CCTK_PARAMETERS
-
-
- if (! already_called)
- {
- if (CCTK_ParameterQueryTimesSet ("recovery_dir", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("recover_dir", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::recovery_dir' is deprecated in BETA12, please use "
- "'IO::recover_dir' instead");
- CCTK_ParameterSet ("recover_dir", CCTK_THORNSTRING, recovery_dir);
- }
-
- /* call IOUtil_FixParameters() now if no recovery was requested */
- if (CCTK_Equals (recover, "no") || *recover_file == 0 ||
- ! (CCTK_IsThornActive ("IOHDF5") || CCTK_IsThornActive ("IOFlexIO")))
- {
- IOUtil_FixParameters ();
- }
-
- already_called = 1;
- }
-
- return (0);
-}
-
-
-int IOUtil_FixParameters (void)
-{
- char buffer[20];
- DECLARE_CCTK_PARAMETERS
-
-
- if (CCTK_ParameterQueryTimesSet ("outdir", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("out_dir", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::outdir' is deprecated in BETA12, please use "
- "'IO::out_dir' instead");
- CCTK_ParameterSet ("out_dir", CCTK_THORNSTRING, outdir);
- }
- if (CCTK_ParameterQueryTimesSet ("out3D_mode", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("out_mode", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::out3D_mode' is deprecated in BETA12, please use "
- "'IO::out_mode' instead");
- CCTK_ParameterSet ("out_mode", CCTK_THORNSTRING, out3D_mode);
- }
- if (CCTK_ParameterQueryTimesSet ("out3D_unchunked", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("out_unchunked", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::out3D_unchunked' is deprecated in BETA12, please use "
- "'IO::out_unchunked' instead");
- CCTK_ParameterSet ("out_unchunked", CCTK_THORNSTRING, out3D_unchunked ? "yes" : "no");
- }
- if (CCTK_ParameterQueryTimesSet ("out3D_downsample_x", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("out_downsample_x", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::out3D_downsample_x' is deprecated in BETA12, please use "
- "'IO::out_downsample_x' instead");
- sprintf (buffer, "%d", out3D_downsample_x);
- CCTK_ParameterSet ("out_downsample_x", CCTK_THORNSTRING, buffer);
- }
- if (CCTK_ParameterQueryTimesSet ("out3D_downsample_y", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("out_downsample_y", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::out3D_downsample_y' is deprecated in BETA12, please use "
- "'IO::out_downsample_y' instead");
- sprintf (buffer, "%d", out3D_downsample_y);
- CCTK_ParameterSet ("out_downsample_y", CCTK_THORNSTRING, buffer);
- }
- if (CCTK_ParameterQueryTimesSet ("out3D_downsample_z", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("out_downsample_z", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::out3D_downsample_z' is deprecated in BETA12, please use "
- "'IO::out_downsample_z' instead");
- sprintf (buffer, "%d", out3D_downsample_z);
- CCTK_ParameterSet ("out_downsample_z", CCTK_THORNSTRING, buffer);
- }
- if (CCTK_ParameterQueryTimesSet ("out3D_single", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("out_single_precision", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::out3D_single' is deprecated in BETA12, please use "
- "'IO::out_single_precision' instead");
- CCTK_ParameterSet ("out_single_precision", CCTK_THORNSTRING, out3D_single ? "yes" : "no");
- }
- if (CCTK_ParameterQueryTimesSet ("out3D_parameters", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("out_save_parameters", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::out3D_parameters' is deprecated in BETA12, please use "
- "'IO::out_save_parameters' instead");
- CCTK_ParameterSet ("out_save_parameters", CCTK_THORNSTRING, out3D_parameters);
- }
- if (CCTK_ParameterQueryTimesSet ("out3D_procs", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("out_proc_every", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::out3D_procs' is deprecated in BETA12, please use "
- "'IO::out_proc_every' instead");
- sprintf (buffer, "%d", out3D_procs);
- CCTK_ParameterSet ("out_proc_every", CCTK_THORNSTRING, buffer);
- }
- if (CCTK_ParameterQueryTimesSet ("out3D_septimefiles", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("out_timesteps_per_file", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::out3D_septimefiles' is deprecated in BETA12, please use "
- "'IO::out_timesteps_per_file' instead");
- CCTK_ParameterSet ("out_timesteps_per_file", CCTK_THORNSTRING, out3D_septimefiles ? "1" : "-1");
- }
- if (CCTK_ParameterQueryTimesSet ("recover_ID_files", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("filereader_ID_files", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::recover_ID_files' is deprecated in BETA12, please use "
- "'IO::filereader_ID_files' instead");
- CCTK_ParameterSet ("filereader_ID_files", CCTK_THORNSTRING, recover_ID_files);
- }
- if (CCTK_ParameterQueryTimesSet ("recover_ID_vars", CCTK_THORNSTRING) >
- CCTK_ParameterQueryTimesSet ("filereader_ID_vars", CCTK_THORNSTRING))
- {
- CCTK_WARN (1, "Parameter 'IO::recover_ID_vars' is deprecated in BETA12, please use "
- "'IO::filereader_ID_vars' instead");
- CCTK_ParameterSet ("filereader_ID_vars", CCTK_THORNSTRING, recover_ID_vars);
- }
-
- if (CCTK_Equals (verbose, "yes") || CCTK_Equals (verbose, "no"))
- {
- CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "Setting '%s' for parameter 'IO::verbose' is deprecated in "
- "BETA12, please use 'none|standard|full' instead", verbose);
- if (CCTK_Equals (verbose, "yes"))
- {
- CCTK_ParameterSet ("verbose", CCTK_THORNSTRING, "standard");
- }
- else
- {
- CCTK_ParameterSet ("verbose", CCTK_THORNSTRING, "none");
- }
- }
-
- /* parameters of IOASCII */
- if (CCTK_IsThornActive ("IOASCII"))
- {
- if (CCTK_ParameterQueryTimesSet ("outdir1D", "IOASCII") >
- CCTK_ParameterQueryTimesSet ("out1D_dir", "IOASCII"))
- {
- CCTK_WARN (1, "Parameter 'IOASCII::outdir1D' is deprecated in BETA12, "
- "please use 'IOASCII::out1D_dir' instead");
- CCTK_ParameterSet ("out1D_dir", "IOASCII",
- *(const char **) CCTK_ParameterGet ("outdir1D", "IOASCII", NULL));
- }
- if (CCTK_ParameterQueryTimesSet ("outdir2D", "IOASCII") >
- CCTK_ParameterQueryTimesSet ("out2D_dir", "IOASCII"))
- {
- CCTK_WARN (1, "Parameter 'IOASCII::outdir2D' is deprecated in BETA12, "
- "please use 'IOASCII::out2D_dir' instead");
- CCTK_ParameterSet ("out2D_dir", "IOASCII",
- *(const char **) CCTK_ParameterGet ("outdir2D", "IOASCII", NULL));
- }
- if (CCTK_ParameterQueryTimesSet ("outdir3D", "IOASCII") >
- CCTK_ParameterQueryTimesSet ("out3D_dir", "IOASCII"))
- {
- CCTK_WARN (1, "Parameter 'IOASCII::outdir3D' is deprecated in BETA12, "
- "please use 'IOASCII::out3D_dir' instead");
- CCTK_ParameterSet ("out3D_dir", "IOASCII",
- *(const char **) CCTK_ParameterGet ("outdir3D", "IOASCII", NULL));
- }
-
- if (CCTK_ParameterQueryTimesSet ("out_style", "IOASCII") >
- CCTK_ParameterQueryTimesSet ("out1D_style", "IOASCII"))
- {
- CCTK_WARN (1, "Parameter 'IOASCII::out_style' is deprecated in BETA12, "
- "please use 'IOASCII::out1D_style' instead");
- CCTK_ParameterSet ("out1D_style", "IOASCII",
- *(const char **) CCTK_ParameterGet ("out_style", "IOASCII", NULL));
- }
- }
-
- /* IOBasic parameters */
- if (CCTK_IsThornActive ("IOBasic"))
- {
- if (CCTK_ParameterQueryTimesSet ("outdirScalar", "IOBasic") >
- CCTK_ParameterQueryTimesSet ("out_dir", "IOBasic"))
- {
- CCTK_WARN (1, "Parameter 'IOBasic::outdirScalar' is deprecated in BETA12, "
- "please use 'IOBasic::out_dir' instead");
- CCTK_ParameterSet ("out_dir", "IOBasic",
- *(const char **) CCTK_ParameterGet ("outdirScalar", "IOBasic", NULL));
- }
- }
-
- /* IOJpeg parameters */
- if (CCTK_IsThornActive ("IOJpeg"))
- {
- if (CCTK_ParameterQueryTimesSet ("out2D_dir", "IOJpeg") >
- CCTK_ParameterQueryTimesSet ("out_dir", "IOJpeg"))
- {
- CCTK_WARN (1, "Parameter 'IOJPeg::out2D_dir' is deprecated in BETA12, "
- "please use 'IOJPeg::out_dir' instead");
- CCTK_ParameterSet ("out_dir", "IOJpeg",
- *(const char **) CCTK_ParameterGet ("out2D_dir", "IOJPeg", NULL));
- }
- if (CCTK_ParameterQueryTimesSet ("out2D_every", "IOJpeg") >
- CCTK_ParameterQueryTimesSet ("out_every", "IOJpeg"))
- {
- CCTK_WARN (1, "Parameter 'IOJPeg::out2D_every' is deprecated in BETA12, "
- "please use 'IOJPeg::out_every' instead");
- sprintf (buffer, "%d",
- *(const CCTK_INT *) CCTK_ParameterGet ("out2D_every", "IOJPeg", NULL));
- CCTK_ParameterSet ("out_every", "IOJpeg", buffer);
- }
- if (CCTK_ParameterQueryTimesSet ("out2D_vars", "IOJpeg") >
- CCTK_ParameterQueryTimesSet ("out_vars", "IOJpeg"))
- {
- CCTK_WARN (1, "Parameter 'IOJPeg::out2D_vars' is deprecated in BETA12, "
- "please use 'IOJPeg::out_vars' instead");
- CCTK_ParameterSet ("out_vars", "IOJpeg",
- *(const char **) CCTK_ParameterGet ("out2D_vars", "IOJPeg", NULL));
- }
- }
-
- /* IsoSurfacer parameters */
- if (CCTK_IsThornActive ("IsoSurfacer"))
- {
- if (CCTK_ParameterQueryTimesSet ("outdir", "IsoSurfacer") >
- CCTK_ParameterQueryTimesSet ("out_dir", "IsoSurfacer"))
- {
- CCTK_WARN (1, "Parameter 'IsoSurfacer::outdir' is deprecated in BETA12, "
- "please use 'IsoSurfacer::out_dir' instead");
- CCTK_ParameterSet ("out_dir", "IsoSurfacer",
- *(const char **) CCTK_ParameterGet ("outdir", "IsoSurfacer", NULL));
- }
- if (CCTK_ParameterQueryTimesSet ("output_var", "IsoSurfacer") >
- CCTK_ParameterQueryTimesSet ("out_vars", "IsoSurfacer"))
- {
- CCTK_WARN (1, "Parameter 'IsoSurfacer::output_var' is deprecated in BETA12, "
- "please use 'IsoSurfacer::out_vars' instead");
- CCTK_ParameterSet ("out_vars", "IsoSurfacer",
- *(const char **) CCTK_ParameterGet ("output_var", "IsoSurfacer", NULL));
- }
- if (CCTK_ParameterQueryTimesSet ("output_frequency", "IsoSurfacer") >
- CCTK_ParameterQueryTimesSet ("out_every", "IsoSurfacer"))
- {
- CCTK_WARN (1, "Parameter 'IsoSurfacer::output_frequency' is deprecated in BETA12, "
- "please use 'IsoSurfacer::out_every' instead");
- sprintf (buffer, "%d",
- *(const CCTK_INT *) CCTK_ParameterGet ("output_frequency", "IsoSurfacer", NULL));
- CCTK_ParameterSet ("out_every", "IsoSurfacer", buffer);
- }
- if (CCTK_ParameterQueryTimesSet ("output_start", "IsoSurfacer") >
- CCTK_ParameterQueryTimesSet ("out_start", "IsoSurfacer"))
- {
- CCTK_WARN (1, "Parameter 'IsoSurfacer::output_start' is deprecated in BETA12, "
- "please use 'IsoSurfacer::out_start' instead");
- sprintf (buffer, "%d",
- *(const CCTK_INT *) CCTK_ParameterGet ("output_start", "IsoSurfacer", NULL));
- CCTK_ParameterSet ("out_start", "IsoSurfacer", buffer);
- }
- if (CCTK_ParameterQueryTimesSet ("output_format", "IsoSurfacer") >
- CCTK_ParameterQueryTimesSet ("out_format", "IsoSurfacer"))
- {
- CCTK_WARN (1, "Parameter 'IsoSurfacer::output_format' is deprecated in BETA12, "
- "please use 'IsoSurfacer::out_format' instead");
- CCTK_ParameterSet ("out_format", "IsoSurfacer",
- *(const char **) CCTK_ParameterGet ("output_format", "IsoSurfacer", NULL));
- }
- }
-
- /* IOFlexIO parameters */
- if (CCTK_IsThornActive ("IOFlexIO"))
- {
- if (CCTK_ParameterQueryTimesSet ("outdir2D", "IOFlexIO") >
- CCTK_ParameterQueryTimesSet ("out2D_dir", "IOFlexIO"))
- {
- CCTK_WARN (1, "Parameter 'IOFlexIO::outdir2D' is deprecated in BETA12, "
- "please use 'IOFlexIO::out2D_dir' instead");
- CCTK_ParameterSet ("out2D_dir", "IOFlexIO",
- *(const char **) CCTK_ParameterGet ("outdir2D", "IOFlexIO", NULL));
- }
- if (CCTK_ParameterQueryTimesSet ("outdir3D", "IOFlexIO") >
- CCTK_ParameterQueryTimesSet ("out_dir", "IOFlexIO"))
- {
- CCTK_WARN (1, "Parameter 'IOFlexIO::outdir3D' is deprecated in BETA12, "
- "please use 'IOFlexIO::out_dir' instead");
- CCTK_ParameterSet ("out_dir", "IOFlexIO",
- *(const char **) CCTK_ParameterGet ("outdir3D", "IOFlexIO", NULL));
- }
- if (CCTK_ParameterQueryTimesSet ("out3D_every", "IOFlexIO") >
- CCTK_ParameterQueryTimesSet ("out_every", "IOFlexIO"))
- {
- CCTK_WARN (1, "Parameter 'IOFlexIO::out3D_every' is deprecated in BETA12, "
- "please use 'IOFlexIO::out_every' instead");
- sprintf (buffer, "%d",
- *(const CCTK_INT *) CCTK_ParameterGet ("out3D_every", "IOFlexIO", NULL));
- CCTK_ParameterSet ("out_every", "IOFlexIO", buffer);
- }
- if (CCTK_ParameterQueryTimesSet ("out3D_vars", "IOFlexIO") >
- CCTK_ParameterQueryTimesSet ("out_vars", "IOFlexIO"))
- {
- CCTK_WARN (1, "Parameter 'IOFlexIO::out3D_vars' is deprecated in BETA12, "
- "please use 'IOFlexIO::out_vars' instead");
- CCTK_ParameterSet ("out_vars", "IOFlexIO",
- *(const char **) CCTK_ParameterGet ("out3D_vars", "IOFlexIO", NULL));
- }
- }
-
- /* IOHDF5 parameters */
- if (CCTK_IsThornActive ("IOHDF5"))
- {
- if (CCTK_ParameterQueryTimesSet ("out3D_vars", "IOHDF5") >
- CCTK_ParameterQueryTimesSet ("out_vars", "IOHDF5"))
- {
- CCTK_WARN (1, "Parameter 'IOHDF5::out3D_vars' is deprecated in BETA12, "
- "please use 'IOHDF5::out_vars' instead");
- CCTK_ParameterSet ("out_vars", "IOHDF5",
- *(const char **) CCTK_ParameterGet ("out3D_vars", "IOHDF5", NULL));
- }
- if (CCTK_ParameterQueryTimesSet ("outdir3D", "IOHDF5") >
- CCTK_ParameterQueryTimesSet ("out_dir", "IOHDF5"))
- {
- CCTK_WARN (1, "Parameter 'IOHDF5::outdir3D' is deprecated in BETA12, "
- "please use 'IOHDF5::out_dir' instead");
- CCTK_ParameterSet ("out_dir", "IOHDF5",
- *(const char **) CCTK_ParameterGet ("outdir3D", "IOHDF5", NULL));
- }
- if (CCTK_ParameterQueryTimesSet ("outdir_HDF5", "IOHDF5") >
- CCTK_ParameterQueryTimesSet ("out_dir", "IOHDF5"))
- {
- CCTK_WARN (1, "Parameter 'IOHDF5::outdir_HDF5' is deprecated in BETA12, "
- "please use 'IOHDF5::out_dir' instead");
- CCTK_ParameterSet ("out_dir", "IOHDF5",
- *(const char **) CCTK_ParameterGet ("outdir_HDF5", "IOHDF5", NULL));
- }
- if (CCTK_ParameterQueryTimesSet ("outHDF5_every", "IOHDF5") >
- CCTK_ParameterQueryTimesSet ("out_every", "IOHDF5"))
- {
- CCTK_WARN (1, "Parameter 'IOHDF5::outHDF5_every' is deprecated in BETA12, "
- "please use 'IOHDF5::out_every' instead");
- sprintf (buffer, "%d",
- *(const CCTK_INT *) CCTK_ParameterGet ("outHDF5_every", "IOHDF5", NULL));
- CCTK_ParameterSet ("out_every", "IOHDF5", buffer);
- }
- if (CCTK_ParameterQueryTimesSet ("out3D_every", "IOHDF5") >
- CCTK_ParameterQueryTimesSet ("out_every", "IOHDF5"))
- {
- CCTK_WARN (1, "Parameter 'IOHDF5::out3D_every' is deprecated in BETA12, "
- "please use 'IOHDF5::out_every' instead");
- sprintf (buffer, "%d",
- *(const CCTK_INT *) CCTK_ParameterGet ("out3D_every", "IOHDF5", NULL));
- CCTK_ParameterSet ("out_every", "IOHDF5", buffer);
- }
- }
-
- return (0);
-}
-
-
/********************************************************************
*********************** Local Functions ***********************
********************************************************************/