diff --git a/dune/fufem/hdf5/file.hh b/dune/fufem/hdf5/file.hh index c7c1b62e4ab4bc8c9b8241fbcaea5b7b4d4f603d..f31dc61f2ce5096f0daa4714e912d55b095b0e1a 100644 --- a/dune/fufem/hdf5/file.hh +++ b/dune/fufem/hdf5/file.hh @@ -38,14 +38,14 @@ public: : readOnly_(access == Access::READONLY) { struct stat buffer; - /* Use the latest HDF5 format. - Upside : We can use new features like SWMR. - Downside: Tools that make use of old HDF5 versions cannot read - the output. This should not be a problem in practice - since h5repack can be used to restore compatibility - with older versions if needed. */ + /* Use the latest HDF5 format (as opposed to: the latest format that supports + the set of features we use: H5F_LIBVER_EARLIEST) + Upside : Improvements in speed, file size + Downside: Output cannot be read by old tools/libraries + Remedy: h5repack and h5format_convert can restore compatibility. */ + H5F_libver_t const minimumVersion = H5F_LIBVER_LATEST; hid_t fapl = H5Pcreate(H5P_FILE_ACCESS); - H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST); + H5Pset_libver_bounds(fapl, minimumVersion, H5F_LIBVER_LATEST); bool const fileExists = stat(filename.c_str(), &buffer) == 0; bool const createFile = !fileExists;