[mpi] potentially blocking send - require blocking
The boost::mpi documentation for send() is: "This routine executes a potentially blocking send" This differs from MPI_Send() "This routine will block until the message is sent to the destination." I am developing an application which requires the code not to progress until the communication is complete. In which situations does "potentially blocking" apply? And, is there a way of guaranteeing it is complete, the equivalent of MPI_Wait() for MPI_Isend()? Regards, Dave
Hello
The boost::mpi documentation for send() is: "This routine executes a potentially blocking send" This differs from MPI_Send() "This routine will block until the message is sent to the destination."
Both are correct in practice, whether MPI_Send actually blocks is implementation (and message, etc.) dependent.
I am developing an application which requires the code not to progress until the communication is complete.
I think you'll need an MPI_Barrier after send/recv for that.
In which situations does "potentially blocking" apply? And, is there a way of guaranteeing it is complete, the equivalent of MPI_Wait() for MPI_Isend()?
At least in MPI-1.1 none of the send functions (including MPI_Wait on MPI_Isend) guarantee that the message has been received when send returns, they only guarantee that the buffer where the message was read from by send can be reused. http://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node40.html http://www.mpi-forum.org/docs/mpi-1.1/mpi-11-html/node47.html Ilja
You can use mpi_ssend, which blocks until the message is posted on the receiver.
participants (3)
-
Brian Budge
-
Dave Clarke
-
Ilja Honkonen