aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2002-05-06 09:22:43 +0000
committertradke <tradke@0888f3d4-9f52-45d2-93bc-d00801ff5e46>2002-05-06 09:22:43 +0000
commit6fdc9aa98ad8bf864590189506e7675b0540b406 (patch)
treee14d76c8ec6b60e304cd9441895adcc2c1cce4d8 /src
parent8fe0009843ec7ceb65c190156ce229b841edba9e (diff)
Parameter names changes as announced in today's mail to users@cactuscode.org.
You must also update thorns IOHDF5Util and IOUtil now. This thorn will be moved from BetaThorns to CactusPUGHIO now. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOStreamedHDF5/trunk@84 0888f3d4-9f52-45d2-93bc-d00801ff5e46
Diffstat (limited to 'src')
-rw-r--r--src/DumpGH.c14
-rw-r--r--src/Output.c51
-rw-r--r--src/RecoverGH.c16
-rw-r--r--src/Startup.c4
-rw-r--r--src/Write.c10
-rw-r--r--src/ioStreamedHDF5GH.h2
6 files changed, 37 insertions, 60 deletions
diff --git a/src/DumpGH.c b/src/DumpGH.c
index dcec1a4..b75ed6b 100644
--- a/src/DumpGH.c
+++ b/src/DumpGH.c
@@ -17,7 +17,7 @@
#include "CactusBase/IOUtil/src/ioGH.h"
#include "CactusPUGH/PUGH/src/include/pugh.h"
#include "CactusBase/IOUtil/src/ioutil_CheckpointRecovery.h"
-#include "BetaThorns/IOHDF5Util/src/ioHDF5UtilGH.h"
+#include "CactusPUGHIO/IOHDF5Util/src/ioHDF5UtilGH.h"
#include "ioStreamedHDF5GH.h"
#ifdef HAVE_SYS_TIME_H
@@ -31,8 +31,8 @@
#endif
/* the rcs ID and its dummy function to use it */
-static const char *rcsid = "$Id$";
-CCTK_FILEVERSION(BetaThorns_IOStreamedHDF5_DumpGH_c)
+static const char *rcsid = "$Header$";
+CCTK_FILEVERSION(CactusPUGHIO_IOStreamedHDF5_DumpGH_c)
/********************************************************************
@@ -104,7 +104,7 @@ void IOStreamedHDF5_EvolutionCheckpoint (const cGH *GH)
((checkpoint_every > 0 && GH->cctk_iteration % checkpoint_every == 0) ||
checkpoint_next))
{
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
CCTK_INFO("------------------------------------------------------------");
CCTK_VInfo (CCTK_THORNSTRING, "Dumping periodic checkpoint file at "
@@ -236,7 +236,7 @@ static int Checkpoint (const cGH *GH, int called_from)
/* now open the file */
if (CCTK_MyProc (GH) == ioUtilGH->ioproc && myGH->checkpoint_socket >= 0)
{
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
CCTK_VInfo (CCTK_THORNSTRING, "Creating checkpoint file");
}
@@ -273,7 +273,7 @@ static int Checkpoint (const cGH *GH, int called_from)
{
if (checkpoint_accept_timeout > 0)
{
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
CCTK_VInfo (CCTK_THORNSTRING, "Waiting %d seconds to send "
"checkpoint file to port %d",
@@ -287,7 +287,7 @@ static int Checkpoint (const cGH *GH, int called_from)
timeout.tv_usec = 0;
select (myGH->checkpoint_socket + 1, &readset, NULL, NULL, &timeout);
}
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
CCTK_VInfo (CCTK_THORNSTRING, "Closing checkpoint file on port %d",
checkpoint_port);
diff --git a/src/Output.c b/src/Output.c
index 15450c1..576b34f 100644
--- a/src/Output.c
+++ b/src/Output.c
@@ -17,8 +17,8 @@
#include "ioStreamedHDF5GH.h"
/* the rcs ID and its dummy function to use it */
-static const char *rcsid = "$Id$";
-CCTK_FILEVERSION(BetaThorns_IOStreamedHDF5_Output_c)
+static const char *rcsid = "$Header$";
+CCTK_FILEVERSION(CactusPUGHIO_IOStreamedHDF5_Output_c)
/********************************************************************
@@ -36,7 +36,7 @@ static void CheckSteerableParameters (const cGH *GH);
@enddesc
@calls IOStreamedHDF5_TimeFor
- IOStreamedHDF5_OutputVarAs
+ IOStreamedHDF5_Write
@var GH
@vdesc Pointer to CCTK GH
@@ -53,44 +53,21 @@ static void CheckSteerableParameters (const cGH *GH);
int IOStreamedHDF5_OutputGH (const cGH *GH)
{
int vindex, retval;
- ioStreamedHDF5GH *myGH;
- const char *name;
- char *fullname;
- DECLARE_CCTK_PARAMETERS
+ const ioStreamedHDF5GH *myGH;
- myGH = (ioStreamedHDF5GH *) CCTK_GHExtension (GH, "IOStreamedHDF5");
-
- CheckSteerableParameters (GH);
-
- if (myGH->out_every <= 0)
- {
- return (0);
- }
+ retval = 0;
+ myGH = (const ioStreamedHDF5GH *) CCTK_GHExtension (GH, "IOStreamedHDF5");
/* loop over all variables */
- for (vindex = retval = 0; vindex < CCTK_NumVars (); vindex++)
+ for (vindex = CCTK_NumVars () - 1; vindex >= 0; vindex--)
{
- if (IOStreamedHDF5_TimeFor (GH, vindex))
+ if (IOStreamedHDF5_TimeFor (GH, vindex) &&
+ IOStreamedHDF5_Write (GH, vindex, CCTK_VarName (vindex)) == 0)
{
- name = CCTK_VarName (vindex);
- fullname = CCTK_FullName (vindex);
-
- if (verbose)
- {
- CCTK_VInfo (CCTK_THORNSTRING, "IOStreamedHDF5_OutputGH: "
- "output of variable (fullname, name) = "
- "('%s', '%s')", fullname, name);
- }
-
- if (IOStreamedHDF5_OutputVarAs (GH, fullname, name) == 0)
- {
- /* register variable as having output this iteration */
- myGH->out_last[vindex] = GH->cctk_iteration;
- retval++;
- }
-
- free (fullname);
+ /* register variable as having output this iteration */
+ myGH->out_last[vindex] = GH->cctk_iteration;
+ retval++;
}
}
@@ -140,7 +117,7 @@ int IOStreamedHDF5_OutputVarAs (const cGH *GH, const char *fullname,
vindex = CCTK_VarIndex (fullname);
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
CCTK_VInfo (CCTK_THORNSTRING, "IOStreamedHDF5_OutputVarAs: "
"output of variable (fullname, alias) = "
@@ -253,7 +230,7 @@ int IOStreamedHDF5_TriggerOutput (const cGH *GH, int vindex)
myGH = (ioStreamedHDF5GH *) CCTK_GHExtension (GH, "IOStreamedHDF5");
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
fullname = CCTK_FullName (vindex);
CCTK_VInfo (CCTK_THORNSTRING, "IOStreamedHDF5_TriggerOutput: "
diff --git a/src/RecoverGH.c b/src/RecoverGH.c
index d1339f3..2007672 100644
--- a/src/RecoverGH.c
+++ b/src/RecoverGH.c
@@ -24,8 +24,8 @@
#include "ioStreamedHDF5GH.h"
/* the rcs ID and its dummy function to use it */
-static const char *rcsid = "$Id$";
-CCTK_FILEVERSION(BetaThorns_IOStreamedHDF5_RecoverGH_c)
+static const char *rcsid = "$Header$";
+CCTK_FILEVERSION(CactusPUGHIO_IOStreamedHDF5_RecoverGH_c)
/********************************************************************
@@ -130,7 +130,7 @@ int IOStreamedHDF5_Recover (cGH *GH, const char *basefilename, int called_from)
}
/* Recover variables */
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
CCTK_VInfo (CCTK_THORNSTRING, "Recovering %schunked data with ioproc %d, "
"ioproc_every %d", fileinfo.unchunked ? "un" : "",
@@ -141,7 +141,7 @@ int IOStreamedHDF5_Recover (cGH *GH, const char *basefilename, int called_from)
/* Recover GH extensions */
if (result == 0 && called_from == CP_RECOVER_DATA)
{
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
CCTK_INFO ("Recovering GH extensions");
}
@@ -151,7 +151,7 @@ int IOStreamedHDF5_Recover (cGH *GH, const char *basefilename, int called_from)
/* Close the file */
if (CCTK_MyProc (GH) == fileinfo.ioproc)
{
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
if (called_from == CP_RECOVER_DATA)
{
@@ -321,7 +321,7 @@ static int OpenFile (cGH *GH, const char *basefilename, int called_from,
if (myproc == 0)
{
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
CCTK_VInfo (CCTK_THORNSTRING, "Opening streamed HDF5 file from '%s'",
fileinfo->filename);
@@ -375,7 +375,7 @@ static int OpenFile (cGH *GH, const char *basefilename, int called_from,
if ((fileinfo->ioproc_every == nprocs && nprocs > 1) ||
fileinfo->unchunked)
{
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
CCTK_VInfo (CCTK_THORNSTRING, "Recovering from one %schunked file",
fileinfo->unchunked ? "un":"");
@@ -393,7 +393,7 @@ static int OpenFile (cGH *GH, const char *basefilename, int called_from,
}
else
{
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
CCTK_VInfo (CCTK_THORNSTRING, "Recovering from %d chunked files",
nprocs / fileinfo->ioproc_every +
diff --git a/src/Startup.c b/src/Startup.c
index d93d3af..4bed822 100644
--- a/src/Startup.c
+++ b/src/Startup.c
@@ -24,8 +24,8 @@
#endif
/* the rcs ID and its dummy function to use it */
-static const char *rcsid = "$Id$";
-CCTK_FILEVERSION(BetaThorns_IOStreamedHDF5_Startup_c)
+static const char *rcsid = "$Header$";
+CCTK_FILEVERSION(CactusPUGHIO_IOStreamedHDF5_Startup_c)
/********************************************************************
diff --git a/src/Write.c b/src/Write.c
index fd0f98b..303c6be 100644
--- a/src/Write.c
+++ b/src/Write.c
@@ -15,12 +15,12 @@
#include "cctk_Parameters.h"
#include "StoreNamedData.h"
#include "CactusBase/IOUtil/src/ioGH.h"
-#include "BetaThorns/IOHDF5Util/src/ioHDF5UtilGH.h"
+#include "CactusPUGHIO/IOHDF5Util/src/ioHDF5UtilGH.h"
#include "ioStreamedHDF5GH.h"
/* the rcs ID and its dummy function to use it */
-static const char *rcsid = "$Id$";
-CCTK_FILEVERSION(BetaThorns_IOStreamedHDF5_Write_c)
+static const char *rcsid = "$Header$";
+CCTK_FILEVERSION(CactusPUGHIO_IOStreamedHDF5_Write_c)
/*@@
@@ -99,7 +99,7 @@ int IOStreamedHDF5_Write (const cGH *GH, int vindex, const char *alias)
file = -1;
if (CCTK_MyProc (GH) == 0 && myGH->data_socket >= 0)
{
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
CCTK_VInfo (CCTK_THORNSTRING, "Opening HDF5 output file "
"on data output port %d", data_port);
@@ -130,7 +130,7 @@ int IOStreamedHDF5_Write (const cGH *GH, int vindex, const char *alias)
/* close the file */
if (file >= 0)
{
- if (verbose)
+ if (CCTK_Equals (verbose, "full"))
{
CCTK_INFO ("Closing HDF5 output file from this iteration");
}
diff --git a/src/ioStreamedHDF5GH.h b/src/ioStreamedHDF5GH.h
index 0f6ae79..f8dc2c7 100644
--- a/src/ioStreamedHDF5GH.h
+++ b/src/ioStreamedHDF5GH.h
@@ -10,7 +10,7 @@
#ifndef _IOSTREAMEDHDF5_IOSTREAMEDHDF5GH_H_
#define _IOSTREAMEDHDF5_IOSTREAMEDHDF5GH_H_
-#include "BetaThorns/IOHDF5Util/src/ioHDF5UtilGH.h"
+#include "CactusPUGHIO/IOHDF5Util/src/ioHDF5UtilGH.h"
/* IOStreamedHDF5 GH extension structure */