Check for "handshake" in MPI? -
is there way check whether non-blocking receive posted (for given source , tag), before initiating mpi_send
? i've got situation senders , receivers both don't know send / receive from. idea first post open irecv
on chosen receivers. senders check whether rank has posted receive, , send if true (continue otherwise). after sends successful, receivers cancel outstanding irecv
s.
this works collective (on
mpi_comm_world
) array broadcast; i'm wondering if there different wayi imagine in reverse,
mpi_isend
,mpi_probe
. in case though i'm worried happens unreceived send buffers (and have heardmpi_cancel
bad news sends)
thanks suggestions.
you can perform mpi_irecv
different tag of data transfer, using source mpi_any
. using blocking mpi_recv
trick. once message (mpi_test
's flag==1), can check actual source reading mpi_status.mpi_source
(not available if status parameter mpi_status_ignore
).
if don't explicitly require transfer must synchronized, using one-sided communication more efficient (the sender puts data on receiver.
additional info: introducing one-sided communication
Comments
Post a Comment