Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5P_SET_FAPL_SPLIT

Emulates the old split file driver

Procedure:

 H5P_SET_FAPL_SPLIT ( fapl_id, meta_ext, meta_plist_id, raw_ext, raw_plist_id )

Signature:

herr_t H5Pset_fapl_split(
                     hid_t fapl_id,
                     const char *meta_ext,
                     hid_t meta_plist_id,
                     const char *raw_ext,
                     hid_t raw_plist_id
    )
  

Fortran90 Interface: h5pset_fapl_split_f
    
SUBROUTINE h5pset_fapl_split_f(prp_id, meta_ext, meta_plist, raw_ext, &
                               raw_plist, hdferr)
  IMPLICIT NONE
  INTEGER(HID_T),INTENT(IN)   :: prp_id     ! Property list identifier
  CHARACTER(LEN=*),INTENT(IN) :: meta_ext   ! Name of the extension for
                                            ! the metafile filename
  INTEGER(HID_T),INTENT(IN)   :: meta_plist ! Identifier of the meta file
                                            ! access property list
  CHARACTER(LEN=*),INTENT(IN) :: raw_ext    ! Name extension for the raw 
                                            ! file filename
  INTEGER(HID_T),INTENT(IN)   :: raw_plist  ! Identifier of the raw file
                                            ! access property list
  INTEGER, INTENT(OUT) :: hdferr            ! Error code
                                            ! 0 on success and -1 on failure
END SUBROUTINE h5pset_fapl_split_f
	

Parameters:
hid_t fapl_idIN: File access property list identifier
const char *meta_ext   
IN: Metadata filename extension
hid_t meta_plist_idIN: File access property list identifier for the metadata file
const char *raw_extIN: Raw data filename extension
hid_t raw_plist_idIN: File access property list identifier for the raw data file

Description:

H5P_SET_FAPL_SPLIT is a compatibility function that enables the multi-file driver to emulate the split driver from HDF5 Releases 1.0 and 1.2. The split file driver stored metadata and raw data in separate files but provided no mechanism for separating types of metadata.

fapl_id is a file access property list identifier.

meta_ext is the filename extension for the metadata file. The extension is appended to the name passed to H5FDopen, usually from H5F_CREATE or H5F_OPEN, to form the name of the metadata file. If the string %s is used in the extension, it works like the name generator as in H5P_SET_FAPL_MULTI.

meta_plist_id is the file access property list identifier for the metadata file.

raw_ext is the filename extension for the raw data file. The extension is appended to the name passed to H5FDopen, usually from H5F_CREATE or H5F_OPEN, to form the name of the raw data file. If the string %s is used in the extension, it works like the name generator as in H5P_SET_FAPL_MULTI.

raw_plist_id is the file access property list identifier for the raw data file.

If a user wishes to check to see whether this driver is in use, the user must call H5P_GET_DRIVER and compare the returned value to the string H5FD_MULTI. A positive match will confirm that the multi driver is in use; HDF5 provides no mechanism to determine whether it was called as the special case invoked by H5P_SET_FAPL_SPLIT.

Returns:

Returns a non-negative value if successful. Otherwise returns a negative value.

Example:
/* Example 1: Both metadata and rawdata files are in the same  */
/*    directory.   Use Station1-m.h5 and Station1-r.h5 as      */
/*    the metadata and rawdata files.                          */
hid_t fapl, fid;
fapl = H5Pcreate(H5P_FILE_ACCESS);
H5Pset_fapl_split(fapl, "-m.h5", H5P_DEFAULT, "-r.h5", H5P_DEFAULT);
fid=H5Fcreate("Station1",H5F_ACC_TRUNC,H5P_DEFAULT,fapl);

/* Example 2: metadata and rawdata files are in different      */
/*    directories.  Use PointA-m.h5 and /pfs/PointA-r.h5 as    */
/*    the metadata and rawdata files.                          */
hid_t fapl, fid;
fapl = H5Pcreate(H5P_FILE_ACCESS);
H5Pset_fapl_split(fapl, "-m.h5", H5P_DEFAULT, "/pfs/%s-r.h5", H5P_DEFAULT);
fid=H5Fcreate("PointA",H5F_ACC_TRUNC,H5P_DEFAULT,fapl);

History:
Release    Change
1.4.0Function introduced in this release.

--- Last Modified: July 25, 2019 | 02:53 PM