aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a>2002-05-06 09:09:18 +0000
committertradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a>2002-05-06 09:09:18 +0000
commit91b1b6c26186eb19eef57e63f3c6fab3d9f807bb (patch)
treeae5c1cd527ca8b3cdd115fc5ad0b69a9e1f1f050
parent8cedc4e09c9fcd5beaa9a32147791c85d09e43a4 (diff)
Parameter names changes as announced in today's mail to users@cactuscode.org.
You must update all other I/O thorns now. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@163 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a
-rw-r--r--doc/documentation.tex262
-rw-r--r--param.ccl280
-rw-r--r--schedule.ccl8
-rw-r--r--src/CheckpointRecovery.c48
-rw-r--r--src/Startup.c429
5 files changed, 740 insertions, 287 deletions
diff --git a/doc/documentation.tex b/doc/documentation.tex
index c7d6c8a..d3c9b4c 100644
--- a/doc/documentation.tex
+++ b/doc/documentation.tex
@@ -18,11 +18,11 @@ Input and output of data (I/O) in Cactus is provided by infrastructure thorns,
which interact with the flesh via a fixed interface, which is described in the
Users' Guide. The standard release of Cactus contains a number of thorns which
provide so-called I/O methods implementing the actual I/O in a variety of data
-formats and styles. All these provided I/O methods use thorn {\tt
-CactusBase/IOUtil} which provides general utilities for I/O (such as parsing
+formats and styles. All these provided I/O methods use thorn {\bf IOUtil} which
+provides general utilities for I/O (such as parsing
parameter strings to decide which variables to output), and a general set of
parameters which are inherited by the different I/O methods (such as the output
-directory). Thorn {\tt IOUtil} by itself provides no I/O methods.
+directory). Thorn {\bf IOUtil} by itself provides no I/O methods.
More information about I/O and visualisation of Cactus data can be found in the
individual I/O thorns, and in the {\tt Visualization-HOWTO} available on the
@@ -62,12 +62,17 @@ registered names are the labels we now use to describe the various methods.
{\tt CactusBase/IOASCII}
\\
{\tt IOASCII\_3D} &
- full 3D output of grid arrays in gnuplot format &
+ full output of 3D grid arrays in gnuplot format &
{\tt CactusBase/IOASCII}
\\
&&\\
- {\tt IOHDF5\_3D} &
- full 3D output of grid arrays in HDF5 format &
+ {\tt IOJpeg} &
+ 2D slice output of grid arrays in jpeg image format &
+ {\tt CactusIO/IOJpeg}
+\\
+&&\\
+ {\tt IOHDF5} &
+ full output of arbitrary grid variables in HDF5 format &
{\tt CactusPUGHIO/IOHDF5}
\\
&&\\
@@ -75,8 +80,8 @@ registered names are the labels we now use to describe the various methods.
2D slice output of grid arrays in FlexIO format &
{\tt CactusPUGHIO/IOFlexIO}
\\
- {\tt IOFlexIO\_3D} &
- full 3D output of grid arrays in FlexIO format &
+ {\tt IOFlexIO} &
+ full output of arbitrary grid variables in FlexIO format &
{\tt CactusPUGHIO/IOFlexIO}
\\
\hline
@@ -88,9 +93,9 @@ registered names are the labels we now use to describe the various methods.
The standard provided Cactus I/O methods are shown in Table~\ref{one}.
As described above, each of these I/O thorns inherit parameters from thorn
-{\tt CactusBase/IOUtil}, which must be included in your ThornList
+{\bf IOUtil}, which must be included in your ThornList
and activated in your parameter files before any of these I/O methods
-can be used. {\tt CactusBase/IOUtil} allows you to set the default
+can be used. {\bf IOUtil} allows you to set the default
behaviour for all the I/O methods described above, for example, setting
the parameter {\tt IO::out\_every = 1} will result in any chosen I/O method
providing output on each iteration. The default behaviour can be overriden
@@ -100,7 +105,7 @@ but computationally expensive 3D output only every 10th iteration,
with these files going into another directory on a scratch partition.
-\section{Providing Your own I/O Method}
+\section{Providing Your Own I/O Method}
If you as a Cactus developer have your own input/output routines and want to
share this functionality with other people you should do this by putting them
@@ -109,7 +114,7 @@ A description on how to register a new I/O method with the flesh's I/O subsystem
can be found in the {\it Infrastructure Thorn Writer's Guide} (as part of the
{\it Cactus User's Guide}).
-New I/O thorns should always inherit from thorn {\tt CactusBase/IOUtil} in order
+New I/O thorns should always inherit from thorn {\bf IOUtil} in order
to reuse as much of the existing I/O infrastructure as possible, and to maintain
a uniform interface on how to use the I/O methods.
@@ -134,11 +139,11 @@ a uniform interface on how to use the I/O methods.
\section{Standard Parameters}
-Here we describe a few of the standard parameters used by {\tt IOUtil} to
+Here we describe a few of the standard parameters used by {\bf IOUtil} to
control output.
\begin{itemize}
- \item{\tt IO::outdir}\\
+ \item{\tt IO::out\_dir}\\
The name of the directory to be used for output. All the I/O methods
described here will write by default to this directory (which itself
defaults to the current working directory). Individual methods have
@@ -153,7 +158,7 @@ control output.
\section{Saving/Generating Parameter Files}
-Thorn {\tt IOUtil} can save a copy of the parameter file of a run, or can also
+Thorn {\bf IOUtil} can save a copy of the parameter file of a run, or can also
automatically generate a parameter file from all current parameter settings.
This is controlled by the {\tt IO::parfile\_write} parameter:
@@ -186,43 +191,43 @@ with the chosen name it will not be overwritten.
\label{iomodes}
For a run on multiple processors, scalar, 1D, and 2D output will always be
written from only processor zero (that is, required data from all other
-processors will be sent to processor zero, who then outputs all the gathered
-data). For 3D output this may become a quite expensive operation since output
-by only a single processor will probably result in an I/O bottleneck and delay
-further computation. For this reason Cactus offers different I/O modes for 3D
-output which can be controlled by the {\tt IO::out\_3Dmode} parameter, in
-combination with {\tt IO::out\_unchunked} and {\tt IO::out3D\_np}. These
-parameters allow I/O to be optimised for your particular machine architecture
-and needs:
+processors will be sent to processor zero, which then outputs all the gathered
+data). For full-dimensional output of grid arrays this may become a quite expensive
+operation since output by only a single processor will probably result in an
+I/O bottleneck and delay further computation. For this reason Cactus offers
+different I/O modes for such output which can be controlled by the
+{\tt IO::out\_mode} parameter, in combination with {\tt IO::out\_unchunked}
+and {\tt IO::out\_proc\_every}. These parameters allow I/O to be optimised for
+your particular machine architecture and needs:
\begin{itemize}
- \item {\tt IO::out3D\_mode = "onefile"}\\
+ \item {\tt IO::out\_mode = "onefile"}\\
As for the 1D and 2D I/O methods, writing to file is performed only
by processor zero.
This processor gathers all the output data from the other processors
and then writes to a single file. The gathered grid array data from each
- processor can be either written in chunks ({\tt IO::out3D\_unchunked =
+ processor can be either written in chunks ({\tt IO::out\_unchunked =
"no"}) with each chunk containing the data from a single processor, or
collected into a single global array before writing ({\tt
- IO::out3D\_unchunked = "yes"}). The default is to write the data in chunks.
+ IO::out\_unchunked = "yes"}). The default is to write the data in chunks.
- \item {\tt IO::out3D\_mode = "np"}\\
- 3D output is written in parallel for groups of processors. Each group
- consists of {\tt IO::out3D\_procs} processors which have assigned one I/O
+ \item {\tt IO::out\_mode = "np"}\\
+ Output is written in parallel for groups of processors. Each group
+ consists of {\tt IO::out\_proc\_every} processors which have assigned one I/O
processor which gathers data from the group and writes it to file. The
- chunked output will go into {\tt IO::out3D\_procs} files.
+ chunked output will go into {\tt IO::out\_proc\_every} files.
The default number of processors in a group is eight.
- \item {\tt IO::out3D\_mode = "proc"}\\
- This is the default method for 3D output.
+ \item {\tt IO::out\_mode = "proc"}\\
+ This is the default output mode.
Every processor writes its own chunk of data into a separate output file.
\end{itemize}
-Probably the single processor {\tt "proc"} mode is the most efficient 3D output
+Probably the single-processor {\tt "proc"} mode is the most efficient output
mode on machines with a fast I/O subsystem and many I/O nodes (eg. a Linux
cluster with local disks attached to each node) because it provides the highest
parallelity for outputting data. Note that on very large numbers of processors
-you mave have to fall back to {\tt "np"}, output from groups of processors,
+you mave have to fall back to {\tt "np"}, doing output by every so many processors,
mode if the system limit of maximum open file descriptors is exceeded (this is
true for large jobs on a T3E).
@@ -236,7 +241,7 @@ provided by the thorns offering parallel I/O methods.
\section{Output of Hyperslab Data}
-While some I/O methods ({\tt IOHDF5\_3D, IOFlexIO\_3D}) can dump the full
+While some I/O methods ({\tt IOHDF5, IOFlexIO}) can dump the full
contents of a multidimensional CCTK variable, others such as {\tt IOASCII\_1D}
and {\tt IOASCII\_2D} will output only a subset of the data (eg. 1D lines or 2D
planes of 3D grid functions).
@@ -244,10 +249,10 @@ Such a subset (called a {\it hyperslab}) is generally defined as an orthogonal
region into the multidimensional dataset, with a startpoint and a length in any
direction, and an optional downsampling factor.
-Thorn {\tt IOUtil} defines a set of hyperslab parameters for all
+Thorn {\bf IOUtil} defines a set of hyperslab parameters for all
I/O methods which determine the default positions of 1D line or 2D slice output
along the axes. I/O thorns can also define their own hyperslab parameters
-which then will overwrite the defaults provided by {\tt IOUtil}.
+which then will overwrite the defaults provided by {\bf IOUtil}.
\begin{itemize}
\item {\tt IO::out\_[xyz]line\_[xyz]}\\
@@ -262,8 +267,8 @@ which then will overwrite the defaults provided by {\tt IOUtil}.
\item {\tt IO::out\_[\{xy\}\{xz\}\{yz\}]plane\_[xyz]}i\\
specifies the slice center of 2D xy,xz,yz-plane output by index points
of the underlying computational grid
- \item {\tt IO::out3D\_downsample\_[xyz]}\\
- specifies the downsampling factor for 3D output in every direction
+ \item {\tt IO::out\_downsample\_[xyz]}\\
+ specifies the downsampling factor for output in every direction
\end{itemize}
Setting the index points for the slice centers in a parameter file has
@@ -300,11 +305,11 @@ computational grid}
\end{figure}
-\section{Data Filenames and Filename Extensions}
+\section{Data Filenames}
The standard I/O thorns in Cactus make use of a consistent set of filenames
and extensions, which identify the variables and data format used in the file.
-The filenames are listed in the following tables.
+The filenames are listed in the following table.
%The filenames are listed in Table~\ref{filename_table},
%and the extensions in Table~\ref{filename_extensions_table}
@@ -313,45 +318,47 @@ The filenames are listed in the following tables.
\label{filename_table}
\begin{tabular}{|l|l|}
\hline
- {\bf I/O method} & {\bf Filename for output of variable {\tt phi}}\\
+ {\bf I/O method} & {\bf Filename for output of variable {\tt var}}\\
\hline
- {\tt Scalar} & phi\_nm1.tl, phi\_nm2.tl phi\_max.tl phi\_min.tl\\
- {\tt Info} & Provides no output file (the same data is available with {\tt Scalar} output)\\
- {\tt IOASCII\_1D} & phi.xl, phi.yl, phi.zl, phi.dl\\
- {\tt IOASCII\_2D} & phi\_2d\_xy.gnuplot, phi\_2d\_xz.gnuplot, phi\_2d\_yz.gnuplot\\
- {\tt IOASCII\_3D} & phi\_3d.gnuplot\\
- {\tt IOHDF5\_3D} & phi\_3d.h5\\
- {\tt IOFlexIO\_2D} & phi\_2d.ieee\\
- {\tt IOFlexIO\_3D} & phi\_3d.ieee\\
+ {\tt Info} & only outputs to screen\\
+ {\tt Scalar} & {\tt <var>.\{asc|xg\}} for scalar variables\\
+ & {\tt <var>\_<reduction>.\{asc|xg\}} for reduction values from grid arrays\\
+ {\tt IOASCII\_1D} & {\tt <var>\_<slice>\_[<center\_i>][center\_j>].\{asc|xg\}}\\
+ {\tt IOASCII\_2D} & {\tt <var>\_<plane>\_[<center>].asc}\\
+ {\tt IOASCII\_3D} & {\tt <var>\_3D.asc}\\
+ {\tt IOJpeg} & {\tt <var>\_<plane>\_[<center>].jpeg}\\
+ {\tt IOHDF5} & {\tt <var>\_3D.h5}\\
+ {\tt IOFlexIO\_2D} & {\tt <var>\_2D.ieee}\\
+ {\tt IOFlexIO} & {\tt <var>\_3D.ieee}\\
\hline
\end{tabular}
\caption{Filenames used by standard I/O thorns}
\end{center}
\end{table}
-\begin{table}[htb]
-\begin{center}
-\label{filename_extensions_table}
-\begin{tabular}{|c|l|l|}
-\hline
-{\bf Extension} & {\bf Description} & {\bf Thorn} \\
- \hline
- {\tt .xl} & 1D line plots in {\it x}-direction & {\tt CactusBase/IOASCII}\\
- {\tt .yl} & 1D line plots in {\it y}-direction & {\tt CactusBase/IOASCII}\\
- {\tt .zl} & 1D line plots in {\it z}-direction & {\tt CactusBase/IOASCII}\\
- {\tt .dl} & 1D diagonal line plots & {\tt CactusBase/IOASCII}\\
- {\tt .tl} & traceline plots over time & {\tt CactusBase/IOBasic}\\
- \hline
-\end{tabular}
-\caption{File extensions used by the standard I/O thorns}
-\end{center}
-\end{table}
+%\begin{table}[htb]
+%\begin{center}
+%\label{filename_extensions_table}
+%\begin{tabular}{|c|l|l|}
+%\hline
+%{\bf Extension} & {\bf Description} & {\bf Thorn} \\
+% \hline
+% {\tt .xl} & 1D line plots in {\it x}-direction & {\tt CactusBase/IOASCII}\\
+% {\tt .yl} & 1D line plots in {\it y}-direction & {\tt CactusBase/IOASCII}\\
+% {\tt .zl} & 1D line plots in {\it z}-direction & {\tt CactusBase/IOASCII}\\
+% {\tt .dl} & 1D diagonal line plots & {\tt CactusBase/IOASCII}\\
+% {\tt .tl} & traceline plots over time & {\tt CactusBase/IOBasic}\\
+% \hline
+%\end{tabular}
+%\caption{File extensions used by the standard I/O thorns}
+%\end{center}
+%\end{table}
\section{Checkpointing and Recovery in Cactus}
\label{cp_recovery}
-The I/O methods for 3D output also provide functionality for {\it checkpointing}
+The I/O methods for arbitrary output of CCTK variables also provide functionality for {\it checkpointing}
and {\it recovery}. A checkpoint is a snapshot of the current state of the
simulation ({\it ie} the contents of all the grid variables and the parameter
settings) at a chosen timestep. Each checkpoint is saved into a
@@ -366,7 +373,7 @@ Additionally, for performing parameter studies, compute-intensive
initial data can be calculated just once and saved in a checkpoint file
from which each job can be started.
-Again, thorn {\tt CactusBase/IOUtil} provides general checkpoint \& recovery
+Again, thorn {\bf IOUtil} provides general checkpoint \& recovery
parameters. The most important ones are:
\begin{itemize}
\item {\tt IO::checkpoint\_every}\\
@@ -391,17 +398,17 @@ parameters. The most important ones are:
basename of the recovery file\\
Iteration number and file extension are appended by the individual I/O
method used to recover from the recovery file.
- \item {\tt IO::recovery\_dir}\\
+ \item {\tt IO::recover\_dir}\\
directory where the recovery file is located
\end{itemize}
To checkpoint your simulation, you need to enable checkpointing by setting
-the boolean parameter {\tt checkpoint}, for one of the 3D I/O methods to
+the boolean parameter {\tt checkpoint}, for one of the appropriate I/O methods to
{\tt yes}.
Checkpoint filenames consist of a basename (as specified in {\tt
IO::checkpoint\_file}) followed by {\tt ".chkpt.it\_$<$iteration\_number$>$"}
-plus the file extension indicating the file format ({\tt ".ieee"} for IEEEIO
-data from {\tt CactusPUGHIO/IOFlexIO}, or {\tt ".h5} for HDF5 data from
+plus the file extension indicating the file format ({\tt "*.ieee"} for IEEEIO
+data from {\tt CactusPUGHIO/IOFlexIO}, or {\tt "*.h5"} for HDF5 data from
{\tt CactusPUGHIO/IOHDF5}).
Use the {\tt "manual"} mode to recover from a specific checkpoint file by adding
@@ -422,7 +429,7 @@ match -- a mismatch will not be detected by Cactus in order to terminate it.
Instead the simulation would always start from initial data without any
recovery.
-Because the same I/O methods implement both output of 3D data and checkpoint
+Because the same I/O methods implement both output of arbitrary data and checkpoint
files, the same I/O modes are used (see Section~\ref{iomodes}).
Note that the recovery routines in Cactus can process both chunked and unchunked
checkpoint files if you restart on the same number of processors -- no
@@ -457,16 +464,16 @@ initial data is calculated only once and stored in a file. Such data
can then be read back in at startup and immediately used by following evolution
runs.
-The following {\tt IOUtil} parameters exist to specify what variables should be
+The following {\bf IOUtil} parameters exist to specify what variables should be
read from file(s) as initial data:
\begin{itemize}
- \item {\tt IO::recover\_ID\_files}\\
+ \item {\tt IO::filereader\_ID\_files}\\
list of files to read in as initial data (multiple filenames must be
separated by spaces)\\
The same file naming conventions (what I/O mode used, which iteration
number) apply as for checkpoint files.
- \item {\tt IO::recover\_ID\_vars}\\
+ \item {\tt IO::filereader\_ID\_vars}\\
list of CCTK variables to read in from the given initial data files
(variables are identified by their full name, multiple variable names must
be separated by spaces)\\
@@ -476,7 +483,7 @@ read from file(s) as initial data:
timesteps of the same variable only the last one is taken.
\end{itemize}
-Thorn {\tt IOUtil} also provides a filereader API which can be called
+Thorn {\bf IOUtil} also provides a filereader API which can be called
by any application thorn at any time. It gets passed the equivalent information
to the filereader parameters, plus a pointer to the underlying CCTK grid
hierarchy:
@@ -534,61 +541,60 @@ Here we give examples of the parameters for the different I/O methods.
IOASCII::out2D_every = 50
\end{verbatim}
-\item{\bf HDF5 Output with {\tt IOHDF5's "IOHDF5\_3D"} I/O method}
+\item{\bf HDF5 Output with {\tt IOHDF5's "IOHDF5"} I/O method}
\begin{verbatim}
ActiveThorns = "IOHDF5 IOUtil PUGHSlab ..."
# Output vars in HDF5 format on iteration 0, 5, 10, ...
- IOHDF5::out3D_every = 5
+ IOHDF5::out_every = 5
# Group of variables to output
- IOHDF5::out3D_vars = "evolve::vars"
+ IOHDF5::out_vars = "evolve::vars"
# Special I/O directory for HDF5 output
- IOHDF5::outdir3D = "/scratch/tmp"
+ IOHDF5::out_dir = "/scratch/tmp"
- # 3D Output unchunked to one file
+ # Full output unchunked to one file
# (Only using a small number of processors)
- IO::out3D_mode = "onefile"
- IO::out3D_unchunked = "yes"
+ IO::out_mode = "onefile"
+ IO::out_unchunked = "yes"
- # Downsample 3D data by a factor of 3 in each direction
- IO::out3D_downsample_x = 3
- IO::out3D_downsample_y = 3
- IO::out3D_downsample_z = 3
+ # Downsample full data by a factor of 3 in each direction
+ IO::out_downsample_x = 3
+ IO::out_downsample_y = 3
+ IO::out_downsample_z = 3
\end{verbatim}
-\item{\bf IEEEIO 2D and 3D output using {\tt IOFlexIO's "IOFlexIO\_2D"} and
-{\tt "IOFlexIO\_3D"} I/O methods}
+\item{\bf IEEEIO 2D hyperslab and full output using {\tt IOFlexIO's "IOFlexIO\_2D"} and {\tt "IOFlexIO"} I/O methods}
\begin{verbatim}
ActiveThorns = "IOFlexIO FlexIO IOUtil PUGHSlab ..."
# Output vars in 2D IEEEIO format on iteration 0, 100, 200, ...
IOFlexIO::out2D_every = 100
- # Output vars in 3D IEEEIO format on iteration 0, 5, 10, ...
- IOFlexIO::out3D_every = 5
+ # Output vars in IEEEIO format on iteration 0, 5, 10, ...
+ IOFlexIO::out_every = 5
# Group of variables to output to file for each method
IOFlexIO::out2D_vars = "evolve::vars"
- IOFlexIO::out3D_vars = "evolve::vars"
+ IOFlexIO::out_vars = "evolve::vars"
# 2D output goes into standard I/O directory
- IO::outdir = "test"
+ IO::out_dir = "test"
- # Special I/O directory for 3D output
- IOFlexIO::outdir3D = "/scratch/tmp"
+ # Special I/O directory for full output
+ IOFlexIO::out_dir = "/scratch/tmp"
- # 3D Output chunked to one file for every eight processors
+ # Full output chunked to one file for every eight processors
# (Run on large number of processors)
- IO::out3D_mode = "np"
- IO::out3D_nproc = 8
- IO::out3D_unchunked = "no"
-
- # Downsample 3D data by a factor of 3 in each direction
- IO::out3D_downsample_x = 3
- IO::out3D_downsample_y = 3
- IO::out3D_downsample_z = 3
+ IO::out_mode = "np"
+ IO::out_proc_every = 8
+ IO::out_unchunked = "no"
+
+ # Downsample full data by a factor of 3 in each direction
+ IO::out_downsample_x = 3
+ IO::out_downsample_y = 3
+ IO::out_downsample_z = 3
\end{verbatim}
\item{\bf Checkpointing using thorn {\tt IOFlexIO}}
@@ -625,8 +631,8 @@ Here we give examples of the parameters for the different I/O methods.
This section is for Cactus developers to describe how they can add a new method
for checkpointing/recovery using the existing I/O parameters and the function
-API of thorn {\tt CactusBase/IOUtil}.
-Inheriting this functionality from thorn {\tt IOUtil} helps you to reuse
+API of thorn {\bf IOUtil}.
+Inheriting this functionality from thorn {\bf IOUtil} helps you to reuse
existing code and maintain a uniform user interface on how to invoke different
checkpointing/recovery methods.
@@ -643,13 +649,13 @@ variable, except that
\end{enumerate}
A thorn routine providing this checkpointing capability should register itself
-with the flesh's scheduler at the {\tt CCTK\_CPINITIAL} (for initial data
-checkpoints), {\tt CCTK\_CHECKPOINT} (for periodic checkpoints of evolution
-data), and {\tt CCTK\_TERMINATE} time bins (for checkpointing the last timestep
+with the flesh's scheduler at the {\tt CPINITIAL} (for initial data
+checkpoints), {\tt CHECKPOINT} (for periodic checkpoints of evolution
+data), and {\tt TERMINATE} time bins (for checkpointing the last timestep
of a simulation).
It should also decide whether checkpointing is needed by evaluating the
-corresponding checkpoint parameters of {\tt IOUtil} (see section
+corresponding checkpoint parameters of {\bf IOUtil} (see section
\ref{cp_recovery}).
Before dumping the contents of a distributed grid array into a checkpoint
@@ -660,7 +666,7 @@ To gather the current parameter values you can use the C routine
\begin{verbatim}
char *IOUtil_GetAllParameters (const cGH *GH, int all);
\end{verbatim}
-from thorn {\tt IOUtil}. This routine returns the parameter settings in an
+from thorn {\bf IOUtil}. This routine returns the parameter settings in an
allocated single large string. Its second argument {\tt all} flags whether all
parameter settings should be gathered ($!= 0$) or just the ones which have been
set before ($== 0$). Note that you should always save all parameters in a
@@ -694,12 +700,12 @@ Recovering from a checkpoint is a two-step operation:
contents).
\end{enumerate}
-The flesh provides the special time bins {\tt CCTK\_RECOVER\_PARAMETERS} and
-{\tt CCTK\_RECOVER\_VARIABLES} for these two steps (see also the chapter on
+The flesh provides the special time bins {\tt RECOVER\_PARAMETERS} and
+{\tt RECOVER\_VARIABLES} for these two steps (see also the chapter on
{\it Adding a Checkpointing/Recovery Method} in the {\it Infrastructure Thorn
Writer's Guide} as part of the {\it Cactus User's Guide}).\\
-Thorn {\tt IOUtil} evaluates the recovery parameters (determines the recovery
+Thorn {\bf IOUtil} evaluates the recovery parameters (determines the recovery
mode to use, construct the name(s) of the recovery file(s) etc.).
It also controls the recovery process by invoking the recovery methods of
other I/O thorns, one after another until one method succeeded.\\
@@ -710,7 +716,7 @@ A recovery method must provide a routine with the following prototype:
int Recover (cGH *GH, const char *basefilename, int called_from);
\end{verbatim}
-This routine will be invoked by {\tt IOUtil} with the following arguments:
+This routine will be invoked by {\bf IOUtil} with the following arguments:
\begin{itemize}
\item a GH pointer refer to the grid hierarchy and its grid variables\\
@@ -718,7 +724,7 @@ This routine will be invoked by {\tt IOUtil} with the following arguments:
at {\tt CP\_RECOVER\_PARAMETERS} when no grid hierarchy exists yet.
\item the basename of the checkpoint file to recover from\\
- This name is constructed by {\tt IOUtil} from the settings of {\tt
+ This name is constructed by {\bf IOUtil} from the settings of {\tt
IO::recovery\_dir} and {\tt IO::recover\_file}. It will also include an
iteration number if one of the {\tt auto} recovery modes is used.
The filename extension by which checkpoint files of different recovery
@@ -728,15 +734,15 @@ This routine will be invoked by {\tt IOUtil} with the following arguments:
This can be one of the keywords {\tt CP\_INITIAL\_DATA, CP\_EVOLUTION\_DATA,
CP\_RECOVER\_PARAMETERS, CP\_RECOVER\_DATA}, or {\tt FILEREADER\_DATA}).
This flag tells the routine what it should do when it is being called by
- {\tt IOUtil}. Note that {\tt IOUtil} assumes that the recovery method can
+ {\bf IOUtil}. Note that {\bf IOUtil} assumes that the recovery method can
also be used as a filereader routine here which is essentially the same
as recovering (individual) grid variables from (data) files.
\end{itemize}
To perform the first step of recovery process, a recovery method must register
-a routine with the flesh's scheduler at the {\tt CCTK\_RECOVER\_PARAMETERS}
-time bin. This routine itself should call the {\tt IOUtil} API
+a routine with the flesh's scheduler at the {\tt RECOVER\_PARAMETERS}
+time bin. This routine itself should call the {\bf IOUtil} API
\begin{verbatim}
int IOUtil_RecoverParameters (int (*recover_fn) (cGH *GH,
@@ -756,7 +762,7 @@ routine are
\item {\tt file\_extension} -- the filename extension for recovery files
which are accepted by this recovery method\\
- When {\tt IOUtil} constructs the recovery filename and searches for
+ When {\bf IOUtil} constructs the recovery filename and searches for
potential recovery files (in the {\tt auto} recovery modes) it will only
match filenames with the basename as given in the {\tt IO::recovery\_file}
parameter, appended by {\tt file\_extension}.
@@ -766,7 +772,7 @@ routine are
This is just a descriptive string to print some info output during recovery.
\end{itemize}
-The routine registered at {\tt CCTK\_RECOVER\_PARAMETERS} should return to
+The routine registered at {\tt RECOVER\_PARAMETERS} should return to
the scheduler a negative value if parameter recovery failed for this recovery
method for some reason (eg. if no appropriate recovery file was found).
The scheduler will then continue with the next recovery method until one
@@ -777,9 +783,9 @@ A value of zero should be returned to the scheduler to indicate that no
recovery was requested.\\
The second step during recovery --- restoring the contents of grid variables
-from the recovery file --- is invoked by thorn {\tt IOUtil} which registers
-a routine at {\tt CCTK\_RECOVER\_VARIABLES}. This routine calls all recovery
-methods which were registered before with {\tt IOUtil} via the API
+from the recovery file --- is invoked by thorn {\bf IOUtil} which registers
+a routine at {\tt RECOVER\_VARIABLES}. This routine calls all recovery
+methods which were registered before with {\bf IOUtil} via the API
\begin{verbatim}
int IOUtil_RegisterRecover (const char *name,
@@ -789,10 +795,10 @@ methods which were registered before with {\tt IOUtil} via the API
\end{verbatim}
With this registration, all recovery method's actual recovery routines are made
-known to {\tt IOUtil}, along with a descriptive name under which they are
+known to {\bf IOUtil}, along with a descriptive name under which they are
registered.
-At {\tt CCTK\_RECOVER\_VARIABLES} thorn {\tt IOUtil} will loop over all
+At {\tt RECOVER\_VARIABLES} thorn {\bf IOUtil} will loop over all
available recovery routines (passing the same arguments as for parameter
recovery) until one succeeds (returns a positive value).
diff --git a/param.ccl b/param.ccl
index dfd4c48..65020b9 100644
--- a/param.ccl
+++ b/param.ccl
@@ -1,46 +1,50 @@
# Parameter definitions for thorn IOUtil
+# $Header$
#############################################################################
### declare IOUtil parameters
-### These are declared protected so that they can be seen by other IO thorns.
+### These are declared protected so that they can be seen by other I/O thorns.
#############################################################################
restricted:
####################
# Output directories
####################
-STRING outdir "Name of IO output directory" STEERABLE = RECOVER
+STRING out_dir "Default output directory" STEERABLE = RECOVER
{
- .* :: "A regex which matches everything"
+ .+ :: "A valid directory name"
+} "."
+STRING outdir "Default output directory (DEPRECATED IN BETA13)" STEERABLE = RECOVER
+{
+ .+ :: "A valid directory name"
} "."
########################
# How often to do output
########################
-INT out_every "How often to do IO output" STEERABLE = ALWAYS
+INT out_every "How often to do output by default" STEERABLE = ALWAYS
{
- -1 :: "Never"
- 1:* :: "Every so many iterations"
+ 1:* :: "Every so many iterations"
+ -1:0 :: "Disable output"
} -1
################
# various things
################
-KEYWORD newverbose "Level of screen output for IO?" STEERABLE = ALWAYS
+KEYWORD verbose "Level of screen output for I/O" STEERABLE = ALWAYS
{
- "none" :: "Give no output"
- "standard" :: "Initial description for each method"
+ "none" :: "No output"
+ "standard" :: "Initial description for each I/O method"
"full" :: "Maximal output"
+ "yes" :: "Same as \"standard\" (DEPRECATED IN BETA13)"
+ "no" :: "Same as \"none\" (DEPRECATED IN BETA13)"
} "standard"
-BOOLEAN verbose "Give extended screen output in IO?" STEERABLE = ALWAYS
-{
-} "no"
-BOOLEAN print_timing_info "Print timing information on I/O operations."
+BOOLEAN print_timing_info "Print timing information on I/O operations." STEERABLE = RECOVER
{
} "no"
-BOOLEAN new_filename_scheme "Use the new filename scheme for output files ?"
+BOOLEAN new_filename_scheme "Use the new filename scheme for output files ?" STEERABLE = RECOVER
{
-} "no"
+} "yes"
KEYWORD out_fileinfo "Add some useful file information to output files ?" STEERABLE = RECOVER
{
"none" :: "no file information"
@@ -52,48 +56,89 @@ KEYWORD out_fileinfo "Add some useful file information to output files ?" STEERA
#######################
# Specific to 3D output
#######################
-KEYWORD out3D_mode "Which mode for 3D IO"
+KEYWORD out_mode "Which mode to use for output" STEERABLE = RECOVER
+{
+ "proc" :: "Every processor writes its share of data into a separate file"
+ "np" :: "Data is collected and written by every N'th processor into a separate file, where N is specified by the parameter IO::out_proc_every"
+ "onefile" :: "All output is written into a single file by processor 0"
+} "proc"
+KEYWORD out3D_mode "Which mode to use for output (DEPRECATED IN BETA13)" STEERABLE = RECOVER
{
- "proc" :: "every processor writes its share of data into a separate file"
- "np" :: "data is collected and written by every N'th processor into a separate file, where N is specified by the parameter out3D_procs"
- "onefile" :: "all output is written into a single file by processor 0"
+ "proc" :: "Every processor writes its share of data into a separate file"
+ "np" :: "Data is collected and written by every N'th processor into a separate file, where N is specified by the parameter IO::out_proc_every"
+ "onefile" :: "All output is written into a single file by processor 0"
} "proc"
-INT out3D_procs "Do IO on every N processors."
+INT out_proc_every "Do output on every N processors" STEERABLE = RECOVER
{
- 1:* :: "Must be a positive integer"
+ 1:* :: "A number between [1, nprocs)"
} 8
-BOOLEAN out3D_septimefiles "Write one file per time slice, as opposed to all data in one file"
+INT out3D_procs "Do output on every N processors (DEPRECATED IN BETA13)" STEERABLE = RECOVER
+{
+ 1:* :: "A number between [1, nprocs)"
+} 8
+INT out_timesteps_per_file "How many timesteps to write to a single file" STEERABLE = RECOVER
+{
+# 1:* :: "Number of timesteps per file"
+ 1:1 :: "Number of timesteps per file (can only be 1 so far)"
+ -1: :: "All timesteps in a single file"
+} -1
+BOOLEAN out3D_septimefiles "Write one file per time slice, as opposed to all data in one file" STEERABLE = RECOVER
+{
+} "no"
+BOOLEAN out_unchunked "Don't write data in chunks. This parameter is ignored for single-processor runs where output is always done in unchunked mode." STEERABLE = RECOVER
{
} "no"
-BOOLEAN out3D_unchunked "Don't write data in chunks. This parameter is ignored for single-processor runs where output is always done in unchunked mode."
+BOOLEAN out3D_unchunked "Don't write data in chunks. This parameter is ignored for single-processor runs where output is always done in unchunked mode. (DEPRECATED IN BETA13)" STEERABLE = RECOVER
{
} "no"
-KEYWORD out3D_parameters "Save current parameter settings in 3D output files ?"
+KEYWORD out_save_parameters "Save current parameter settings in output files ?" STEERABLE = RECOVER
{
- "all" :: "save all parameter settings"
- "only set" :: "only save parameters which have been set before"
- "yes" :: "synonym for \"only set\" (DEPRICATED)"
- "no" :: "don't save parameter settings"
+ "all" :: "Save all parameter settings"
+ "only set" :: "Only save parameters which have been set before"
+ "yes" :: "Synonym for \"only set\" (DEPRICATED)"
+ "no" :: "Don't save parameter settings"
+} "only set"
+KEYWORD out3D_parameters "Save current parameter settings in output files ? (DEPRECATED IN BETA13)" STEERABLE = RECOVER
+{
+ "all" :: "Save all parameter settings"
+ "only set" :: "Only save parameters which have been set before"
+ "yes" :: "Synonym for \"only set\" (DEPRICATED)"
+ "no" :: "Don't save parameter settings"
} "only set"
##############################################
# Downsampling parameters (only for 3D output)
##############################################
-INT out3D_downsample_x "Factor by which to downsample output in x direction. Point (0,0,0) is always included." STEERABLE = ALWAYS
+INT out_downsample_x "Factor by which to downsample output in x direction. Point (0,0,0) is always included." STEERABLE = ALWAYS
+{
+ 1:* :: "A positive integer"
+} 1
+INT out_downsample_y "Factor by which to downsample output in y direction. Point (0,0,0) is always included." STEERABLE = ALWAYS
+{
+ 1:* :: "A positive integer"
+} 1
+INT out_downsample_z "Factor by which to downsample output in z direction. Point (0,0,0) is always included." STEERABLE = ALWAYS
{
- 1:* :: "Must be a positive integer"
+ 1:* :: "A positive integer"
} 1
-INT out3D_downsample_y "Factor by which to downsample output in y direction. Point (0,0,0) is always included." STEERABLE = ALWAYS
+BOOLEAN out_single_precision "Output data in single precision ?" STEERABLE = RECOVER
{
- 1:* :: "Must be a positive integer"
+} "no"
+INT out3D_downsample_x "Factor by which to downsample output in x direction. Point (0,0,0) is always included. (DEPRECATED IN BETA13)" STEERABLE = ALWAYS
+{
+ 1:* :: "A positive integer"
+} 1
+INT out3D_downsample_y "Factor by which to downsample output in y direction. Point (0,0,0) is always included. (DEPRECATED IN BETA13)" STEERABLE = ALWAYS
+{
+ 1:* :: "A positive integer"
} 1
-INT out3D_downsample_z "Factor by which to downsample output in z direction. Point (0,0,0) is always included." STEERABLE = ALWAYS
+INT out3D_downsample_z "Factor by which to downsample output in z direction. Point (0,0,0) is always included. (DEPRECATED IN BETA13)" STEERABLE = ALWAYS
{
- 1:* :: "Must be a positive integer"
+ 1:* :: "A positive integer"
} 1
-BOOLEAN out3D_single "Output 3D data in single precision ? This parameter is ignored for Cactus compiled with single precision"
+BOOLEAN out3D_single "Output 3D data in single precision ? This parameter is ignored for Cactus compiled with single precision (DEPRECATED IN BETA13)"
{
} "no"
@@ -104,54 +149,67 @@ BOOLEAN out3D_single "Output 3D data in single precision ? This parameter is ign
BOOLEAN checkpoint_ID "Checkpoint initial data ?" STEERABLE = RECOVER
{
} "no"
-BOOLEAN checkpoint_keep_all "Keep all checkpoint files ?" STEERABLE = RECOVER
-{
-} "no"
KEYWORD recover "Recover from a checkpoint file ?" STEERABLE = RECOVER
{
"no" :: "Don't recover"
- "manual" :: "Recover from the checkpoint file given as <recovery_dir>/<recover_file>"
- "auto" :: "Automatically recover from the latest checkpoint file found in <recovery_dir>"
+ "manual" :: "Recover from the checkpoint file given as <recover_dir>/<recover_file>"
+ "auto" :: "Automatically recover from the latest checkpoint file found in <recover_dir>"
"autoprobe" :: "Probe for checkpoint files and automatically recover, continue as usual if nothing was found"
} "no"
-INT checkpoint_every "Checkpoint every x iterations" STEERABLE = ALWAYS
+INT checkpoint_every "How often to checkpoint" STEERABLE = ALWAYS
{
- -1:* :: "negative values disable checkpointing"
+ 1:* :: "Every so many iterations"
+ -1:0 :: "Disable periodic checkpointing"
} -1
BOOLEAN checkpoint_on_terminate "Checkpoint after last iteration" STEERABLE = ALWAYS
{
} "no"
INT checkpoint_keep "How many checkpoint files to keep" STEERABLE = RECOVER
{
- 1:* :: "1 overwrites the latest checkpoint file"
+ 1:* :: "1 overwrites the latest checkpoint file"
+ -1: :: "Keep all checkpoint files"
} 1
STRING checkpoint_file "File name for regular checkpoint" STEERABLE = ALWAYS
{
- .* :: "A regex which matches everything"
+ ".+" :: "A valid filename"
} "checkpoint.chkpt"
STRING checkpoint_ID_file "File name for initial data checkpoint" STEERABLE = ALWAYS
{
- .* :: "A regex which matches everything"
+ ".+" :: "A valid filename"
} "checkpointID"
-STRING recover_file "File name of recovery file" STEERABLE = ALWAYS
+STRING recover_file "Basename of recovery file" STEERABLE = ALWAYS
{
- .* :: "A regex which matches everything"
+ ".+" :: "A valid filename"
} "checkpoint.chkpt"
STRING checkpoint_dir "Output directory for checkpoint files" STEERABLE = RECOVER
{
- .* :: "A regex which matches everything"
+ ".+" :: "A valid directory name"
} "."
-STRING recovery_dir "Directory to look for the recovery file" STEERABLE = RECOVER
+STRING recover_dir "Directory to look for recovery files" STEERABLE = RECOVER
{
- .* :: "A regex which matches everything"
+ ".+" :: "A valid directory name"
} "."
-STRING recover_ID_files "List of files to read in as initial data" STEERABLE = RECOVER
+STRING recovery_dir "Directory to look for recovery files (DEPRECATED IN BETA13)" STEERABLE = RECOVER
{
- .* :: "A regex which matches everything"
+ ".+" :: "A valid directory name"
+} "."
+STRING filereader_ID_files "List of files to read in as initial data" STEERABLE = RECOVER
+{
+ ".+" :: "Space-separated list of initial data filenames"
+ "^$" :: "An empty string for not recovering initial data"
} ""
-STRING recover_ID_vars "List of variables to read in from the given initial data files" STEERABLE = RECOVER
+STRING filereader_ID_vars "List of variables to read in from the given initial data files" STEERABLE = RECOVER
{
- .* :: "A regex which matches everything"
+ ".+" :: "Space-separated list of fully qualified variable/group names"
+} "all"
+STRING recover_ID_files "List of files to read in as initial data (DEPRECATED IN BETA13)" STEERABLE = RECOVER
+{
+ ".+" :: "Space-separated list of initial data filenames"
+ "^$" :: "An empty string for not recovering initial data"
+} ""
+STRING recover_ID_vars "List of variables to read in from the given initial data files (DEPRECATED IN BETA13)" STEERABLE = RECOVER
+{
+ ".+" :: "Space-separated list of fully qualified variable/group names"
} "all"
BOOLEAN recover_and_remove "Remove checkpoint file after successful recovery ?" STEERABLE = RECOVER
{
@@ -161,103 +219,113 @@ BOOLEAN recover_and_remove "Remove checkpoint file after successful recovery ?"
###################################
# Parameter file writing parameters
###################################
-KEYWORD parfile_write "Write a parameter file to 'IO::outdir'" STEERABLE = recovery
+KEYWORD parfile_write "Write a parameter file to 'IO::outdir'" STEERABLE = RECOVER
{
"no" :: "Do not write a parameter file"
"copy" :: "Copy the original parameter file"
"generate" :: "Generate a parameter file from the current settings"
# "verbose generate" :: "Like \"generate\" but describe all parameters in detail"
} "copy"
-STRING parfile_name "Filename for the parameter file to be written" STEERABLE = recovery
+STRING parfile_name "Filename for the parameter file to be written" STEERABLE = RECOVER
{
- ".*" :: "a valid filename, or an empty string if the original parameter " \
- "filename should be used"
+ ".+" :: "A valid filename"
+ "^$" :: "An empty string to choose the original parameter filename"
} ""
-INT parfile_update_every "How often to update the parameter file for steered parameters" STEERABLE = always
+INT parfile_update_every "How often to update the parameter file for steered parameters" STEERABLE = ALWAYS
{
- 0:*:: "Update every so many iterations (zero disables updating)"
+ 1:* :: "Every so many iterations"
+ 0: :: "Disable updating"
} 0
#######################################
# 1D line slice center setup parameters
#######################################
-REAL out_xline_y "y-coord for 1D lines in x-direction"
+REAL out_xline_y "y-coord for 1D lines in x-direction" STEERABLE = RECOVER
{
- *:* :: ""
+ *:* :: "A value between [ymin, ymax]"
} 0.0
-REAL out_xline_z "z-coord for 1D lines in x-direction"
+REAL out_xline_z "z-coord for 1D lines in x-direction" STEERABLE = RECOVER
{
- *:* :: ""
+ *:* :: "A value between [zmin, zmax]"
} 0.0
-REAL out_yline_x "x-coord for 1D lines in y-direction"
+REAL out_yline_x "x-coord for 1D lines in y-direction" STEERABLE = RECOVER
{
- *:* :: ""
+ *:* :: "A value between [xmin, xmax]"
} 0.0
-REAL out_yline_z "z-coord for 1D lines in y-direction"
+REAL out_yline_z "z-coord for 1D lines in y-direction" STEERABLE = RECOVER
{
- *:* :: ""
-} 0.0
-REAL out_zline_x "x-coord for 1D lines in z-direction"
+ *:* :: "A value between [zmin, zmax]"
+} 0.0
+REAL out_zline_x "x-coord for 1D lines in z-direction" STEERABLE = RECOVER
{
- *:* :: ""
+ *:* :: "A value between [xmin, xmax]"
} 0.0
-REAL out_zline_y "y-coord for 1D lines in z-direction"
+REAL out_zline_y "y-coord for 1D lines in z-direction" STEERABLE = RECOVER
{
- *:* :: ""
+ *:* :: "A value between [ymin, ymax]"
} 0.0
-INT out_xline_yi "y-index (from 0) for 1D lines in x-direction"
+INT out_xline_yi "y-index (from 0) for 1D lines in x-direction, overrides IO::out_xline_y" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-INT out_xline_zi "z-index (from 0) for 1D lines in x-direction"
+ 0:* :: "An index between [0, ny)"
+ -1: :: "Default to physical coordinate IO::out_xline_y"
+} -1
+INT out_xline_zi "z-index (from 0) for 1D lines in x-direction, overrides IO::out_xline_z" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-INT out_yline_xi "x-index (from 0) for 1D lines in y-direction"
+ 0:* :: "An index between [0, nz)"
+ -1: :: "Default to physical coordinate IO::out_xline_z"
+} -1
+INT out_yline_xi "x-index (from 0) for 1D lines in y-direction, overrides IO::out_yline_x" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-INT out_yline_zi "z-index (from 0) for 1D lines in y-direction"
+ 0:* :: "An index between [0, nx)"
+ -1: :: "Default to physical coordinate IO::out_yline_x"
+} -1
+INT out_yline_zi "z-index (from 0) for 1D lines in y-direction, overrides IO::out_yline_z" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-INT out_zline_xi "x-index (from 0) for 1D lines in z-direction"
+ 0:* :: "An index between [0, nz)"
+ -1: :: "Default to physical coordinate IO::out_yline_z"
+} -1
+INT out_zline_xi "x-index (from 0) for 1D lines in z-direction, overrides IO::out_zline_x" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-INT out_zline_yi "y-index (from 0) for 1D lines in z-direction"
+ 0:* :: "An index between [0, nx)"
+ -1: :: "Default to physical coordinate IO::out_zline_x"
+} -1
+INT out_zline_yi "y-index (from 0) for 1D lines in z-direction, overrides IO::out_zline_y" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
+ 0:* :: "An index between [0, ny)"
+ -1: :: "Default to physical coordinate IO::out_zline_y"
+} -1
##################################
# 2D plane center setup parameters
##################################
-REAL out_yzplane_x "x-coord for 2D planes in yz"
+REAL out_yzplane_x "x-coord for 2D planes in yz" STEERABLE = RECOVER
{
- *:* :: ""
+ *:* :: "A value between [xmin, xmax]"
} 0.0
-REAL out_xzplane_y "y-coord for 2D planes in xz"
+REAL out_xzplane_y "y-coord for 2D planes in xz" STEERABLE = RECOVER
{
- *:* :: ""
+ *:* :: "A value between [ymin, ymax]"
} 0.0
-REAL out_xyplane_z "z-coord for 2D planes in xy"
+REAL out_xyplane_z "z-coord for 2D planes in xy" STEERABLE = RECOVER
{
- *:* :: ""
+ *:* :: "A value between [zmin, zmax]"
} 0.0
-INT out_xyplane_zi "z-index (from 0) for 2D planes in xy"
+INT out_yzplane_xi "x-index (from 0) for 2D planes in yz, overrrides IO::out_yzplane_x" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-INT out_xzplane_yi "y-index (from 0) for 2D planes in xz"
+ 0:* :: "An index between [0, nx)"
+ -1: :: "Default to physical coordinate IO::out_yzplane_x"
+} -1
+INT out_xzplane_yi "y-index (from 0) for 2D planes in xz, overrrides IO::out_xzplane_y" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
-INT out_yzplane_xi "x-index (from 0) for 2D planes in yz"
+ 0:* :: "An index between [0, ny)"
+ -1: :: "Default to physical coordinate IO::out_xzplane_y"
+} -1
+INT out_xyplane_zi "z-index (from 0) for 2D planes in xy, overrrides IO::out_xyplane_z" STEERABLE = RECOVER
{
- 0:* :: ""
-} 0
+ 0:* :: "An index between [0, nz)"
+ -1: :: "Default to physical coordinate IO::out_xyplane_z"
+} -1
diff --git a/schedule.ccl b/schedule.ccl
index a499340..037be57 100644
--- a/schedule.ccl
+++ b/schedule.ccl
@@ -1,4 +1,5 @@
# Schedule definitions for thorn IOUtil
+# $Header$
schedule IOUtil_Startup at STARTUP after Driver_Startup
{
@@ -13,7 +14,7 @@ if (! CCTK_Equals (recover, "no"))
} "Checkpoint recovery routine"
}
-if (*recover_ID_files)
+if (*filereader_ID_files)
{
schedule IOUtil_RecoverIDFromDatafiles at CCTK_RECOVER_VARIABLES after IOUtil_RecoverGH
{
@@ -28,3 +29,8 @@ 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 5e033b8..b343dfa 100644
--- a/src/CheckpointRecovery.c
+++ b/src/CheckpointRecovery.c
@@ -145,7 +145,7 @@ int IOUtil_RegisterRecover (const char *name,
@endhistory
@var GH
- @vdesc Pointer to CCTK grid hierarchy
+ @vdesc pointer to CCTK grid hierarchy
@vtype const cGH *
@vio in
@endvar
@@ -201,7 +201,7 @@ void IOUtil_PrepareFilename (const cGH *GH,
case CP_RECOVER_DATA:
case CP_RECOVER_PARAMETERS:
case FILEREADER_DATA:
- sprintf (fname, "%s/%s", recovery_dir, basefilename ? basefilename:recover_file);
+ sprintf (fname, "%s/%s", recover_dir, basefilename ? basefilename:recover_file);
break;
default:
@@ -253,7 +253,7 @@ void IOUtil_PrepareFilename (const cGH *GH,
<registered RecoverGH routines>
@var GH
- @vdesc Pointer to CCTK grid hierarchy
+ @vdesc pointer to CCTK grid hierarchy
@vtype cGH *
@vio in
@endvar
@@ -318,7 +318,7 @@ static int IOUtil_RecoverFromFile (cGH *GH,
@calls IOUtil_RecoverFromFile
@var GH
- @vdesc Pointer to CCTK grid hierarchy
+ @vdesc pointer to CCTK grid hierarchy
@vtype cGH *
@vio in
@endvar
@@ -351,7 +351,7 @@ void IOUtil_RecoverGH (cGH *GH)
@enddesc
@var GH
- @vdesc Pointer to CCTK grid hierarchy
+ @vdesc pointer to CCTK grid hierarchy
@vtype cGH *
@vio in
@endvar
@@ -370,9 +370,9 @@ void IOUtil_RecoverVarsFromDatafiles (cGH *GH,
const char *in_files,
const char *in_vars)
{
- DECLARE_CCTK_PARAMETERS
ioGH *myGH;
char *basefilename, *delim, delim_char;
+ DECLARE_CCTK_PARAMETERS
myGH = (ioGH *) CCTK_GHExtension (GH, "IO");
@@ -443,11 +443,11 @@ void IOUtil_RecoverVarsFromDatafiles (cGH *GH,
@desc
The rfr-registered initial data recovery routine.
Just calls IOUtil's generic routine
- IOUtil_RecoverVarsFromDatafiles() with the recover_ID_XXX
+ IOUtil_RecoverVarsFromDatafiles() with the filereader_ID_XXX
parameters.
@enddesc
@var GH
- @vdesc Pointer to CCTK grid hierarchy
+ @vdesc pointer to CCTK grid hierarchy
@vtype cGH *
@vio in
@endvar
@@ -457,7 +457,7 @@ void IOUtil_RecoverIDFromDatafiles (cGH *GH)
DECLARE_CCTK_PARAMETERS
- IOUtil_RecoverVarsFromDatafiles (GH, recover_ID_files, recover_ID_vars);
+ IOUtil_RecoverVarsFromDatafiles (GH, filereader_ID_files, filereader_ID_vars);
}
@@ -516,7 +516,16 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH,
filelist_t *filelist, *tmp;
#endif
DECLARE_CCTK_PARAMETERS
+ static int first_time_called = 1;
+
+ /* FIXME: this can go in BETA13 */
+ if (first_time_called)
+ {
+ extern int IOUtil_FixRecoveryParameters (void);
+ IOUtil_FixRecoveryParameters ();
+ first_time_called = 0;
+ }
if (CCTK_Equals (recover, "auto") || CCTK_Equals (recover, "autoprobe"))
{
@@ -525,14 +534,14 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH,
{
CCTK_VInfo (CCTK_THORNSTRING, "Searching for %s checkpoint files "
"with basefilename '%s' in directory '%s'",
- fileType, recover_file, recovery_dir);
+ fileType, recover_file, recover_dir);
}
- dir = opendir (recovery_dir);
+ dir = opendir (recover_dir);
if (! dir)
{
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
- "Recovery directory '%s' doesn't exist", recovery_dir);
+ "Recovery directory '%s' doesn't exist", recover_dir);
return (CCTK_Equals (recover, "autoprobe") ? 0 : -2);
}
@@ -631,7 +640,7 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH,
CCTK_VWarn (retval ? 1 : 3, __LINE__, __FILE__, CCTK_THORNSTRING,
"No %s checkpoint files with basefilename '%s' found in "
"recovery directory '%s'",
- fileType, recover_file, recovery_dir);
+ fileType, recover_file, recover_dir);
}
#else
fileExtension = fileExtension;
@@ -655,13 +664,20 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH,
CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING,
"Could not recover parameters from %s checkpoint file(s) "
"with basefilename '%s' in recovery directory '%s'",
- fileType, recover_file, recovery_dir);
+ fileType, recover_file, recover_dir);
}
/* remember parameter recovery status for later evaluation in
IOUtil_RecoverGH() */
checkpoint_file_exists = retval > 0;
+ /* FIXME: this can go in BETA13 */
+ if (retval > 0)
+ {
+ extern int IOUtil_FixParameters (void);
+ IOUtil_FixParameters ();
+ }
+
return (retval);
}
@@ -676,7 +692,7 @@ int IOUtil_RecoverParameters (int (*recoverFn) (cGH *GH,
@enddesc
@var GH
- @vdesc Pointer to CCTK grid hierarchy
+ @vdesc pointer to CCTK grid hierarchy
@vtype const cGH *
@vio in
@endvar
@@ -780,11 +796,11 @@ char *IOUtil_GetAllParameters (const cGH *GH, int all)
@@*/
void IOUtil_SetAllParameters (const char *parameters)
{
- DECLARE_CCTK_PARAMETERS
char *tmp, *nextparam, *avalue, *param;
char oldchar;
char *name, *thorn_impl, *parameter_string, *free_me;
const char *thorn;
+ DECLARE_CCTK_PARAMETERS
parameter_string = free_me = strdup (parameters);
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,