aboutsummaryrefslogtreecommitdiff
path: root/src/DumpVar.c
diff options
context:
space:
mode:
authortradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2000-04-18 12:56:25 +0000
committertradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2000-04-18 12:56:25 +0000
commitee28234767b04fb1cbd05c95378bc8f440ebd8a5 (patch)
tree7bef127550ed3f3b28addc79e0b2d0ab8298d798 /src/DumpVar.c
parentb0ed0e3770c1dfad68bef66a4a01ec530fc32fa6 (diff)
Several things which I missed to commit individually but rather do it in
one go now: - checkpoint/recover parameters as a single string which could also be used for writing a parameter file - added routine to be scheduled at CCTK_RECOVER_PARAMETERS - automatically select the latest checkpoint file for recovery if IO::recover = "auto" was set - Use IOFlexIO::reuse_filehandles with a different meaning now: By default all IEEEIO output files are kept open all the time. This is the most efficient method for writing data. If you run out of system file handles you can enable this parameter then to use the pause/resume scheme of the IEEEIO lib. - automatically append data sets to already exisiting output files after restart from recovery; duplicate timesteps are **NOT** removed from the output files because IEEEIO lib cannot delete/overwrite individual data sets So the reader has to handle this, it should always choose the latest data set of a given timestep. - fixed rcsid warnings - use CCTK_Info() rather than printf() for giving verbose output git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@107 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/DumpVar.c')
-rw-r--r--src/DumpVar.c65
1 files changed, 37 insertions, 28 deletions
diff --git a/src/DumpVar.c b/src/DumpVar.c
index bbec141..30acc10 100644
--- a/src/DumpVar.c
+++ b/src/DumpVar.c
@@ -24,7 +24,6 @@
@version $Id$
@@*/
-static char *rcsid = "$Id$";
#include <stdio.h>
#include <stdlib.h>
@@ -41,6 +40,13 @@ static char *rcsid = "$Id$";
#define IOTAGBASE 20000 /* This may break on more than 2000 processors */
+/*#define IOFLEXIO_DEBUG 1 */
+
+/* the rcs ID and its dummy funtion to use it */
+static char *rcsid = "$Id$";
+CCTK_FILEVERSION (CactusPUGHIO_IOFlexIO_DumpVar_c);
+
+
/* info structure describing how to dump a given CCTK variable type */
typedef struct {
int flexio_type; /* the FLEXIO type to use */
@@ -357,10 +363,11 @@ static void IOFlexIO_DumpGA (cGH *GH, int index, int timelevel, IOFile iof,
/* DATA SEND */
CACTUS_MPI_ERROR (MPI_Send (outme, outgoing, info->mpi_type, ioUtilGH->ioproc,
2*myproc+IOTAGBASE, pughGH->PUGH_COMM_WORLD));
- if (verbose) {
- printf ("Sent %d data points\n", outgoing);
- fflush (stdout);
- }
+
+#ifdef IOFLEXIO_DEBUG
+ printf ("Sent %d data points\n", outgoing);
+ fflush (stdout);
+#endif
} else if (myproc == ioUtilGH->ioproc) {
@@ -748,9 +755,10 @@ static void IOFlexIO_getDumpData (cGH *GH, int index, int timelevel,
}
if (verbose)
- printf ("Downsampled sizes (%d, %d, %d) -> (%d, %d, %d)\n",
- extras->nsize [0], extras->nsize [1], extras->nsize [2],
- (int) geom [6], (int) geom [7], (int) geom [8]);
+ CCTK_VInfo (CCTK_THORNSTRING, "Downsampled sizes (%d, %d, %d) -> "
+ "(%d, %d, %d)",
+ extras->nsize [0], extras->nsize [1], extras->nsize [2],
+ (int) geom [6], (int) geom [7], (int) geom [8]);
/* Now figure out the local downsampling */
/* The local starts are the lb modded into the downsample */
@@ -769,12 +777,13 @@ static void IOFlexIO_getDumpData (cGH *GH, int index, int timelevel,
}
if (verbose) {
- printf ("Downsample ranges (%d, %d, %d) -> (%d, %d, %d)\n",
- start [0], start [1], start [2],
- end [0], end [1], end [2]);
- printf ("Local size/bound (%d, %d, %d) (%d, %d, %d)\n",
- (int) geom [3], (int) geom [4], (int) geom [5],
- (int) geom [0], (int) geom [1], (int) geom [2]);
+ CCTK_VInfo (CCTK_THORNSTRING, "Downsample ranges (%d, %d, %d) -> "
+ "(%d, %d, %d)", start [0], start [1], start [2],
+ end [0], end [1], end [2]);
+ CCTK_VInfo (CCTK_THORNSTRING, "Local size/bound (%d, %d, %d) "
+ "(%d, %d, %d)",
+ (int) geom [3], (int) geom [4], (int) geom [5],
+ (int) geom [0], (int) geom [1], (int) geom [2]);
}
/* compute local ranges */
@@ -849,20 +858,20 @@ static void IOFlexIO_getDumpData (cGH *GH, int index, int timelevel,
}
}
- if (verbose) {
- printf ("Lower bound: %d", (int) geom [0]);
- for (i = 1; i < dim; i++)
- printf (" %d", (int) geom [i]);
- printf ("\n");
- printf ("Chunk size : %d", (int) geom [1*dim + 0]);
- for (i = 1; i < dim; i++)
- printf (" %d", (int) geom [1*dim + i]);
- printf ("\n");
- printf ("Global size: %d", (int) geom [2*dim + 0]);
- for (i = 1; i < dim; i++)
- printf (" %d", (int) geom [2*dim + i]);
- printf ("\n");
- }
+#ifdef IOFLEXIO_DEBUG
+ printf ("Lower bound: %d", (int) geom [0]);
+ for (i = 1; i < dim; i++)
+ printf (" %d", (int) geom [i]);
+ printf ("\n");
+ printf ("Chunk size : %d", (int) geom [1*dim + 0]);
+ for (i = 1; i < dim; i++)
+ printf (" %d", (int) geom [1*dim + i]);
+ printf ("\n");
+ printf ("Global size: %d", (int) geom [2*dim + 0]);
+ for (i = 1; i < dim; i++)
+ printf (" %d", (int) geom [2*dim + i]);
+ printf ("\n");
+#endif
}