I’m trying to determine all open objects using
h5fget_obj_count_f (HDF5 1.12.1). Within HDF5 source (
H5_ff.f90) this is accomplished as
CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, H5OPEN_NUM_OBJ_LOC, error).
The problem is that the returned value
H5OPEN_NUM_OBJ_LOC is a function of how many times
h5open_f is called. If you call
h5open_f once, then call
h5fget_obj_count_f, you’ll get a different
H5OPEN_NUM_OBJ_LOC than if you call
h5open_f two, three, or four times (regardless of whether or not
h5close_f is called).
Additionally, any other flag besides
CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_GROUP_F, H5OPEN_NUM_OBJ_LOC, error) will return nonsense, regardless of how many times
h5open_f is called.
h5fget_obj_count_f not the correct way of finding all open objects in an HDF5 under Fortran, or is
h5fget_obj_count_f just completely broken?