diff options
author | Roland Haas <roland.haas@physics.gatech.edu> | 2012-10-23 20:46:00 -0700 |
---|---|---|
committer | Roland Haas <roland.haas@physics.gatech.edu> | 2012-10-24 15:51:00 -0700 |
commit | 05587a51734724536c183c9929967ecf3c2c0072 (patch) | |
tree | a700e76ec34a851ac8c5fd15f92fcb7d3302ade7 /Carpet/CarpetIOHDF5/src/Output.cc | |
parent | 64d348d6faa47163a0be9f400206c61523e5ae4f (diff) |
CarpetIOHDF5: close all HDF5 objects when output file is closed
also garbage collect HDF5 at each H5close
Diffstat (limited to 'Carpet/CarpetIOHDF5/src/Output.cc')
-rw-r--r-- | Carpet/CarpetIOHDF5/src/Output.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Carpet/CarpetIOHDF5/src/Output.cc b/Carpet/CarpetIOHDF5/src/Output.cc index 44f9df478..7288c9bc2 100644 --- a/Carpet/CarpetIOHDF5/src/Output.cc +++ b/Carpet/CarpetIOHDF5/src/Output.cc @@ -68,6 +68,7 @@ int WriteVarUnchunked (const cGH* const cctkGH, hid_t plist; HDF5_ERROR (plist = H5Pcreate (H5P_FILE_ACCESS)); HDF5_ERROR (H5Pset_fapl_core (plist, 0, 0)); + HDF5_ERROR (H5Pset_fclose_degree (plist, H5F_CLOSE_STRONG)); // Traverse all maps BEGIN_MAP_LOOP (cctkGH, group.grouptype) { @@ -135,6 +136,7 @@ int WriteVarUnchunked (const cGH* const cctkGH, // than recombining an HDF5 dataset on a disk file. HDF5_ERROR (memfile = H5Fcreate ("tempfile", H5F_ACC_EXCL, H5P_DEFAULT, plist)); + HDF5_ERROR (H5Pclose (plist)); HDF5_ERROR (dataspace = H5Screate_simple (group.dim, shape, NULL)); HDF5_ERROR (memdataset = H5Dcreate (memfile, datasetname.str().c_str(), filedatatype, dataspace, H5P_DEFAULT)); |