diff options
author | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2001-04-19 21:15:37 +0000 |
---|---|---|
committer | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2001-04-19 21:15:37 +0000 |
commit | 9b2ec1c54bcc430a3a726f8553cfe677bbf2a1ff (patch) | |
tree | 633deb0fbd75d17553bb1964a8fd9800f493a8be /src | |
parent | d18b858c0be9b0ff2a68db8271a2f04be9d3a46e (diff) |
Turn HDF5 automatic error printing off while checking if a 'Cactus version'
attribute exists in a checkpoint file.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@26 7842ec3a-9562-4be5-9c5b-06ba18f2b668
Diffstat (limited to 'src')
-rw-r--r-- | src/DumpVar.c | 13 | ||||
-rw-r--r-- | src/RecoverVar.c | 9 |
2 files changed, 16 insertions, 6 deletions
diff --git a/src/DumpVar.c b/src/DumpVar.c index 7ecf7e0..d6738f0 100644 --- a/src/DumpVar.c +++ b/src/DumpVar.c @@ -5,7 +5,8 @@ @desc Routines for writing variables into HDF5 data or checkpoint files. These routines are used by other HDF5 IO methods. - @enddesc + @enddesc + @version $Id$ @@*/ @@ -19,6 +20,10 @@ #include "ioHDF5UtilGH.h" +/* the rcs ID and its dummy function to use it */ +static char *rcsid = "$Id$"; +CCTK_FILEVERSION(BetaThorns_IOHDF5Util_DumpVar_c) + /* #define DEBUG_ME 1 */ #define IOTAGBASE 20000 /* This may break on more than 2000 processors */ @@ -404,10 +409,10 @@ static int IOHDF5Util_DumpGA (cGH *GH, void *outme; /* The data pointer to dump ... */ int free_outme; /* and whether it needs freeing */ int retval; +#ifdef CCTK_MPI void *tmpd; int incoming; int outgoing; -#ifdef CCTK_MPI int i, j; MPI_Status ms; #endif @@ -596,7 +601,7 @@ static int IOHDF5Util_getDumpData (cGH *GH, if (NewHyperslab_GetLocalHyperslab (GH, vindex, timelevel, request->sdim, cctk_output_type, NULL, request->origin, request->direction, request->length, - request->downsample, outme, + request->downsample, 0, outme, free_outme, hsizes, hsizes_global, hsizes_offset) < 0) { fullname = CCTK_FullName (vindex); @@ -607,8 +612,6 @@ static int IOHDF5Util_getDumpData (cGH *GH, return (-1); } - *free_outme = 1; - for (i = 0; i < request->sdim; i++) { geom[i + 0*request->sdim] = hsizes_offset[i]; diff --git a/src/RecoverVar.c b/src/RecoverVar.c index ebe93fa..d2dfd6c 100644 --- a/src/RecoverVar.c +++ b/src/RecoverVar.c @@ -180,6 +180,8 @@ int IOHDF5Util_RecoverGHextensions (cGH *GH, hid_t group, version_attr; CCTK_REAL4 real4Buffer; CCTK_INT4 int4Buffer[4]; + H5E_auto_t print_error_fn; + void *print_error_fn_arg; if (CCTK_MyProc (GH) == 0) @@ -198,8 +200,13 @@ int IOHDF5Util_RecoverGHextensions (cGH *GH, READ_ATTRIBUTE (group, "main_loop_index", IOHDF5_INT4, &int4Buffer[2]); READ_ATTRIBUTE (group, "cctk_time", IOHDF5_REAL4, &real4Buffer); - /* check if there exists a version attribute */ + /* check if there exists a version attribute + For this we temporarily turn off automatic error printing. */ + IOHDF5_ERROR (H5Eget_auto (&print_error_fn, &print_error_fn_arg)); + IOHDF5_ERROR (H5Eset_auto (NULL, NULL)); version_attr = H5Aopen_name (group, "Cactus version"); + IOHDF5_ERROR (H5Eset_auto (print_error_fn, print_error_fn_arg)); + int4Buffer[3] = version_attr >= 0; if (int4Buffer[3]) { |