9.4.4.2 Collective Operations

The semantics of a collective access using a shared file pointer is that the accesses to the file will be in the order determined by the ranks of the processes within the group. For each process, the location in the file at which data is accessed is the position at which the shared file pointer would be after all processes whose ranks within the group less than that of this process had accessed their data. In addition, in order to prevent subsequent shared offset accesses by the same processes from interfering with this collective access, the call might return only after all the processes within the group have initiated their accesses. When the call returns, the shared file pointer points to the next etype accessible, according to the file view used by all processes, after the last etype requested.

Advice to users. There may be some programs in which all processes in the group need to access the file using the shared file pointer, but the program may not require that data be accessed in order of process rank. In such programs, using the shared ordered routines (e.g., MPI_FILE_WRITE_ORDERED rather than MPI_FILE_WRITE_SHARED) may enable an implementation to optimize access, improving performance.(End of advice to users.)

Advice to implementors. Accesses to the data requested by all processes do not have to be serialized. Once all processes have issued their requests, locations within the file for all accesses can be computed, and accesses can proceed independently from each other, possibly in parallel.(End of advice to implementors.)



MPI_FILE_READ_ORDERED(fh, buf, count, datatype, status)

INOUT
fh file handle (handle)
OUT
buf initial address of buffer (choice)
IN
count number of elements in buffer (integer)
IN
datatype datatype of each buffer element (handle)
OUT
status status object (Status)

int MPI_File_read_ordered(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status)



MPI_FILE_READ_ORDERED(FH, BUF, COUNT, DATATYPE, STATUS, IERROR) <type> BUF(*)
INTEGER FH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR



int MPI::File::Read_ordered(void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status)



void int MPI::File::Read_ordered(void* buf, int count, const MPI::Datatype& datatype)



void

MPI_FILE_READ_ORDERED is a collective version of the MPI_FILE_READ_SHARED interface.



MPI_FILE_WRITE_ORDERED(fh, buf, count, datatype, status)

INOUT
fh file handle (handle)
IN
buf initial address of buffer (choice)
IN
count number of elements in buffer (integer)
IN
datatype datatype of each buffer element (handle)
OUT
status status object (Status)

int MPI_File_write_ordered(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status)



MPI_FILE_WRITE_ORDERED(FH, BUF, COUNT, DATATYPE, STATUS, IERROR) <type> BUF(*)
INTEGER FH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERROR



int MPI::File::Write_ordered(const void* buf, int count, const MPI::Datatype& datatype, MPI::Status& status)



void int MPI::File::Write_ordered(const void* buf, int count, const MPI::Datatype& datatype)



void

MPI_FILE_WRITE_ORDERED is a collective version of the MPI_FILE_WRITE_SHARED interface.

MPI-Standard for MARMOT