aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/CreateIOHDF5datafile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/CreateIOHDF5datafile.c b/doc/CreateIOHDF5datafile.c
index bb1275c..1f1db7a 100644
--- a/doc/CreateIOHDF5datafile.c
+++ b/doc/CreateIOHDF5datafile.c
@@ -135,7 +135,7 @@ int main (void)
/* the version of Cactus that this datafile is (upwards) compatible with */
CHECK_ERROR (H5Tset_size (stringtype, strlen (CACTUS_VERSION)));
- CHECK_ERROR (attr = H5Acreate (dataset, "Cactus version", stringtype,
+ CHECK_ERROR (attr = H5Acreate (group, "Cactus version", stringtype,
dataspace, H5P_DEFAULT));
CHECK_ERROR (H5Awrite (attr, stringtype, CACTUS_VERSION));
CHECK_ERROR (H5Aclose (attr));
@@ -176,6 +176,7 @@ int main (void)
/**************************************************************************/
/* the variable's group name (as specified in the interface.ccl file) */
groupname = "grid::coordinates";
+ CHECK_ERROR (dataspace = H5Screate (H5S_SCALAR));
CHECK_ERROR (H5Tset_size (stringtype, strlen (groupname)));
CHECK_ERROR (attr = H5Acreate (dataset, "groupname", stringtype,
dataspace, H5P_DEFAULT));