Purpose
Creates a persistent buffered mode send request.
C synopsis
#include <mpi.h>
int MPI_Bsend_init(void* buf,int count,MPI_Datatype datatype,
int dest,int tag,MPI_Comm comm,MPI_Request *request);
C++ synopsis
#include mpi.h MPI::Prequest MPI::Comm::Bsend_init(const void* buf, int count, const MPI::Datatype& datatype, int dest, int tag) const;
FORTRAN synopsis
include 'mpif.h' or use mpi
MPI_BSEND_INIT(CHOICE BUF,INTEGER COUNT,INTEGER DATATYPE,
INTEGER DEST,INTEGER TAG,INTEGER COMM,INTEGER REQUEST,
INTEGER IERROR)
Parameters
Description
This subroutine creates a persistent communication request for a buffered mode send operation. MPI_START or MPI_STARTALL must be called to activate the send.
Because it is the MPI_START that initiates communication, any error related to insufficient buffer space occurs at the MPI_START.
Notes
Make sure you have enough buffer space available. An error occurs if the message must be buffered and there is there is not enough buffer space. The amount of buffer space needed to be safe depends on the expected peak of pending messages. The sum of the sizes of all of the pending messages at that point plus (MPI_BSEND_INIT_OVERHEAD*number_of_messages) should be sufficient.
Avoid using MPI_BSEND_INIT if possible. It adds overhead because it requires an extra memory-to-memory copy of the outgoing data. If MPI_BSEND_INIT is used, the associated receive operations may perform better with MPI_CSS_INTERRUPT enabled.
Errors
Related information