NAME
MMPPIITTyyppeeccoommmmiitt - Commits a data type.
SSYYNNTTAAXX CC SSyynnttaaxx#include
int MPITypecommit(MPIDatatype *datatype) FFoorrttrraann SSyynnttaaxx INCLUDE 'mpif.h'MPITYPECOMMIT(DATATYPE, IERROR)
INTEGER DATATYPE, IERROR
CC++++ SSyynnttaaxx#include
void Datatype::Commit() IINNPPUUTT PPAARRAAMMEETTEERR datatype Data type (handle). OOUUTTPPUUTT PPAARRAAMMEETTEERRIERROR Fortran only: Error status (integer).
DESCRIPTION
The commit operation commits the data type. A data type is the formal description of a communication buffer, not the content of that buffer. After a data type has been committed, it can be repeatedly reused to communicate the changing content of a buffer or, indeed, the content of different buffers, with different starting addresses. EExxaammppllee:: The following Fortran code fragment gives examples of using MPITypecommit. INTEGER type1, type2 CALL MPITYPECONTIGUOUS(5, MPIREAL, type1, ierr) ! new type object created CALL MPITYPECOMMIT(type1, ierr) ! now type1 can be used for communication If the data type specified in datatype is already committed, it isequivalent to a no-op.
EERRRROORRSS Almost all MPI routines return an error value; C routines as the valueof the function and Fortran routines in the last argument. C++ func-
tions do not return errors. If the default error handler is set toMPI::ERRORSTHROWEXCEPTIONS, then on error the C++ exception mechanism
will be used to throw an MPI:Exception object. Before the error value is returned, the current MPI error handler is called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed withMPICommseterrhandler; the predefined error handler MPIERRORSRETURN
may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. Open MPI 1.2 September 2006 MPITypecommit(3OpenMPI)