MPI_RECV, MPI_Recv Purpose Performs a blocking receive operation. C synopsis #include int MPI_Recv(void* buf,int count,MPI_Datatype datatype, int source,int tag,MPI_Comm comm,MPI_Status *status); C++ synopsis #include mpi.h void MPI::Comm::Recv(void* buf, int count, const MPI::Datatype& datatype, int source, int tag) const; #include mpi.h void MPI::Comm::Recv(void* buf, int count, const MPI::Datatype& datatype, int source, int tag, MPI::Status& status) const; FORTRAN synopsis include 'mpif.h' or use mpi MPI_RECV(CHOICE BUF,INTEGER COUNT,INTEGER DATATYPE,INTEGER SOURCE, INTEGER TAG,INTEGER COMM,INTEGER STATUS(MPI_STATUS_SIZE),INTEGER IERROR) Description MPI_RECV is a blocking receive operation. The receive buffer is storage containing room for count consecutive elements of the type specified by datatype, starting at address buf. The message received must be less than or equal to the length of the receive buffer. If all incoming messages do not fit without truncation, an overflow error occurs. If a message arrives that is shorter than the receive buffer, then only those locations corresponding to the actual message are changed. Passing MPI_STATUS_IGNORE for the status argument causes PE MPI to skip filling in the status fields. By passing this value for status, you can avoid having to allocate a status object in programs that do not need to examine the status fields. Parameters buf is the initial address of the receive buffer (choice) (OUT) count is the number of elements to be received (integer) (IN) datatype is the datatype of each receive buffer element (handle) (IN) source is the rank of the source task in comm or MPI_ANY_SOURCE (integer) (IN) tag is the message tag or MPI_ANY_TAG (positive integer) (IN) comm is the communicator (handle) (IN) status is the status object (Status) (INOUT). Note that in FORTRAN a single status object is an array of integers. IERROR is the FORTRAN return code. It is always the last argument. Errors Invalid count count < 0 Invalid datatype Invalid status ignore value Type not committed Invalid source source < 0 or source > = groupsize Invalid tag tag < 0 Invalid comm Truncation occurred MPI not initialized MPI already finalized Related information MPI_IRECV MPI_SEND MPI_SENDRECV