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?

FrancescoN
  • 2,146
  • 12
  • 34
  • 45
  • 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. – NoseKnowsAll Jul 17 '15 at 03:12
  • 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. – Jeff Hammond Jul 17 '15 at 04:47
  • 1
    The different MPI send modes are explained here: [Immidiate vs synchronous communication in openmpi](http://stackoverflow.com/questions/26881323/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. – Hristo Iliev Jul 17 '15 at 08:19
  • @HristoIliev thanks. I forgot ready send, which is also a pointless exposure of an implementation detail. – Jeff Hammond Jul 18 '15 at 15:33

1 Answers1

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.

Kris Lange
  • 146
  • 5
  • I believe `BSEND` is blocking until the data is buffered (i.e. if it buffered). `IBSEND` is non-blocking @FrancescoN . – paulplusx May 10 '20 at 17:07