HDFql Reference Manual v2.6.0

6.8.12SET ATOMIC

Syntax

SET [USE FILE] ATOMIC {ENABLE | DISABLE | DEFAULT}

Description

Set the atomicity51 for accessing HDF5 files in an MPI environment to enabled or disabled. All files that are subsequently opened (through the operation USE FILE) will have their access operations performed atomically or not, accordingly. If enabled, all file access operations will appear atomic, guaranteeing sequential consistency in an MPI environment (i.e. the operations will behave as though they were performed in a serial order consistent with the program order). If disabled, no enforcement of atomic file access will be performed. If using an HDFql non MPI-based distribution, an error is raised. In case the keyword USE FILE is specified, subsequent access operations of the file currently in use will be performed atomically or not, accordingly. In case the keyword DEFAULT is specified, the atomicity for accessing files is set to disabled (i.e. equivalent to specifying the keyword DISABLE).

Parameter(s)

None

Return

Nothing

Example(s)

# enable atomicity for accessing HDF5 files in an MPI environment 
SET ATOMIC ENABLE

# use (i.e. open) an HDF5 file named "my_file0.h5" in parallel with atomicity when accessing it
USE FILE my_file0.h5 IN PARALLEL

# disable atomicity for accessing HDF5 files in an MPI environment 
SET ATOMIC DISABLE

# use (i.e. open) an HDF5 file named "my_file1.h5" in parallel without atomicity when accessing it
USE FILE my_file1.h5 IN PARALLEL

# enable atomicity for accessing the HDF5 file currently in use (i.e. file "my_file1.h5") in an MPI environment
SET USE FILE ATOMIC

# use (i.e. open) an HDF5 file named "my_file2.h5" in parallel with atomicity when accessing it
USE FILE my_file2.h5 IN ATOMIC PARALLEL

Notes

  1. By default (i.e. upon initialization of the HDFql library), the atomicity is set to disabled. ↩