int SIZE, bsize;
SIZE = 6;
/*the space needed to send data with the number of SIZE and type of MPI_DOUBLE*/
MPI_Pack_size( SIZE, MPI_DOUBLE, MPI_COMM_WORLD, &bsize );
/*the space needed for MPI_Bsend*/
tmpbuffer = (double *) malloc( bsize + 2*MPI_BSEND_OVERHEAD );
MPI_Buffer_attach( tmpbuffer, bsize + MPI_BSEND_OVERHEAD );
我的问题是:
(1)为tmpbuffer
分配的内存为bsize + 2*MPI_BSEND_OVERHEAD
,当涉及MPI_Buffer_attach
时,为什么其大小更改为bsize + MPI_BSEND_OVERHEAD
?
(2)“ MPI_BSEND_OVERHEAD”是什么意思?为何要按2
计时?