mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4534 from akva2/disable_hdf5_compression_old_versions
changed: disable HDF5 compression with hdf5 <= 1.8
This commit is contained in:
@@ -276,14 +276,16 @@ void HDF5File::writeRootOnly(hid_t grp,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hid_t HDF5File::getCompression(hsize_t size) const
|
hid_t HDF5File::getCompression([[maybe_unused]] hsize_t size) const
|
||||||
{
|
{
|
||||||
hid_t dcpl = H5P_DEFAULT;
|
hid_t dcpl = H5P_DEFAULT;
|
||||||
|
#if H5_VERS_MINOR > 8
|
||||||
if (H5Zfilter_avail(H5Z_FILTER_DEFLATE)) {
|
if (H5Zfilter_avail(H5Z_FILTER_DEFLATE)) {
|
||||||
dcpl = H5Pcreate(H5P_DATASET_CREATE);
|
dcpl = H5Pcreate(H5P_DATASET_CREATE);
|
||||||
H5Pset_deflate(dcpl, 1);
|
H5Pset_deflate(dcpl, 1);
|
||||||
H5Pset_chunk(dcpl, 1, &size);
|
H5Pset_chunk(dcpl, 1, &size);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return dcpl;
|
return dcpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user