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?
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?
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 ).
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.
© 2022 - 2024 — McMap. All rights reserved.