From c35631fa075f904d4a9968c66628e82904ad1a59 Mon Sep 17 00:00:00 2001 From: tradke Date: Fri, 20 Feb 2004 18:16:02 +0000 Subject: Writing attributes was broken. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5/trunk@180 4825ed28-b72c-4eae-9704-e50c059e567d --- doc/CreateIOHDF5datafile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); -- cgit v1.2.3