In this section I'm going to show you how to create desired property lists and how to pass them to functions. The procedure is fairly simple and consists of two steps basically:
hid_t create_plist; hid_t file_id; [...] create_plist = H5Pcreate(H5P_FILE_CREATE); H5Pset_sizes(create_plist, 8, 8); file_id = H5Fcreate("test.h5", H5F_ACC_TRUNC, create_plist, H5P_DEFAULT); [...] H5Fclose(file_id);Here we create the default property list with
H5Pcreate, which is invoked with the
H5P_FILE_CREATEspecifier, first, and then modify the list by calling function H5Pset_sizes, which takes the property list identifier as its first argument, byte-size of object offsets as its second argument and byte-size of object lengths as its third argument. Once we have the list to our liking, we can use it in the call to
It is OK to call more than one list modification function, if you need more features, of course.
In the next couple of sub-sections, I am going to discuss various examples of using property lists, as applied to accessing files, creating datasets and then writing and reading them. MPI-IO/HDF5 examples will be shown here too.