Page tree

The license could not be verified: License Certificate has expired!









Sets up use of the direct I/O driver


H5P_SET_FAPL_DIRECT ( fapl_id, alignment, block_size, cbuf_size )


herr_t H5Pset_fapl_direct(
            hid_t fapl_id,
            size_t alignment,
            size_t block_size,
            size_t cbuf_size

Fortran90 Interface: h5pset_fapl_direct_f

SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, &
  INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier
  INTEGER(SIZE_T), INTENT(IN) :: alignment    
                                        ! Required memory alignment boundary
  INTEGER(SIZE_T), INTENT(IN) :: block_size    
                                        ! File system block size

  INTEGER(SIZE_T), INTENT(IN) :: cbuf_size
                                        ! Copy buffer size
  INTEGER, INTENT(OUT) :: hdferr        ! Error code
                                        ! 0 on success and -1 on failure
END SUBROUTINE H5Pset_fapl_direct_f

hid_t fapl_idIN: File access property list identifier
size_t alignmentIN: Required memory alignment boundary
size_t block_size    IN: File system block size
size_t cbuf_sizeIN: Copy buffer size


H5P_SET_FAPL_DIRECT sets the file access property list, fapl_id, to use the direct I/O driver, H5FD_DIRECT. With this driver, data is written to or read from the file synchronously without being cached by the system.

File systems usually require the data address in memory, the file address, and the size of the data to be aligned. The HDF5 Library’s direct I/O driver is able to handle unaligned data, though that will consume some additional memory resources and may slow performance. To get better performance, use the system function posix_memalign to align the data buffer in memory and the HDF5 function H5P_SET_ALIGNMENT to align the data in the file. Be aware, however, that aligned data I/O may cause the HDF5 file to be bigger than the actual data size would otherwise require because the alignment may leave some holes in the file.

alignment specifies the required alignment boundary in memory.

block_size specifies the file system block size. A value of 0 (zero) means to use HDF5 Library’s default value of 4KB.

cbuf_size specifies the copy buffer size.


Returns a non-negative value if successful; otherwise returns a negative value.


Coming Soon!

Release    C
1.8.0Function introduced in this release.

--- Last Modified: December 04, 2017 | 08:39 AM