From 8fe0009843ec7ceb65c190156ce229b841edba9e Mon Sep 17 00:00:00 2001 From: tradke Date: Fri, 26 Apr 2002 16:01:28 +0000 Subject: Changes to use the I/O request description and parsing routines which moved from IOHDF5Util to IOUtil. You must update both BetaThorns/IOHDF5Util and CactusBase/IOUtil now. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOStreamedHDF5/trunk@83 0888f3d4-9f52-45d2-93bc-d00801ff5e46 --- src/Output.c | 4 ++-- src/Startup.c | 2 +- src/Write.c | 2 +- src/ioStreamedHDF5GH.h | 7 ++----- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/Output.c b/src/Output.c index 1a68fac..15450c1 100644 --- a/src/Output.c +++ b/src/Output.c @@ -193,7 +193,7 @@ int IOStreamedHDF5_TimeFor (const cGH *GH, int vindex) /* check if this variable should be output */ myGH = (ioStreamedHDF5GH *) CCTK_GHExtension (GH, "IOStreamedHDF5"); - retval = myGH->out_every > 0 && myGH->slablist[vindex] && + retval = myGH->out_every > 0 && myGH->requests[vindex] && GH->cctk_iteration % myGH->out_every == 0; if (retval) { @@ -335,7 +335,7 @@ static void CheckSteerableParameters (const cGH *GH) times_set = CCTK_ParameterQueryTimesSet ("out_vars", CCTK_THORNSTRING); if (times_set != out_vars_lastset) { - IOHDF5Util_ParseVarsForOutput (GH, out_vars, myGH->slablist); + IOUtil_ParseVarsForOutput (GH, out_vars, myGH->requests); /* Save the last setting of 'out_vars' parameter */ out_vars_lastset = times_set; diff --git a/src/Startup.c b/src/Startup.c index 05bc401..d93d3af 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -197,7 +197,7 @@ static void *SetupGH (tFleshConfig *config, int conv_level, cGH *GH) /* allocate a new GH extension structure */ numvars = CCTK_NumVars (); myGH = (ioStreamedHDF5GH *) malloc (sizeof (ioStreamedHDF5GH)); - myGH->slablist = (ioSlab **) calloc (numvars, sizeof (ioSlab *)); + myGH->requests = (ioRequest **) calloc (numvars, sizeof (ioRequest *)); myGH->out_last = (int *) malloc (numvars * sizeof (int)); myGH->advertised_filename = NULL; diff --git a/src/Write.c b/src/Write.c index addd5a0..fd0f98b 100644 --- a/src/Write.c +++ b/src/Write.c @@ -125,7 +125,7 @@ int IOStreamedHDF5_Write (const cGH *GH, int vindex, const char *alias) } /* output the data */ - retval = IOHDF5Util_DumpVar (GH, myGH->slablist[vindex], file); + retval = IOHDF5Util_DumpVar (GH, myGH->requests[vindex], file); /* close the file */ if (file >= 0) diff --git a/src/ioStreamedHDF5GH.h b/src/ioStreamedHDF5GH.h index ea8acba..0f6ae79 100644 --- a/src/ioStreamedHDF5GH.h +++ b/src/ioStreamedHDF5GH.h @@ -19,11 +19,8 @@ typedef struct /* how often to output */ int out_every; - /* array of variable output requests */ - /* FIXME: make this a linked list of requests - to allow for multiple requests per variable - (eg. with different hyperslab parameters) */ - ioSlab **slablist; + /* I/O request description list (for all CCTK variables) */ + ioRequest **requests; /* the last iteration output */ int *out_last; -- cgit v1.2.3