MPI_Buffer_attach

--- Attaches a user-defined buffer for sending

Input Parameters

buffer
initial buffer address (choice)
size
buffer size, in bytes (integer)

Notes

The size given should be the sum of the sizes of all outstanding Bsends that you intend to have, plus a few hundred bytes for each Bsend that you do. For the purposes of calculating size, you should use MPI_Pack_size. In other words, in the code
MPI_Buffer_attach( buffer, size );
MPI_Bsend( ..., count=20, datatype=type1, ... );
...
MPI_Bsend( ..., count=40, datatype=type2, ... );
the value of 'size' in the MPI_Buffer_attach call should be greater than the value computed by

MPI_Pack_size( 20, type1, comm, ∧s1 );
MPI_Pack_size( 40, type2, comm, ∧s2 );
size = s1 + s2 + 2 * 100;
where we used an extra 100 bytes for each Bsend's information handle.

Synopsis


#include "mpi.h"
int MPI_Buffer_attach( buffer, size )
void *buffer;
int  size;

Location: bufattach.c