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

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

Adding compiled files

File size: 4.1 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Sendrecv_replace 3 "Dec 08, 2009" "1.4" "Open MPI"
4.SH NAME
5\fBMPI_Sendrecv_replace\fP \- Sends and receives a message using a single buffer.
6
7.SH SYNTAX
8.ft R
9.SH C Syntax
10.nf
11#include <mpi.h>
12int MPI_Sendrecv_replace(void *\fIbuf\fP, int\fI count\fP, MPI_Datatype\fI datatype\fP,
13        int\fI dest\fP, int\fI sendtag\fP, int\fI source\fP, int\fI recvtag\fP, MPI_Comm\fI comm\fP,
14        MPI_Status\fI *status\fP)
15
16.SH Fortran Syntax
17.nf
18INCLUDE 'mpif.h'
19MPI_SENDRECV_REPLACE(\fIBUF, COUNT, DATATYPE, DEST, SENDTAG, SOURCE,
20                RECVTAG, COMM, STATUS, IERROR\fP)
21        <type>  \fIBUF\fP(*)
22        INTEGER \fICOUNT, DATATYPE, DEST, SENDTAG\fP
23        INTEGER \fISOURCE, RECVTAG, COMM\fP
24        INTEGER \fISTATUS(MPI_STATUS_SIZE), IERROR\fP
25
26.SH C++ Syntax
27.nf
28#include <mpi.h>
29void Comm::Sendrecv_replace(void* \fIbuf\fP, int \fIcount\fP, const
30        Datatype& \fIdatatype\fP, int \fIdest\fP, int \fIsendtag\fP, int \fIsource\fP,
31        int \fIrecvtag\fP, Status& \fIstatus\fP) const
32
33void Comm::Sendrecv_replace(void* \fIbuf\fP, int \fIcount\fP, const
34        Datatype& \fIdatatype\fP, int \fIdest\fP, int \fIsendtag\fP, int \fIsource\fP,
35        int \fIrecvtag\fP) const
36
37.SH INPUT/OUTPUT PARAMETER
38.ft R
39.TP 1i
40buf
41Initial address of send and receive buffer (choice).
42
43.SH INPUT PARAMETERS
44.ft R
45.TP 1i
46count
47Number of elements in send and receive buffer (integer).
48.TP 1i
49datatype
50Type of elements to send and receive (handle).
51.TP 1i
52dest
53Rank of destination (integer).
54.TP 1i
55sendtag
56Send message tag (integer).
57.TP 1i
58source
59Rank of source (integer).
60.TP 1i
61recvtag
62Receive message tag (integer).
63.TP 1i
64comm
65Communicator (handle).
66
67.SH OUTPUT PARAMETERS
68.ft R
69.TP 1i
70status
71Status object (status).
72.TP 1i
73IERROR
74Fortran only: Error status (integer).
75
76.SH DESCRIPTION
77.ft R
78The 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 Standard, "Process Topologies," in order to perform shifts on various logical topologies. Also, a send-receive operation is useful for implementing remote procedure calls.
79.sp
80A 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.
81.sp
82MPI_Sendrecv_replace executes a blocking send and receive. The same buffer is used both for the send and for the receive, so that the message sent is replaced by the message received.
83.sp
84The semantics of a send-receive operation is what would be obtained if the caller forked two concurrent threads, one to execute the send, and one to execute the receive, followed by a join of these two threads. 
85
86.SH ERRORS
87Almost 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.
88.sp
89Before the error value is returned, the current MPI error handler is
90called. 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. 
91
92.SH SEE ALSO
93.ft R
94.sp
95MPI_Sendrecv
96
97
98
Note: See TracBrowser for help on using the repository browser.