Skip to content

Commit

Permalink
debug hdf5 stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed Feb 5, 2025
1 parent e790c4f commit bbcf36c
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions src/tensor_outputs/XDMFTensorOutput.C
Original file line number Diff line number Diff line change
Expand Up @@ -280,32 +280,37 @@ addDataToHDF5(const std::string & filename,
// Create a new dataset
dataspace_id = H5Screate_simple(dims.size(), dims.data(), nullptr);
if (dataspace_id < 0)
{
H5Eprint(H5E_DEFAULT, stderr);
mooseError("Error creating dataspace");
}

plist_id = H5Pcreate(H5P_DATASET_CREATE);
if (plist_id < 0)
{
H5Eprint(H5E_DEFAULT, stderr);
mooseError("Error creating property list");
}

status = H5Pset_chunk(plist_id, dims.size(), dims.data());
if (status < 0)
{
H5Eprint(H5E_DEFAULT, stderr);
mooseError("Error setting chunking");
}

H5Pset_deflate(plist_id, 9);

dataset_id = H5Dcreate(
file_id, dataset_name.c_str(), type, dataspace_id, H5P_DEFAULT, plist_id, H5P_DEFAULT);
if (dataset_id < 0)
{
H5Eprint(H5E_DEFAULT, stderr);
mooseInfo(dataset_id,
' ',
file_id,
' ',
dataset_name.c_str(),
' ',
type,
' ',
dataspace_id,
' ',
H5P_DEFAULT,
' ',
plist_id,
' ',
H5P_DEFAULT);
mooseError("Error creating dataset");
}

Expand Down

0 comments on commit bbcf36c

Please # to comment.