Open
Description
Describe the bug
The attributes are not stored in the dense storage if the header version is less than H5O_VERSION_2
, which it is by default. Creating the large attribute will cause an error, even if the dense storage was chosen. This is the minimal example to reproduce the bug.
#include "hdf5.h"
int main(void)
{
hid_t props, file, space, attr;
hsize_t dims[1] = {1000000ul};
props = H5Pcreate(H5P_FILE_CREATE);
H5Pset_attr_phase_change(props, 0, 0);
file = H5Fcreate("test.h5", H5F_ACC_TRUNC, props, H5P_DEFAULT);
space = H5Screate_simple(1, dims, NULL);
attr = H5Acreate2(file, "test", H5T_NATIVE_INT, space, H5P_DEFAULT, H5P_DEFAULT);
return 0;
}
To workaround this bug and force the header version to H5O_VERSION_2
, one could enable creation order tracking by calling
H5Pset_attr_creation_order(props, H5P_CRT_ORDER_TRACKED);
but this behaviour is undocumented and unintuitive.
Expected behavior
Attribute should be written to the dense storage even without creation order tracking.
Platform (please complete the following information)
- HDF5 version 1.12.1, but also tested with upstream 562c53c
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Scheduled/On-Deck