H5Pset_file_space_strategy leads to IO error

Hello,

I am experiencing an issue when trying to change to default file space management strategy. What I would like to do is to track free space between opening and closing of my files and thus re-using this free space more effectively. I try to achieve this by

// Prepare the file space management strategy
hbool_t persist = 1;
H5F_fspace_strategy_t fileSpaceType = H5F_FSPACE_STRATEGY_FSM_AGGR;
hid_t fileCreationPropertyListIdentifier = H5Pcreate(H5P_FILE_CREATE);
H5Pset_file_space_strategy( fileCreationPropertyListIdentifier,
fileSpaceType, persist, H5P_DEFAULT);

fp = H5Fcreate(fname, facc, fileCreationPropertyListIdentifier, H5P_DEFAULT);

I have tested this and the free space is tracked and re-used, just like expected. So far, so good. The problem appears when I try to open my result files. When I use HDFView 2.11, I get the error message

java.io.IOException: Failed to open file

and when I try to open the files with command line tools, I get errors like

h5dump error: unable to open file.

I get this error even when I choose the default file space management strategy ( fileSpaceType = H5F_FSPACE_STRATEGY_AGGR, persist = 0 ). Has someone experienced the same issue or maybe noticed something I do wrong in the code above?

Thanks for taking your time to help. With kind regards,
Niklas

Niklas, can you tell us something about the HDF5 versions involved? H5Pset_file_space_strategy was introduced in HDF5 1.10.1 (I believe) and HDFView 2.11 is built against an HDF5 1.8 version. Please see also section 15 in this document https://portal.hdfgroup.org/display/HDF5/RFC+Paged+Aggregation .

Hello gheber, thank you for your reply. I have tried both HDF5 versions 1.10.1 and 1.10.5, the function H5Pset_file_space_strategy was indeed introduced in HDF 1.10.1.

It seems you have hit my problem spot-on: I can view my data with the newer version 3.1.0 of the HDFviewer just fine. Thanks a lot for the help!

Niklas