MPIRecv
MPI_Recv is a blocking point-to-point receive operation in the Message Passing Interface (MPI). It receives a message that matches the specified source, tag, and communicator and stores the data in a user-provided buffer. The call blocks until a matching message is available or an error occurs.
int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status);
- buf: pointer to the receive buffer where data will be stored.
- count: number of elements of datatype to receive.
- datatype: MPI datatype describing the data in buf.
- source: rank of the sending process or MPI_ANY_SOURCE to accept from any source.
- tag: message tag or MPI_ANY_TAG to accept any tag.
- comm: communicator containing the communicating processes.
- status: MIDI_Status object that returns information about the received message (source, tag, and count). Use MPI_STATUS_IGNORE
MPI_Recv blocks until a message that matches the specified source, tag, and communicator arrives. The received
Non-blocking variant: MPI_Irecv, which posts a non-blocking receive and completes later via MPI_Wait or MPI_Test. MPI_Recv