understanding MPI send differences
Asked Answered
W

1

10

Ok let's start, I've a bit of confusion in my head.

SEND: it is blocking. The sender will waits until the receiver has posted the corresponding RECV.

SSEND: it is blocking and the sender will NOT ONLY waits until the receiver has posted the corresponding RECV, but it will wait for the ack of the RECV. It means the RECV run fine.

BSEND: it is non blocking. The process can go ahead to execute its part of code. The data is stored in a buffer properly allocated before.

ISEND: it is non blocking. The process can go ahead to execute its part of code. The data is NOT stored in a buffer: you must not overwrite the data you're sending until you're sure the ISEND has run fine (WAIT/ TEST).

So.. do ISEND and BSEND only differs for the buffer?

Wayless answered 16/7, 2015 at 22:21 Comment(4)
I only ever use send and isend, and you have those both correct. One more point to add to isend: you must not access the data you're receiving until you're sure the irecv has completed with wait/test as well.Evita
There are six sends. Regular, synchronous and buffered, with both blocking and nonblocking of each. Synchronous send is useful for debugging and implementing a point-to-point barrier. Buffered send should not be used. It exposes an implantation concept that is better left hidden.Beguin
The different MPI send modes are explained here: Immidiate vs synchronous communication in openmpi. There are four different blocking send types in MPI and each of them has the corresponding non-blocking variant for an 8 MPI calls in total. Note that blocking does not mean synchronising.Clipboard
@HristoIliev thanks. I forgot ready send, which is also a pointless exposure of an implementation detail.Beguin
C
5

Yes--the difference between ISEND and BSEND is the buffer.

ISEND is a non-blocking send that is performed in-place.

BSEND is a non-blocking send that can be buffered in a segment of memory specified by MPI_Buffer_Attach.

The BSEND function was created to allow the programmer to specify exactly where data is being buffered.

It is important to note that, much like with ISEND, you must also check the status of all sends using the BSEND buffer so as to not overflow the buffer or overwrite pending BSEND's.

Cheroot answered 19/7, 2015 at 18:56 Comment(1)
I believe BSEND is blocking until the data is buffered (i.e. if it buffered). IBSEND is non-blocking @Wayless .Moen

© 2022 - 2024 — McMap. All rights reserved.