Open MPI logo

MPI_File_write_ordered(3) man page (version 5.0.0rc2)

  |   Home   |   Support   |   FAQ   |  

« Return to documentation listing

Table of Contents

Name

C]MPI_File_write_orderedR] - Writes a file at a location specified by a shared file pointer (blocking, collective).

Syntax

C Syntax



C]#include <mpi.h>int MPI_File_write_ordered(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status)R]Fortran Syntax



C]USE MPI! or the older form: INCLUDE [aq]mpif.h[aq]MPI_FILE_WRITE_ORDERED(FH, BUF, COUNT, DATATYPE, STATUS, IERROR) <type> BUF(*) INTEGER FH, COUNT, DATATYPE, STATUS(MPI_STATUS_SIZE), IERRORR]Fortran 2008 Syntax



C]USE mpi_f08MPI_File_write_ordered(fh, buf, count, datatype, status, ierror) TYPE(MPI_File), INTENT(IN) :: fh TYPE(*), DIMENSION(..), INTENT(IN) :: buf INTEGER, INTENT(IN) :: count TYPE(MPI_Datatype), INTENT(IN) :: datatype TYPE(MPI_Status) :: status INTEGER, OPTIONAL, INTENT(OUT) :: ierrorR]Input Parameters

[bu]
C]fhR] : File handle (handle).
[bu]
C]bufR] : Initial address of buffer (choice).
[bu]
C]countR] : Number of elements in buffer (integer).
[bu]
C]datatypeR] : Data type of each buffer element (handle).

Output Parameters

[bu]
C]statusR] : Status object (Status).
[bu]
C]IERRORR] : Fortran only: Error status (integer).

Description

C]MPI_File_write_orderedR] is a collective routine. This routine must be called by all processes in the communicator group associated with the file handle C]fhR]. Each process may pass different argument values for the C]datatypeR] and C]countR] arguments. Each process attempts to write, into the file associated with C]fhR], a total number of C]countR] data items having C]datatypeR] type contained in the user[cq]s buffer C]bufR]. For each process, the location in the file at which data is written is the position at which the shared file pointer would be after all processes whose ranks within the group are less than that of this process had written their data. C]MPI_File_write_orderedR] returns the number of C]datatypeR] elements written in C]statusR]. The shared file pointer is updated by the amounts of data requested by all processes of the group.

Errors

Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument.

Before the error value is returned, the current MPI error handler is called. For MPI I/O function errors, the default error handler is set to C]MPI_ERRORS_RETURNR]. The error handler may be changed with C]MPI_File_set_errhandlerR]; the predefined error handler C]MPI_ERRORS_ARE_FATALR] may be used to make I/O errors fatal. Note that MPI does not guarantee that an MPI program can continue past an error.


Table of Contents

« Return to documentation listing