aboutsummaryrefslogtreecommitdiff
path: root/src/DumpVar.c
diff options
context:
space:
mode:
authortradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>1999-10-30 03:35:41 +0000
committertradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>1999-10-30 03:35:41 +0000
commit79e3e409e5ae88a89f389e4f180a185f34974e3c (patch)
tree555c7bb9a7225659753c684223b31ff46c80b9c3 /src/DumpVar.c
parent07bfa6ab7f02f5db6ca444ad36683b4d4cf72bf7 (diff)
Output only timing info from GetrUsage, and only if it is available.
This is hard-coded for the moment as #ifdef HAVE_TIME_GETTIMEOFDAY. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@66 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/DumpVar.c')
-rw-r--r--src/DumpVar.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/src/DumpVar.c b/src/DumpVar.c
index b47fe01..ad423b4 100644
--- a/src/DumpVar.c
+++ b/src/DumpVar.c
@@ -57,7 +57,7 @@ void IOFlexIO_eachProcDump (cGH *GH, int index, int timelevel, void *outme,
CCTK_INT4 bnd [9], IOFile iof, int ioflex_type);
void IOFlexIO_procDump (IOFile iof, cGH *GH, int index, void *outme,
CCTK_INT4 bnd [9], int ioflex_type);
-void IOFlexIO_AddChunkAttributes (cGH *GH, int index, CCTK_INT4 chunk_origin [3],
+void IOFlexIO_AddChunkAttributes (cGH *GH, int index, CCTK_INT4 bnd [9],
IOFile iof);
void IOFlexIO_AddCommonAttributes (cGH *GH, int index, int timelevel,
CCTK_INT4 gsz [3], IOFile iof);
@@ -611,8 +611,8 @@ void IOFlexIO_AddCommonAttributes (cGH *GH, int index, int timelevel,
@endhistory
@@*/
-void IOFlexIO_AddChunkAttributes (cGH *GH, int index, CCTK_INT4 chunk_origin [3],
- IOFile iof)
+void IOFlexIO_AddChunkAttributes (cGH *GH, int index, CCTK_INT4 bnd [9],
+ IOFile iof)
{
char *name;
CCTK_INT4 i_to_IO;
@@ -622,7 +622,11 @@ void IOFlexIO_AddChunkAttributes (cGH *GH, int index, CCTK_INT4 chunk_origin [3]
return;
CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "chunk_origin", FLEXIO_INT4,
- 3, chunk_origin));
+ 3, &bnd [0]));
+ CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "subchunk_lb", FLEXIO_INT4,
+ 3, &bnd [0]));
+ CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "global_size", FLEXIO_INT4,
+ 3, &bnd [6]));
i_to_IO = GH->cctk_iteration;
CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "chunk_dataset", FLEXIO_INT4,
@@ -631,6 +635,8 @@ void IOFlexIO_AddChunkAttributes (cGH *GH, int index, CCTK_INT4 chunk_origin [3]
name = CCTK_FullName (index);
CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "name", FLEXIO_CHAR,
strlen (name)+1, name));
+ free (name);
+
}
@@ -874,14 +880,7 @@ void IOFlexIO_eachProcDump (cGH *GH, int index, int timelevel, void *outme,
/* Add attributes for global space */
IOFlexIO_AddCommonAttributes (GH, index, timelevel, &bnd [6], iof);
- /* Add chunk attributes ... lower bound of this chunk and
- * number of processors participating.
- */
- CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "subchunk_lb", FLEXIO_INT4,
- 3, &bnd [0]));
- CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "global_size", FLEXIO_INT4,
- 3, &bnd [6]));
-
+ /* Add chunk attributes */
IOFlexIO_AddChunkAttributes (GH, index, bnd, iof);
}
@@ -927,12 +926,5 @@ void IOFlexIO_procDump (IOFile iof, cGH *GH, int index, void *outme,
/* Write chunk attributes */
IOFlexIO_AddChunkAttributes (GH, index, bnd, iof);
- /* Add chunk attributes ... lower bound of this chunk and
- * number of processors participating.
- */
- CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "subchunk_lb", FLEXIO_INT4,
- 3, &bnd [0]));
- CACTUS_IEEEIO_ERROR (IOwriteAttribute (iof, "global_size", FLEXIO_INT4,
- 3, &bnd [6]));
}
}