Skip to content

Commit

Permalink
readd macos and ubuntu testing
Browse files Browse the repository at this point in the history
  • Loading branch information
stephprince committed Sep 17, 2024
1 parent 2823003 commit 2db849f
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/hdf5/HDF5IO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,14 @@ Status HDF5IO::createReferenceDataSet(
delete[] rdata;

herr_t dsetStatus = H5Dclose(dset);
if (checkStatus(dsetStatus) == Status::Failure) {
return Status::Failure;
}

herr_t spaceStatus = H5Sclose(space);
if (checkStatus(spaceStatus) == Status::Failure) {
return Status::Failure;
}

return checkStatus(writeStatus);
}
Expand Down Expand Up @@ -639,20 +646,19 @@ HDF5RecordingData::HDF5RecordingData(std::unique_ptr<H5::DataSet> data)
DataSpace dSpace = data->getSpace();
DSetCreatPropList prop = data->getCreatePlist();

int nDimensions = dSpace.getSimpleExtentNdims();
std::vector<hsize_t> dims(nDimensions), chunk(nDimensions);
this->nDimensions = dSpace.getSimpleExtentNdims();
std::vector<hsize_t> dims(this->nDimensions), chunk(this->nDimensions);

nDimensions = dSpace.getSimpleExtentDims(
dims.data()); // TODO -redefine here or use original?
prop.getChunk(static_cast<int>(nDimensions), chunk.data());
prop.getChunk(static_cast<int>(this->nDimensions), chunk.data());

this->size = std::vector<SizeType>(nDimensions);
for (int i = 0; i < nDimensions; ++i) {
this->size = std::vector<SizeType>(this->nDimensions);
for (int i = 0; i < this->nDimensions; ++i) {
this->size[i] = dims[i];
}
this->nDimensions = nDimensions;
this->position = std::vector<SizeType>(
nDimensions, 0); // Initialize position with 0 for each dimension
this->nDimensions, 0); // Initialize position with 0 for each dimension
this->dSet = std::make_unique<H5::DataSet>(*data);
}

Expand Down

0 comments on commit 2db849f

Please sign in to comment.