aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ParseVars.c2
-rw-r--r--src/ioHDF5UtilGH.h15
2 files changed, 14 insertions, 3 deletions
diff --git a/src/ParseVars.c b/src/ParseVars.c
index 202b09d..89d74e0 100644
--- a/src/ParseVars.c
+++ b/src/ParseVars.c
@@ -346,7 +346,9 @@ static ioHDF5Geo_t *IOHDF5Util_DefaultIORequest (int vindex)
DECLARE_CCTK_PARAMETERS
int i;
ioHDF5Geo_t *request;
+#if 0
const char *argument, *token;
+#endif
/* allocate a new IO request structure */
diff --git a/src/ioHDF5UtilGH.h b/src/ioHDF5UtilGH.h
index 073e400..a5d1a16 100644
--- a/src/ioHDF5UtilGH.h
+++ b/src/ioHDF5UtilGH.h
@@ -38,13 +38,19 @@
{ \
int len; \
hid_t attr; \
- void *val = value; \
+ /* this union is only there to fix a bug in the HDF5 API */ \
+ union \
+ { \
+ const void *const_val; \
+ void *non_const_val; \
+ } v; \
hsize_t arrayDim = dim; \
\
\
+ v.const_val = value; \
if (H5Tget_class (datatype) == H5T_STRING) \
{ \
- len = strlen ((char *) val); \
+ len = strlen ((const char *) v.const_val); \
if (len == 0) /* HDF5 doesn't like zero-len strings */ \
{ \
len++; \
@@ -58,7 +64,7 @@
} \
IOHDF5_ERROR (attr = H5Acreate (dataset, name, datatype, \
dataspace, H5P_DEFAULT)); \
- IOHDF5_ERROR (H5Awrite (attr, datatype, val)); \
+ IOHDF5_ERROR (H5Awrite (attr, datatype, v.non_const_val)); \
IOHDF5_ERROR (H5Aclose (attr)); \
} while (0);
@@ -154,6 +160,9 @@ typedef struct
int ioproc; /* the associated IO processor */
int ioproc_every; /* how many IO processors there are */
int unchunked; /* whether data was written chunked or unchunked */
+ int has_version; /* whether file contains a Cactus version ID
+ (this is used to distinguish checkpoint files
+ with old/new timelevel naming scheme) */
} fileinfo_t;