diff options
Diffstat (limited to 'src/Output.c')
-rw-r--r-- | src/Output.c | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/src/Output.c b/src/Output.c index 58b29bb..5e3374d 100644 --- a/src/Output.c +++ b/src/Output.c @@ -22,12 +22,6 @@ static const char *rcsid = "$Header$"; CCTK_FILEVERSION(CactusPUGHIO_IOStreamedHDF5_Output_c) -/******************************************************************** - ******************** Internal Routines ************************ - ********************************************************************/ -static void CheckSteerableParameters (const cGH *GH); - - /*@@ @routine IOStreamedHDF5_OutputGH @date Sat March 6 1999 @@ -58,7 +52,7 @@ int IOStreamedHDF5_OutputGH (const cGH *GH) retval = 0; - myGH = (const ioStreamedHDF5GH *) CCTK_GHExtension (GH, "IOStreamedHDF5"); + myGH = CCTK_GHExtension (GH, "IOStreamedHDF5"); /* loop over all variables */ for (vindex = CCTK_NumVars () - 1; vindex >= 0; vindex--) @@ -141,7 +135,7 @@ int IOStreamedHDF5_OutputVarAs (const cGH *GH, const char *fullname, using the IOStreamedHDF5 I/O method. @enddesc - @calls CheckSteerableParameters + @calls IOStreamedHDF5_CheckSteerableParameters @var GH @vdesc Pointer to CCTK GH @@ -164,13 +158,13 @@ int IOStreamedHDF5_TimeFor (const cGH *GH, int vindex) { int retval; char *fullname; - const ioStreamedHDF5GH *myGH; + ioStreamedHDF5GH *myGH; - CheckSteerableParameters (GH); + myGH = CCTK_GHExtension (GH, "IOStreamedHDF5"); + IOStreamedHDF5_CheckSteerableParameters (GH, myGH); /* check if this variable should be output */ - myGH = (const ioStreamedHDF5GH *) CCTK_GHExtension (GH, "IOStreamedHDF5"); retval = myGH->requests[vindex] && myGH->requests[vindex]->out_every > 0 && GH->cctk_iteration % myGH->requests[vindex]->out_every == 0; if (retval) @@ -229,7 +223,7 @@ int IOStreamedHDF5_TriggerOutput (const cGH *GH, int vindex) varname = CCTK_VarName (vindex); - myGH = (ioStreamedHDF5GH *) CCTK_GHExtension (GH, "IOStreamedHDF5"); + myGH = CCTK_GHExtension (GH, "IOStreamedHDF5"); if (CCTK_Equals (verbose, "full")) { @@ -253,11 +247,8 @@ int IOStreamedHDF5_TriggerOutput (const cGH *GH, int vindex) } -/******************************************************************** - ******************** Internal Routines ************************ - ********************************************************************/ /*@@ - @routine CheckSteerableParameters + @routine IOStreamedHDF5_CheckSteerableParameters @date Mon Oct 10 2000 @author Thomas Radke @desc @@ -272,17 +263,21 @@ int IOStreamedHDF5_TriggerOutput (const cGH *GH, int vindex) @vtype const cGH * @vio in @endvar + @var myGH + @vdesc Pointer to IOStreamedHDF5 grid hierarchy + @vtype ioStreamedHDF5GH * + @vio inout + @endvar @@*/ -static void CheckSteerableParameters (const cGH *GH) +void IOStreamedHDF5_CheckSteerableParameters (const cGH *GH, + ioStreamedHDF5GH *myGH) { int i; - ioStreamedHDF5GH *myGH; char *fullname, *msg; DECLARE_CCTK_PARAMETERS /* how often to output */ - myGH = (ioStreamedHDF5GH *) CCTK_GHExtension (GH, "IOStreamedHDF5"); i = myGH->out_every_default; myGH->out_every_default = out_every >= 0 ? out_every : io_out_every; @@ -291,12 +286,12 @@ static void CheckSteerableParameters (const cGH *GH) { if (myGH->out_every_default > 0) { - CCTK_VInfo (CCTK_THORNSTRING, "IOStreamedHDF5: Periodic output every %d " + CCTK_VInfo (CCTK_THORNSTRING, "Periodic streamed HDF5 output every %d " "iterations", myGH->out_every_default); } else { - CCTK_INFO ("IOStreamedHDF5: Periodic output turned off"); + CCTK_INFO ("Periodic streamed HDF5 output turned off"); } } @@ -304,8 +299,8 @@ static void CheckSteerableParameters (const cGH *GH) if (strcmp (out_vars, myGH->out_vars) || myGH->out_every_default != i) { IOUtil_ParseVarsForOutput (GH, CCTK_THORNSTRING, "IOStreamedHDF5::out_vars", - out_vars, myGH->out_every_default, - myGH->requests); + myGH->stop_on_parse_errors, out_vars, + myGH->out_every_default, myGH->requests); if (myGH->out_every_default == i || ! CCTK_Equals (verbose, "none")) { @@ -317,7 +312,7 @@ static void CheckSteerableParameters (const cGH *GH) fullname = CCTK_FullName (i); if (! msg) { - Util_asprintf (&msg, "IOStreamedHDF5: Periodic output requested " + Util_asprintf (&msg, "Periodic streamed HDF5 output requested " "for '%s'", fullname); } else |