diff --git a/Grid/serialisation/Hdf5IO.h b/Grid/serialisation/Hdf5IO.h index ec26612a..4b783a73 100644 --- a/Grid/serialisation/Hdf5IO.h +++ b/Grid/serialisation/Hdf5IO.h @@ -123,9 +123,11 @@ namespace Grid if (flatx.size() > dataSetThres_) { - H5NS::DataSet dataSet; + H5NS::DataSet dataSet; + H5NS::DSetCreatPropList plist; - dataSet = group_.createDataSet(s, Hdf5Type::type(), dataSpace); + plist.setFletcher32(); + dataSet = group_.createDataSet(s, Hdf5Type::type(), dataSpace, plist); dataSet.write(flatx.data(), Hdf5Type::type()); } else diff --git a/Hadrons/A2AMatrix.hpp b/Hadrons/A2AMatrix.hpp index e224a95e..ed2f5d36 100644 --- a/Hadrons/A2AMatrix.hpp +++ b/Hadrons/A2AMatrix.hpp @@ -442,6 +442,7 @@ void A2AMatrixIo::initFile(const MetadataType &d, const unsigned int chunkSiz push(reader, dataname_); auto &group = reader.getGroup(); plist.setChunk(chunk.size(), chunk.data()); + plist.setFletcher32(); dataset = group.createDataSet(HADRONS_A2AM_NAME, Hdf5Type::type(), dataspace, plist); #else HADRONS_ERROR(Implementation, "all-to-all matrix I/O needs HDF5 library"); @@ -502,14 +503,12 @@ void A2AMatrixIo::load(Vec &v, double *tRead) H5NS::DataSet dataset; H5NS::DataSpace dataspace; H5NS::CompType datatype; - H5NS::DSetCreatPropList plist; push(reader, dataname_); auto &group = reader.getGroup(); dataset = group.openDataSet(HADRONS_A2AM_NAME); datatype = dataset.getCompType(); dataspace = dataset.getSpace(); - plist = dataset.getCreatePlist(); hdim.resize(dataspace.getSimpleExtentNdims()); dataspace.getSimpleExtentDims(hdim.data()); if ((nt_*ni_*nj_ != 0) and