H5Pset_fapl_direct(
hid_t fapl_id,
size_t alignment,
size_t block_size,
size_t cbuf_size
)
H5Pset_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 H5Pset_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.
hid_t fapl_id
|
IN: File access property list identifier |
size_t alignment
|
IN: Required memory alignment boundary |
size_t block_size
|
IN: File system block size |
size_t cbuf_size
|
IN: Copy buffer size |
SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, &
hdferr)
IMPLICIT NONE
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
| Release | C |
| 1.8.0 | Function introduced in this release. |