source: proiecte/hpl/openmpi_compiled/share/man/man3/MPI_Bsend.3 @ 97

Last change on this file since 97 was 97, checked in by (none), 14 years ago

Adding compiled files

File size: 3.1 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Bsend 3 "Dec 08, 2009" "1.4" "Open MPI"
4.SH NAME
5\fBMPI_Bsend\fP \- Basic send with user-specified buffering.
6
7.SH SYNTAX
8.ft R
9.SH C Syntax
10.nf
11#include <mpi.h>
12int MPI_Bsend(void \fI*buf\fP, int\fI count\fP, MPI_Datatype\fI datatype\fP,
13        int\fI dest\fP, int\fI tag\fP, MPI_Comm\fI comm\fP)
14
15.SH Fortran Syntax
16.nf
17INCLUDE 'mpif.h'
18MPI_BSEND(\fIBUF\fP,\fI COUNT\fP,\fIDATATYPE\fP,\fI DEST\fP,\fI TAG\fP,\fI COMM\fP,\fI IERROR\fP)
19        <type>  \fIBUF\fP(*)
20        INTEGER \fICOUNT\fP,\fI DATATYPE\fP,\fI DEST\fP,\fI TAG\fP,\fI COMM\fP,\fI IERROR\fP
21
22.SH C++ Syntax
23.nf
24#include <mpi.h>
25void Comm::Bsend(const void* \fIbuf\fP, int \fIcount\fP, const
26        Datatype& \fIdatatype\fP, int \fIdest\fP, int \fItag\fP) const
27
28.SH INPUT PARAMETERS
29.ft R
30.TP 1i
31buf
32Initial address of send buffer (choice).
33.TP 1i
34count
35Number of entries in send buffer (nonnegative integer).
36.TP 1i
37datatype
38Datatype of each send buffer element (handle).
39.TP 1i
40dest
41Rank of destination (integer).
42.TP 1i
43tag
44Message tag (integer).
45.TP 1i
46comm
47Communicator (handle).
48
49.SH OUTPUT PARAMETER
50.ft R
51.TP 1i
52IERROR
53Fortran only: Error status (integer).
54
55.SH DESCRIPTION
56.ft R
57MPI_Bsend performs a buffered-mode, blocking send.
58
59.SH NOTES
60.ft R
61This 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).
62.sp
63In deciding how much buffer space to allocate, remember that the buffer space
64is not available for reuse by subsequent \fIMPI_Bsend\fPs unless you are certain
65that the message
66has been received (not just that it should have been received).  For example,
67this code does not allocate enough buffer space:
68.nf
69
70    MPI_Buffer_attach( b, n*sizeof(double) + MPI_BSEND_OVERHEAD );
71    for (i=0; i<m; i++) {
72        MPI_Bsend( buf, n, MPI_DOUBLE, ... );
73    }
74
75.fi
76because only enough buffer space is provided for a single send, and the
77loop may start a second
78.I MPI_Bsend
79before the first is done making use of the
80buffer.
81
82In C, you can
83force the messages to be delivered by
84MPI_Buffer_detach( &b, &n );
85MPI_Buffer_attach( b, n );
86(The
87.I MPI_Buffer_detach
88will not complete until all buffered messages are
89delivered.)
90
91
92.SH ERRORS
93Almost 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.
94.sp
95Before the error value is returned, the current MPI error handler is
96called. 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. 
97
98.SH SEE ALSO
99.ft R
100.nf
101MPI_Buffer_attach
102MPI_Ibsend
103MPI_Bsend_init
104
Note: See TracBrowser for help on using the repository browser.