Reputation: 20895
I am trying to teach myself the MPI message passing interface with mpi4py. I noticed that MPI had a function called "sendrecv". However, it is not listed in mpi4py documentation: http://documen.tician.de/boostmpi/reference.html
Could I simply emulate the sendrecv function with say
communicator.send(0xdeadbeef, dest=1, tag=0)
data = communicator.recv(source=1, tag=0)
What does "sendrecv" do other than emulate a recv followed by a send? Where can I find mpi4py documentation that talks about it?
Upvotes: 2
Views: 1908
Reputation: 8273
MPI_Sendrecv
is a convenience function. It sends one message and receives one message, and guarantees that there will be no deadlocks due to each process waiting for another one to send.
Upvotes: 7