⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpi_bsend.3

📁 MPI stands for the Message Passing Interface. Written by the MPI Forum (a large committee comprising
💻 3
字号:
.\"Copyright 2006, Sun Microsystems, Inc..\" Copyright (c) 1996 Thinking Machines Corporation.TH MPI_Bsend 3OpenMPI "September 2006" "Open MPI 1.2" " ".SH NAME\fBMPI_Bsend\fP \- Basic send with user-specified buffering..SH SYNTAX.ft R.SH C Syntax.nf#include <mpi.h>int MPI_Bsend(void \fI*buf\fP, int\fI count\fP, MPI_Datatype\fI datatype\fP,	int\fI dest\fP, int\fI tag\fP, MPI_Comm\fI comm\fP).SH Fortran Syntax.nfINCLUDE 'mpif.h'MPI_BSEND(\fIBUF\fP,\fI COUNT\fP,\fIDATATYPE\fP,\fI DEST\fP,\fI TAG\fP,\fI COMM\fP,\fI IERROR\fP)	<type>	\fIBUF\fP(*)	INTEGER	\fICOUNT\fP,\fI DATATYPE\fP,\fI DEST\fP,\fI TAG\fP,\fI COMM\fP,\fI IERROR\fP.SH C++ Syntax.nf#include <mpi.h>void Comm::Bsend(const void* \fIbuf\fP, int \fIcount\fP, const 	Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const.SH INPUT PARAMETERS.ft R.TP 1ibufInitial address of send buffer (choice)..TP 1icountNumber of entries in send buffer (nonnegative integer)..TP 1idatatypeDatatype of each send buffer element (handle)..TP 1idestRank of destination (integer)..TP 1itagMessage tag (integer)..TP 1icommCommunicator (handle)..SH OUTPUT PARAMETER.ft R.TP 1iIERRORFortran only: Error status (integer). .SH DESCRIPTION.ft RMPI_Bsend performs a buffered-mode, blocking send..SH NOTES.ft RThis send is provided as a convenience function; it allows the user to send messages without worrying about where they are buffered (because the user must have provided buffer space with MPI_Buffer_attach)..spIn deciding how much buffer space to allocate, remember that the buffer spaceis not available for reuse by subsequent \fIMPI_Bsend\fPs unless you are certainthat the messagehas been received (not just that it should have been received).  For example,this code does not allocate enough buffer space:.nf    MPI_Buffer_attach( b, n*sizeof(double) + MPI_BSEND_OVERHEAD );    for (i=0; i<m; i++) {        MPI_Bsend( buf, n, MPI_DOUBLE, ... );    }.fibecause only enough buffer space is provided for a single send, and theloop may start a second .I MPI_Bsendbefore the first is done making use of thebuffer.In C, you canforce the messages to be delivered byMPI_Buffer_detach( &b, &n );MPI_Buffer_attach( b, n );(The .I MPI_Buffer_detachwill not complete until all buffered messages aredelivered.).SH ERRORSAlmost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object..spBefore the error value is returned, the current MPI error handler iscalled. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error.  .SH SEE ALSO.ft R.nfMPI_Buffer_attachMPI_IbsendMPI_Bsend_init' @(#)MPI_Bsend.3 1.20 06/03/09   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -