Enables SWMR writing mode for a file
Procedure:
H5F_START_SWMR_WRITE (file_id)
Signature:
herr_t H5Fstart_swmr_write(hid_t file_id)
Parameters:
hid_t file_id | IN: A file identifier |
Description:
H5F_START_SWMR_WRITE will activate SWMR writing mode for a file associated with file_id
. This routine will prepare and ensure the file is safe for SWMR writing as follows:
- Check that the file is opened with write access (
H5F_ACC_RDWR
). - Check that the file is opened with the latest library format to ensure data structures with check-summed metadata are used.
- Check that the file is not already marked in SWMR writing mode.
- Enable reading retries for check-summed metadata to remedy possible checksum failures from reading inconsistent metadata on a system that is not atomic.
- Turn off usage of the library’s accumulator to avoid possible ordering problem on a system that is not atomic.
- Perform a flush of the file’s data buffers and metadata to set a consistent state for starting SWMR write operations.
Library objects are groups, datasets, and committed datatypes. For the current implementation, groups and datasets can remain open when activating SWMR writing mode, but not committed datatypes. Attributes attached to objects cannot remain open either.
Returns:
Returns a non-negative value if successful; otherwise returns a negative value.
Example:
History:
Release | Change |
---|
1.10.0 | C function introduced with this release. |
--- Last Modified: December 20, 2018 | 01:07 PM