MPI-/ provides three types of positioning for data access routines: explicit offsets, individual file pointers, and shared file pointers. The different positioning methods may be mixed within the same program and do not affect each other.
The data access routines that accept explicit offsets
contain _AT
in their name (e.g., MPI_FILE_WRITE_AT).
Explicit offset operations perform data access at
the file position given directly as an argument--no
file pointer is used nor updated.
Note that this is not equivalent to an atomic seek-and-read
or seek-and-write operation,
as no ``seek'' is issued.
Operations with explicit offsets are described in
Section 9.4.2, page .
The names of the individual file pointer routines contain no
positional qualifier (e.g., MPI_FILE_WRITE).
Operations with individual file pointers are described in
Section 9.4.3, page .
The data access routines that use shared file pointers contain
_SHARED
or _ORDERED
in their name (e.g., MPI_FILE_WRITE_SHARED).
Operations with shared file pointers are described in
Section 9.4.4, page
.
The main semantic issues with MPI-/-maintained file pointers are how and when they are updated by I/O operations. In general, each I/O operation leaves the file pointer pointing to the next data item after the last one that is accessed by the operation. In a nonblocking or split collective operation, the pointer is updated by the call that initiates the I/O, possibly before the access completes.
More formally,
MPI-Standard for MARMOT