Modifies the file access property list to use the H5FD_CORE
driver
Procedure:
H5P_SET_FAPL_CORE ( fapl_id, increment, backing_store )
Signature:
herr_t H5Pset_fapl_core(
hid_t fapl_id,
size_t increment,
hbool_t backing_store
)
ortran90 Interface: h5pset_fapl_core_f
SUBROUTINE h5pset_fapl_core_f(prp_id, increment, backing_store, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: prp_id ! Property list identifier
INTEGER(SIZE_T), INTENT(IN) :: increment ! File block size in bytes
LOGICAL, INTENT(IN) :: backing_store ! Flag to indicate that entire
! file contents are flushed to
! a file with the same name as
! this core file
INTEGER, INTENT(OUT) :: hdferr ! Error code
! 0 on success and -1 on failure
END SUBROUTINE h5pset_fapl_core_f
Parameters:
hid_t fapl_id | IN: File access property list identifier |
size_t increment | IN: Size, in bytes, of memory increments |
hbool_t backing_store | IN: Boolean flag indicating whether to write the file contents to disk when the file is closed |
Description:
H5P_SET_FAPL_CORE modifies the file access property list to use the H5FD_CORE
driver.
The H5FD_CORE
driver enables an application to work with a file in memory, speeding reads and writes as no disk access is made. File contents are stored only in memory until the file is closed. The backing_store
parameter determines whether file contents are ever written to disk.
increment
specifies the increment by which allocated memory is to be increased each time more memory is required.
While using H5F_CREATE to create a core file, if the backing_store
is set to 1
(TRUE
), the file contents are flushed to a file with the same name as this core file when the file is closed or access to the file is terminated in memory.
The application is allowed to open an existing file with H5FD_CORE
driver. While using H5F_OPEN to open an existing file, if the backing_store
is set to 1
and the flags
for H5F_OPEN is set to H5F_ACC_RDWR
, any change to the file contents are saved to the file when the file is closed. If backing_store
is set to 0
and the flags
for H5F_OPEN
is set to H5F_ACC_RDWR
, any change to the file contents will be lost when the file is closed. If the flags
for H5F_OPEN is set to H5F_ACC_RDONLY
, no change to the file is allowed either in memory or on file.
Returns:
Returns a non-negative value if successful. Otherwise returns a negative value.
Example:
History:
Release | Change |
---|
1.6.0 | The backing_store parameter has changed from INTEGER to LOGICAL to better match the C API. (Fortran 90) |
1.4.0 | Function introduced in this release. |
--- Last Modified: July 15, 2019 | 02:49 PM