Send modes

The MPI standard defines $4$ different send modes, normal mode, synchronous mode, buffered mode and ready mode. TPO++ provides the same modes in the communicator class. The communicator method send corresponds to normal mode. For the other modes, TPO++ provides the methods ssend, bsend and rsend, having the same semantics like the MPI calls.

To send in buffered mode, the user previously has to provide a user-space buffer to TPO++. To do this, the class TPO::Buffer can be used to create a buffer, which can be made available for TPO++ using Buffer_attach and removed using Buffer_detach. The next example shows how to send in buffered mode:

  TPO::Buffer my_buffer(1024);

  if (TPO::CommWorld.rank()==0) { // send in buffered mdoe
    TPO::CommWorld.bsend(some_date, 1);
  } else {

Patrick Heckeler 2007-05-31