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

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

Adding compiled files

File size: 4.5 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Sendrecv 3 "Dec 08, 2009" "1.4" "Open MPI"
4.SH NAME
5\fBMPI_Sendrecv\fP \- Sends and receives a message.
6
7.SH SYNTAX
8.ft R
9.SH C Syntax
10.nf
11#include <mpi.h>
12int MPI_Sendrecv(void *\fIsendbuf\fP, int\fI sendcount\fP, MPI_Datatype\fI sendtype\fP,
13        int\fI dest\fP, int\fI sendtag\fP, void\fI *recvbuf\fP, int\fI recvcount\fP,
14        MPI_Datatype\fI recvtype\fP, int\fI source\fP, int\fI recvtag\fP,
15        MPI_Comm\fI comm\fP, MPI_Status\fI *status\fP)
16
17.SH Fortran Syntax
18.nf
19INCLUDE 'mpif.h'
20MPI_SENDRECV(\fISENDBUF, SENDCOUNT, SENDTYPE, DEST, SENDTAG,
21                RECVBUF, RECVCOUNT, RECVTYPE, SOURCE, RECVTAG, COMM,
22                STATUS, IERROR\fP)
23        <type>  \fISENDBUF(*), RECVBUF(*)\fP
24        INTEGER \fISENDCOUNT, SENDTYPE, DEST, SENDTAG\fP
25        INTEGER \fIRECVCOUNT, RECVTYPE, SOURCE, RECVTAG, COMM\fP
26        INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP
27
28.SH C++ Syntax
29.nf
30#include <mpi.h>
31void Comm::Sendrecv(const void *\fIsendbuf\fP, int \fIsendcount\fP, const
32        Datatype& \fIsendtype\fP, int \fIdest\fP, int \fIsendtag\fP, void *\fIrecvbuf\fP,
33        int \fIrecvcount\fP, const Datatype& \fIrecvtype\fP, int \fIsource\fP,
34        int \fIrecvtag\fP, Status& \fIstatus\fP) const
35
36void Comm::Sendrecv(const void *\fIsendbuf\fP, int \fIsendcount\fP, const
37        Datatype& \fIsendtype\fP, int \fIdest\fP, int \fIsendtag\fP, void *\fIrecvbuf\fP,
38        int \fIrecvcount\fP, const Datatype& \fIrecvtype\fP, int \fIsource\fP,
39        int \fIrecvtag\fP) const
40
41.SH INPUT PARAMETERS
42.ft R
43.TP 1i
44sendbuf
45Initial address of send buffer (choice).
46.TP 1i
47sendcount
48Number of elements to send (integer).
49.TP 1i
50sendtype
51Type of elements in send buffer (handle).
52.TP 1i
53dest
54Rank of destination (integer).
55.TP 1i
56sendtag
57Send tag (integer).
58.TP 1i
59recvcount
60Maximum number of elements to receive (integer).
61.TP 1i
62recvtype
63Type of elements in receive buffer (handle).
64.TP 1i
65source
66Rank of source (integer).
67.TP 1i
68recvtag
69Receive tag (integer).
70.TP 1i
71comm
72Communicator (handle).
73
74.SH OUTPUT PARAMETERS
75.ft R
76.TP 1i
77recvbuf
78Initial address of receive buffer (choice).
79.TP 1i
80status
81Status object (status). This refers to the receive operation.
82.ft R
83.TP 1i
84IERROR
85Fortran only: Error status (integer).
86
87.SH DESCRIPTION
88.ft R
89The send-receive operations combine in one call the sending of a message to one destination and the receiving of another message, from another process. The two (source and destination) are possibly the same. A send-receive operation is useful for executing a shift operation across a chain of processes. If blocking sends and receives are used for such a shift, then one needs to order the sends and receives correctly (for example, even processes send, then receive; odd processes receive first, then send) in order to prevent cyclic dependencies that may lead to deadlock. When a send-receive operation is used, the communication subsystem takes care of these issues. The send-receive operation can be used in conjunction with the functions described in Chapter 6 of the MPI-1 Standard, "Process Topologies," in order to perform shifts on various logical topologies. Also, a send-receive operation is useful for implementing remote procedure calls.
90.sp
91A message sent by a send-receive operation can be received by a regular receive operation or probed by a probe operation; a send-receive operation can receive a message sent by a regular send operation.
92.sp
93MPI_Sendrecv executes a blocking send and receive operation. Both send and receive use the same communicator, but possibly different tags. The send buffer and receive buffers must be disjoint, and may have different lengths and datatypes. 
94.sp
95If your application does not need to examine the \fIstatus\fP field, you can save resources by using the predefined constant MPI_STATUS_IGNORE as a special value for the \fIstatus\fP argument.
96
97.SH ERRORS
98Almost 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.
99.sp
100Before the error value is returned, the current MPI error handler is
101called. 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. 
102
103.SH SEE ALSO
104.ft R
105.sp
106MPI_Sendrecv_replace
107
108
Note: See TracBrowser for help on using the repository browser.