MPI_GET_ELEMENTS, MPI_Get_elements Purpose Returns the number of basic elements in a message. C synopsis #include int MPI_Get_elements(MPI_Status *status,MPI_Datatype datatype, int *count); C++ synopsis #include mpi.h int MPI::Status::Get_elements(const MPI::Datatype& datatype) const; FORTRAN synopsis include 'mpif.h' or use mpi MPI_GET_ELEMENTS(INTEGER STATUS(MPI_STATUS_SIZE),INTEGER DATATYPE, INTEGER COUNT,INTEGER IERROR) Parameters status is a status of object (status) (IN). Note that in FORTRAN a single status object is an array of integers. datatype is the datatype used by the operation (handle) (IN) count is an integer specifying the number of basic elements (OUT) IERROR is the FORTRAN return code. It is always the last argument. Description This subroutine returns the number of type map elements in a message. When the number of bytes does not align with the type signature, MPI_GET_ELEMENTS returns MPI_UNDEFINED. For example, given type signature (int, short, int, short) a 10-byte message would return 3 while an 8-byte message would return MPI_UNDEFINED. When one of the MPI wait or test calls returns status for a nonblocking operation request and the corresponding blocking operation does not provide a status argument, the status from this wait or test call does not contain meaningful source, tag, or message size information. Errors Invalid datatype Type is not committed MPI not initialized MPI already finalized Related information