ipc - difference between MPI_Send() and MPI_Ssend()? -
i know mpi_send()
blocking call ,which waits until safe modify application buffer reuse. making send call synchronous(there should handshake receiver) , need use mpi_ssend()
. want know difference between two. suppose need send fix amount of bytes among processes , 1 supposed take longer time ?
me code works mpi_send() call waiting indefinitely mpi_ssend(). possible reasons ?
and important thing , pretty sure data being received @ receiving process when using mpi_send()
,so inference leads nothing in favor wait handshake when using mpi_ssend()
.
or can make conclusion : mpi_send()
can send data self process can't using mpi_ssend()
?
there small important difference between 2 (you can find in mpi standard document in section 3.4). regular mpi_send
, implementation return application when buffer available reuse. could before receiving process has posted receive. instance, when small message has been copied internal buffer , application buffer no longer needed. however, large messages may not buffered internally, call may not return until enough of message has been sent remote process buffer no longer needed.
the difference between , mpi_ssend
latter always wait until receive has been posted on receiving end. if message small , can buffered internally, still wait until message has started received on other side.
mpi_ssend
way of ensuring both processes have reached point in execution without having mpi_barrier
, instance. if application sending , receiving , same rank, it's not safe either mpi_send
or mpi_ssend
, either 1 could block indefinitely. instead, should use mpi_isend
, mpi_irecv
calls return , actual send/receive can done @ same time (in call mpi_waitall
.
Comments
Post a Comment