View Full Version : H5 IsGroup function?

11-01-2010, 07:23 AM
I am working with the HDF5 functions and having trouble. First, the link provided in the PV-WAVE help manual is dead:

All of the datatypes (H5T_NATIVE_INT, and so on) and flag arguments
(H5F_ACC_RDWR, and so on) for the HDF5 routines are used in the
PV-WAVE HDF5 routines exactly as they are shown in the NCSA HDF5
Reference Manual (http://hdf.ncsa.uiuc.edu/HDF5/doc/RM_H5Front.html).

Where can I find this doc now?

Also, although I can create a group within an .h5 file, I haven't found a way to check if it already exists before creating it. There is no H5G_is_group function or the like. What is the proper way for determining if a name exists as a group?

11-01-2010, 02:35 PM
Hi Hcrisp, Shortly after releasing our HDF packages, the official HDF documentation website changed. Please find the new link below. In recent versions of PV-WAVE we have been distributing this documentation.


You are correct, there is no H5G_is_group function. The documentation for H5Gopen states that it returns a negative value if the open is unsuccessful. I believe you can trap for this as a means for testing if it is a group.



11-01-2010, 02:38 PM
I found it. There is a function not listed in the PV-WAVE 9.0 Reference Guide (PDF) which you must use. First call H5Gget_num_objs to get the number of groups below the parent, then loop each one and call H5Gget_objname_by_idx to get the names. Once you have the list of names you can check if the specifiied group exists already or not.

H5Gopen gives you errors if you try to open a group which is not there.

12-01-2010, 02:12 PM
There is no H5Pset_shuffle procedure, even though it is listed in the HDF5 User's Guide. I take it that this is because of this note in the PV-WAVE Reference Guide:
"PV-WAVE generally does not support any HDF5 routines that allow users to specify/register their own functions via function pointer arguments. These include conversion routines, filters, memory managers, iteration routines, and so on." The shuffle feature is apparently a filter, and when it is applied to a dataset immediately prior to the use of a compression filter, the compression ratio achieved is often superior to that achieved by the use of a compression filter without the shuffle filter. Is there no other way to turn on shuffling?

03-29-2011, 10:02 AM
I recently tried running my HDF5 code under the older version of PV-WAVE 8.00 and got the error "Variable is undefined: H5GGET_NUM_OBJS". This is because the HDF library in 8.00 (hdf5-1_44) did not yet have this function. Our newer version 9.01 (hdf5-1_62) does, although it is not in the WAVE documentation.

Can you provide me a list of the WAVE changes between hdf5-1_44 and hdf5-1_62? Can you also update the WAVE documentation to reflect these changes? Thank you.