aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2002-03-14 13:15:39 +0000
committertradke <tradke@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2002-03-14 13:15:39 +0000
commit593faf37a6a9e268e9cfeff6d8e58fb5151c8347 (patch)
tree11b9ebcdc1d0a0bb83deb3009bb6b101b376a4ed
parent3afd79ee939f7451a6beca3e484065c45fc42536 (diff)
Added new parameter 'IOStreamedHDF5::out_every' which just depricates
the old parameter 'IOStreamedHDF5::outHDF5_every'. This is to get a consistent set of I/O parameter names for all I/O thorns. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOStreamedHDF5/trunk@79 0888f3d4-9f52-45d2-93bc-d00801ff5e46
-rw-r--r--par/HDF5socket_demo.par6
-rw-r--r--param.ccl14
-rw-r--r--src/Output.c34
3 files changed, 38 insertions, 16 deletions
diff --git a/par/HDF5socket_demo.par b/par/HDF5socket_demo.par
index 0d36ac1..732194e 100644
--- a/par/HDF5socket_demo.par
+++ b/par/HDF5socket_demo.par
@@ -27,9 +27,9 @@ IOBasic::outInfo_vars = "wavetoy::phi"
IO::outdir = "wavebinary"
-IO::out_every = 1
-IOStreamedHDF5::outHDF5_every = 1
-IOStreamedHDF5::data_port = 1235
+IO::out_every = 1
+IOStreamedHDF5::out_every = 1
+IOStreamedHDF5::data_port = 1235
# hyperslab syntax:
# "<implementation::name>[{dimension}{direction,..}{startindex[,...]}
diff --git a/param.ccl b/param.ccl
index 95d8f63..1a43d22 100644
--- a/param.ccl
+++ b/param.ccl
@@ -9,17 +9,14 @@ private:
########################
# How often to do output
########################
-INT outHDF5_every "How often to do HDF5 streaming, overrides IO::out_every" STEERABLE = ALWAYS
+INT out_every "How often to do HDF5 streaming, overrides IO::out_every" STEERABLE = ALWAYS
{
-1:* :: "Values <= 0 disable IOStreamedHDF5 output"
} -1
-
-KEYWORD h5verbose "Verbosity level"
+INT outHDF5_every "How often to do HDF5 streaming, overrides IO::out_every" STEERABLE = ALWAYS
{
- "yes" :: "information output"
- "debug":: "debugging output"
- "no" :: "silent"
-} "yes"
+ -1:* :: "Values <= 0 disable IOStreamedHDF5 output"
+} -1
#####################
# Variables to output
@@ -62,7 +59,8 @@ shares: IO
########################
# How often to do output
########################
-USES INT out_every
+#FIXME: need USES AS
+#USES INT out_every
################
# various things
diff --git a/src/Output.c b/src/Output.c
index 075ab8b..1942a77 100644
--- a/src/Output.c
+++ b/src/Output.c
@@ -305,16 +305,40 @@ int IOStreamedHDF5_TriggerOutput (const cGH *GH,
@@*/
static void CheckSteerableParameters (ioStreamedHDF5GH *myGH)
{
- int times_set;
- static int out_vars_lastset = -1;
+ int type, times_set;
+ static int out_vars_lastset = -1, user_was_warned = 0;
DECLARE_CCTK_PARAMETERS
/* How often to output */
- myGH->out_every = out_every > 0 ? out_every : -1;
- if (outHDF5_every > 0)
+ if (out_every > 0 || outHDF5_every > 0)
{
- myGH->out_every = outHDF5_every;
+ if (out_every <= 0)
+ {
+ if (! user_was_warned)
+ {
+ CCTK_WARN (1, "Parameter 'IOStreamedHDF5::outHDF5_every is depricated "
+ "in BETA12, please use 'IOStreamedHDF5::out_every' "
+ "instead");
+ user_was_warned = 1;
+ }
+ myGH->out_every = outHDF5_every;
+ }
+ else
+ {
+ myGH->out_every = out_every;
+ }
+ }
+ else
+ {
+ myGH->out_every = *(const CCTK_INT *)
+ CCTK_ParameterGet ("out_every",
+ CCTK_ImplementationThorn ("IO"),
+ &type);
+ if (myGH->out_every == 0)
+ {
+ myGH->out_every = -1;
+ }
}
/* re-parse the 'IOStreamedHDF5::out_vars' parameter if it was changed */