aboutsummaryrefslogtreecommitdiff
path: root/src/Startup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Startup.c')
-rw-r--r--src/Startup.c429
1 files changed, 393 insertions, 36 deletions
diff --git a/src/Startup.c b/src/Startup.c
index ba284e0..d8a3eb2 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -40,6 +40,8 @@ CCTK_FILEVERSION(CactusBase_IOUtil_Startup_c)
********************************************************************/
void IOUtil_Startup (void);
int IOUtil_UpdateParFile (const cGH *GH);
+int IOUtil_FixParameters (void);
+int IOUtil_FixRecoveryParameters (void);
/********************************************************************
@@ -60,8 +62,8 @@ typedef struct t_param_list
********************** Static Routines *********************
********************************************************************/
static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH);
-static int CopyParFile (const char *new_parfilename, const char *outdir);
-static int GenerateParFile (const char *new_parfilename, const char *outdir);
+static int CopyParFile (const char *new_parfilename, const char *out_dir);
+static int GenerateParFile (const char *new_parfilename, const char *out_dir);
static int DumpParameters (FILE *outfile);
@@ -109,7 +111,6 @@ void IOUtil_Startup (void)
Updates the parameter file for all parameters which got steered
during its last invocation.
@enddesc
- @calls
@var GH
@vdesc pointer to grid hierarchy
@@ -117,7 +118,7 @@ void IOUtil_Startup (void)
@vio in
@endvar
- @returntype void *
+ @returntype int
@returndesc 0 for success
@endreturndesc
@@*/
@@ -140,6 +141,363 @@ 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 BETA13, 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 BETA13, 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 BETA13, 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 BETA13, 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 BETA13, 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 BETA13, 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 BETA13, 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 BETA13, 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 BETA13, 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 BETA13, 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 BETA13, 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 BETA13, 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 BETA13, 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 "
+ "BETA13, 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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 BETA13, "
+ "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 ***********************
********************************************************************/
@@ -151,7 +509,7 @@ int IOUtil_UpdateParFile (const cGH *GH)
The GH allocation and initialization routine for IOUtil.<BR>
Necessary output dirs are created, checkpoint/recovery timers
are created if timing information is wanted, and a parameter
- file is written to 'IO::outdir' if requested.
+ file is written to 'IO::out_dir' if requested.
@enddesc
@calls IOUtil_CreateDirectory
CopyParFile
@@ -197,30 +555,30 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH)
return (NULL);
}
- if (CCTK_Equals (out3D_mode, "proc"))
+ if (CCTK_Equals (out_mode, "proc"))
{
newGH->ioproc = myproc;
newGH->nioprocs = CCTK_nProcs (GH);
newGH->ioproc_every = 1;
}
- else if (CCTK_Equals (out3D_mode, "np"))
+ else if (CCTK_Equals (out_mode, "np"))
{
- if (out3D_procs > CCTK_nProcs (GH))
+ if (out_proc_every > CCTK_nProcs (GH))
{
newGH->ioproc_every = CCTK_nProcs (GH);
- CCTK_VInfo (CCTK_THORNSTRING, "Reducing 'IO::ioproc_every' to %d",
+ CCTK_VInfo (CCTK_THORNSTRING, "Reducing 'IO::out_proc_every' to %d",
newGH->ioproc_every);
}
else
{
- newGH->ioproc_every = out3D_procs;
+ newGH->ioproc_every = out_proc_every;
}
newGH->nioprocs = CCTK_nProcs (GH) / newGH->ioproc_every +
(CCTK_nProcs (GH) % newGH->ioproc_every ? 1 : 0);
newGH->ioproc = myproc - (myproc % newGH->ioproc_every);
}
- else /* IO::out3D_mode = "onefile" */
+ else /* IO::out_mode = "onefile" */
{
newGH->ioproc = 0;
newGH->nioprocs = 1;
@@ -228,7 +586,7 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH)
}
/* For now we can only have unchunked for a single output file */
- if (out3D_unchunked || CCTK_nProcs (GH) == 1)
+ if (out_unchunked || CCTK_nProcs (GH) == 1)
{
if (newGH->ioproc_every >= CCTK_nProcs (GH))
{
@@ -247,19 +605,19 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH)
}
/* create the default output and checkpoint directories */
- i = IOUtil_CreateDirectory (GH, outdir, 0, 0);
+ i = IOUtil_CreateDirectory (GH, out_dir, 0, 0);
if (i < 0)
{
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "Problem creating default output directory '%s'", outdir);
+ "Problem creating default output directory '%s'", out_dir);
}
- else if (i > 0 && CCTK_Equals (newverbose, "full"))
+ else if (i > 0 && CCTK_Equals (verbose, "full"))
{
CCTK_VInfo (CCTK_THORNSTRING,
- "default output directory '%s' already exists", outdir);
+ "default output directory '%s' already exists", out_dir);
}
i = IOUtil_CreateDirectory (GH, checkpoint_dir,
- ! CCTK_Equals (out3D_mode, "onefile"),
+ ! CCTK_Equals (out_mode, "onefile"),
newGH->ioproc);
if (i < 0)
{
@@ -267,7 +625,7 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH)
"Problem creating checkpoint directory '%s'",
checkpoint_dir);
}
- else if (i > 0 && CCTK_Equals (newverbose, "full"))
+ else if (i > 0 && CCTK_Equals (verbose, "full"))
{
CCTK_VInfo (CCTK_THORNSTRING,
"checkpoint directory '%s' already exists", checkpoint_dir);
@@ -282,9 +640,9 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH)
switch (maxdim > 3 ? 3 : maxdim)
{
- case 3 : newGH->downsample [2] = out3D_downsample_z;
- case 2 : newGH->downsample [1] = out3D_downsample_y;
- case 1 : newGH->downsample [0] = out3D_downsample_x;
+ case 3 : newGH->downsample [2] = out_downsample_z;
+ case 2 : newGH->downsample [1] = out_downsample_y;
+ case 1 : newGH->downsample [0] = out_downsample_x;
}
for (i = 3; i < maxdim; i++)
@@ -292,12 +650,12 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH)
newGH->downsample [i] = 1;
}
- /* evaluate the 'IO::out_single' parameter only
+ /* evaluate the 'IO::out_single_precision' parameter only
if Cactus was compiled with double precision */
#ifdef SINGLE_PRECISION
newGH->out_single = 0;
#else
- newGH->out_single = out3D_single;
+ newGH->out_single = out_single_precision;
#endif
/* copy the 'recovered' flag to this GH extension */
@@ -311,11 +669,11 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH)
{
if (CCTK_Equals (parfile_write, "copy"))
{
- CopyParFile (parfile_name, outdir);
+ CopyParFile (parfile_name, out_dir);
}
else if (CCTK_Equals (parfile_write, "generate"))
{
- GenerateParFile (parfile_name, outdir);
+ GenerateParFile (parfile_name, out_dir);
}
}
@@ -328,7 +686,7 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH)
@date Tue 18 Dec 2001
@author Thomas Radke
@desc
- Copies the original parameter file to a new one in 'IO::outdir'.
+ Copies the original parameter file to a new one in 'IO::out_dir'.
Note that the new parameter file is only written if no such
file existed before.
@enddesc
@@ -340,7 +698,7 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH)
@vtype const char *
@vio in
@endvar
- @var outdir
+ @var out_dir
@vdesc directory to write the new parfile to
@vtype const char *
@vio in
@@ -353,7 +711,7 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH)
-2 if new parameter file couldn't be opened for writing<BR>
@endreturndesc
@@*/
-static int CopyParFile (const char *parfile_name, const char *outdir)
+static int CopyParFile (const char *parfile_name, const char *out_dir)
{
int in_parfile, out_parfile, bytes;
char *out_parfilename, buffer[256];
@@ -390,8 +748,8 @@ static int CopyParFile (const char *parfile_name, const char *outdir)
parfile_name = buffer;
}
}
- out_parfilename = (char *) malloc (strlen (outdir) + strlen (parfile_name)+2);
- sprintf (out_parfilename, "%s/%s", outdir, parfile_name);
+ out_parfilename = (char *) malloc (strlen(out_dir) + strlen(parfile_name)+2);
+ sprintf (out_parfilename, "%s/%s", out_dir, parfile_name);
/* binary-copy the input parfile to the output parfile */
out_parfile = open (out_parfilename, O_CREAT | O_WRONLY | O_EXCL,
@@ -424,7 +782,7 @@ static int CopyParFile (const char *parfile_name, const char *outdir)
@date Tue 18 Dec 2001
@author Thomas Radke
@desc
- Generates a new parameter file in 'IO::outdir' with an
+ Generates a new parameter file in 'IO::out_dir' with an
ActiveThorns list and a sorted list of all active parameters
which have been set in the original parameter file.<BR>
Note that the new parameter file is only written if no such
@@ -438,7 +796,7 @@ static int CopyParFile (const char *parfile_name, const char *outdir)
@vtype const char *
@vio in
@endvar
- @var outdir
+ @var out_dir
@vdesc directory to write the new parfile to
@vtype const char *
@vio in
@@ -451,8 +809,7 @@ static int CopyParFile (const char *parfile_name, const char *outdir)
-2 if new parameter file couldn't be opened for writing<BR>
@endreturndesc
@@*/
-static int GenerateParFile (const char *parfile_name,
- const char *outdir)
+static int GenerateParFile (const char *parfile_name, const char *out_dir)
{
FILE *outfile;
int out_parfile;
@@ -489,8 +846,8 @@ static int GenerateParFile (const char *parfile_name,
parfile_name = buffer;
}
}
- out_parfilename = (char *) malloc (strlen (outdir) + strlen (parfile_name)+2);
- sprintf (out_parfilename, "%s/%s", outdir, parfile_name);
+ out_parfilename = (char *) malloc (strlen(out_dir) + strlen(parfile_name)+2);
+ sprintf (out_parfilename, "%s/%s", out_dir, parfile_name);
/* open the output parfile for writing */
out_parfile = open (out_parfilename, O_CREAT | O_WRONLY | O_EXCL,