I’m wondering if it is possible to dynamically change the File Access Property List after a file has been opened.
My ultimate goal is to enable changes in the H5Pget_alignment/set_property property after a file has been created.
I would like to make sure my data is aligned at specific boundaries (1024 bytes, or 4096 bytes), but it would be preferrable, for legacy reasons, to not change the original open subroutine of the existing code-base.
I don’t see how that would work: by definition the file is opened according the state of this property list, implying cause and effect. On the posted forum you already have a solution with the relevant source code section a copy is made of the FAPL before using it.
Generally speaking, aligned reads and writes can be faster for data that works with PCIe connected hardware (GPU, NVMe).
For the usecase I have, extending this property to netcdf, the question came up when we were trying to find a way to expose this API to the netcdf4 library.
The current state of the netcdf4 library does not have additional parameters it can send to the hdf5 library at creation time. Adding them may introduce backward incompatibility. Maintainers and developers of the library asked me to triple check that with HDF5, the alignment had to be set at open time. Thank you for confirming.
Personally, it seems like a strange constraint to not be able to change it dynamically, but I understand sometimes it is easier to assume certain things don’t change.