diff options
author | tradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d> | 2004-02-20 18:16:02 +0000 |
---|---|---|
committer | tradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d> | 2004-02-20 18:16:02 +0000 |
commit | c35631fa075f904d4a9968c66628e82904ad1a59 (patch) | |
tree | fb7d2a15f18d8ae1b191bdea97020cdfb1d6c9ba | |
parent | f2af0bf9d3785adb6c8daada83c89a18fa22bacf (diff) |
Writing attributes was broken.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5/trunk@180 4825ed28-b72c-4eae-9704-e50c059e567d
-rw-r--r-- | doc/CreateIOHDF5datafile.c | 3 |
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)); |