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?
MPI_Sendrecvis 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.