MPI non blocking send/recv
Asked Answered
D

2

6

I'm curious at the lack of this function in MPI:

MPI_Isendrecv( ... );

i.e., a non-blocking send and receive, can anyone tell me the rationale behind its omission?

Ding answered 30/8, 2012 at 8:19 Comment(1)
Looking at the draft of the original MPI spec on netlib.org, it seems that the function used to be included, but then dropped in the final MPI 1.0 spec. Now I'm also curious as to what the reason was.Sectional
A
6

My take is that MPI_SENDRECV exists as a convenience for programmers who want to use blocking semantics, but need to implement a shift operation. If you're comfortable with non-blocking semantics, you should simply use the existing MPI_ISEND and MPI_IRECV.

Interestingly, MPI-3 will add non-blocking collectives (e.g. MPI_IBARRIER), but still no MPI_ISENDRECV (see http://meetings.mpi-forum.org/draft_standard/mpi3.0_draft_2.pdf ).

Abductor answered 30/8, 2012 at 9:42 Comment(0)
X
0

MPI-4 defines the following function, see MPI-4.1 pdf, page 77

int MPI_Isendrecv_replace(void *buf, int count, MPI_Datatype datatype,
    int dest, int sendtag, int source, int recvtag, MPI_Comm comm,
    MPI_Request *request);

note there is only one buffer which is used for sending and receiving, so it is not strictly a non-blocking variant of MPI_Sendrecv. This buffer being used as in- and output is something you could not implement yourself using MPI_Isend and MPI_Irecv so that's why inclusion in the standard makes sense, it is more than a convenience-function. Sometimes the standard includes a 'rationale'-section, but for this function it does not.

Xylol answered 19/1 at 9:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.