Edit

Share via


MPI_Mrecv function

Performs a blocking receive for a message matched by MPI_Mprobe or MPI_Improbe.

Syntax

int MPIAPI MPI_Mrecv(
  _Out_   void         *buf,
  _In_    int          count,
  _In_    MPI_Datatype datatype,
  _Inout_ MPI_Message  *message,
  _Out_   MPI_Status   *status
);

Parameters

  • buf [out]
    A pointer to the address of the receive buffer.

  • count [in]
    The number of datatype elements in buf.

  • datatype [in]
    The MPI data type of the elements in the buffer array.

  • message [in, out]
    Contains a pointer to the message.

  • status [out]
    On return, contains a pointer to an MPI_Status structure where information about the message is stored.

Return value

Returns MPI_SUCCESS on success. Otherwise, the return value is an error code.

In Fortran, the return value is stored in the IERROR parameter.

Fortran

    MPI_MRECV(BUF, COUNT, DATATYPE, MESSAGE, STATUS, IERROR)
        <type> BUF(*)
        INTEGER COUNT, DATATYPE, MESSAGE, STATUS(MPI_STATUS_SIZE), IERROR

Remarks

This function receives a message matched by a matching probe operation. The receive buffer consists of the storage containing count consecutive elements of the type specified by datatype, starting at address buf. The length of the received message must be less than or equal to the length of the receive buffer. An overflow error occurs if all incoming data does not fit, without truncation, into the receive buffer.

If the message is shorter than the receive buffer, then only those locations corresponding to the (shorter) message are modified.

On return from this function, the message handle is set to MPI_MESSAGE_NULL. All errors that occur during the execution of this operation are handled according to the error handler set for the communicator used in the matching probe call that produced the message handle

Requirements

Product

Microsoft MPI v6

Header

Mpi.h; Mpif.h

Library

Msmpi.lib

DLL

Msmpi.dll

See also

MPI Point to Point Functions

MPI_Mprobe

MPI_Improbe

MPI_Recv

MPI_Imrecv