mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
checksummed HDF5 IO
This commit is contained in:
parent
c7f33ca2a8
commit
a4c55406ed
@ -124,8 +124,10 @@ namespace Grid
|
||||
if (flatx.size() > dataSetThres_)
|
||||
{
|
||||
H5NS::DataSet dataSet;
|
||||
H5NS::DSetCreatPropList plist;
|
||||
|
||||
dataSet = group_.createDataSet(s, Hdf5Type<Element>::type(), dataSpace);
|
||||
plist.setFletcher32();
|
||||
dataSet = group_.createDataSet(s, Hdf5Type<Element>::type(), dataSpace, plist);
|
||||
dataSet.write(flatx.data(), Hdf5Type<Element>::type());
|
||||
}
|
||||
else
|
||||
|
@ -442,6 +442,7 @@ void A2AMatrixIo<T>::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<T>::type(), dataspace, plist);
|
||||
#else
|
||||
HADRONS_ERROR(Implementation, "all-to-all matrix I/O needs HDF5 library");
|
||||
@ -502,14 +503,12 @@ void A2AMatrixIo<T>::load(Vec<VecT> &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
|
||||
|
Loading…
Reference in New Issue
Block a user