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

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

Adding compiled files

File size: 4.0 KB
Line 
1.\"Copyright 2006-2008 Sun Microsystems, Inc.
2.\" Copyright (c) 1996 Thinking Machines Corporation
3.TH MPI_Exscan 3 "Dec 08, 2009" "1.4" "Open MPI"
4
5.SH NAME
6\fBMPI_Exscan\fP \- Computes an exclusive scan (partial reduction)
7
8.SH SYNTAX
9.ft R
10
11.SH C Syntax
12.nf
13#include <mpi.h>
14int MPI_Exscan(void *\fIsendbuf\fP, void *\fIrecvbuf\fP, int \fIcount\fP,
15        MPI_Datatype \fIdatatype\fP, MPI_Op \fIop\fP, MPI_Comm \fIcomm\fP)
16
17.SH Fortran Syntax
18.nf
19INCLUDE 'mpif.h'
20MPI_SCAN(\fISENDBUF, RECVBUF, COUNT, DATATYPE, OP, COMM, IERROR\fP)
21        <type>  \fISENDBUF(*), RECVBUF(*)\fP
22        INTEGER \fICOUNT, DATATYPE, OP, COMM, IERROR\fP
23
24.SH C++ Syntax
25.nf
26#include <mpi.h>
27void MPI::Intracomm::Exscan(const void* \fIsendbuf\fP, void* \fIrecvbuf\fP,
28        int \fIcount\fP, const MPI::Datatype& \fIdatatype\fP,
29        const MPI::Op& \fIop\fP) const
30
31.SH INPUT PARAMETERS
32.ft R
33.TP 1i
34sendbuf
35Send buffer (choice).
36.TP 1i
37count
38Number of elements in input buffer (integer).
39.TP 1i
40datatype
41Data type of elements of input buffer (handle).
42.TP 1i
43op
44Operation (handle).
45.TP 1i
46comm
47Communicator (handle).
48
49.SH OUTPUT PARAMETERS
50.ft R
51.TP 1i
52recvbuf
53Receive buffer (choice).
54.ft R
55.TP 1i
56IERROR
57Fortran only: Error status (integer).
58
59.SH DESCRIPTION
60.ft R
61MPI_Exscan is used to perform an exclusive prefix reduction on data
62distributed across the calling processes. The operation returns, in
63the \fIrecvbuf\fP of the process with rank i, the reduction
64(calculated according to the function \fIop\fP) of the values in the
65\fIsendbuf\fPs of processes with ranks 0, ..., i-1. Compare this with
66the functionality of MPI_Scan, which calculates over the range 0, ...,
67i (inclusive). The type of operations supported, their semantics, and
68the constraints on send and receive buffers are as for MPI_Reduce.
69.sp
70The value in \fIrecvbuf\fP on process 0 is undefined and unreliable
71as \fIrecvbuf\fP is not significant for process 0. The value of
72\fIrecvbuf\fP on process 1 is always the value in \fIsendbuf\fP on
73process 0.
74.sp
75No MPI_IN_PLACE operation is supported.
76
77.SH NOTES
78.ft R
79MPI does not specify which process computes which operation. In
80particular, both processes 0 and 1 may participate in the computation
81even though the results for both processes' \fIrecvbuf\fP are
82degenerate. Therefore, all processes, including 0 and 1, must provide
83the same \fIop\fP.
84.sp
85It can be argued, from a mathematical perspective, that the definition
86of MPI_Exscan is unsatisfactory because the output at process 0 is
87undefined.  The "mathematically correct" output for process 0 would be
88the unit element of the reduction operation. However, such a
89definition of an exclusive scan would not work with user-defined
90\fIop\fP functions as there is no way for MPI to "know" the unit value
91for these custom operations.
92
93.SH NOTES ON COLLECTIVE OPERATIONS
94.ft R
95The reduction functions of type MPI_Op do not return an error value.
96As a result, if the functions detect an error, all they can do is
97either call MPI_Abort or silently skip the problem. Thus, if the
98error handler is changed from MPI_ERRORS_ARE_FATAL to something else
99(e.g., MPI_ERRORS_RETURN), then no error may be indicated.
100.sp
101The reason for this is the performance problems in ensuring that
102all collective routines return the same error value.
103
104.SH ERRORS
105.ft R
106Almost all MPI routines return an error value; C routines as
107the value of the function and Fortran routines in the last argument. C++
108functions do not return errors. If the default error handler is set to
109MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism
110will be used to throw an MPI:Exception object.
111.sp
112Before the error value is returned, the current MPI error handler is
113called. By default, this error handler aborts the MPI job, except for
114I/O function errors. The error handler may be changed with
115MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN
116may be used to cause error values to be returned. Note that MPI does not
117guarantee that an MPI program can continue past an error.
118.sp
119See the MPI man page for a full list of MPI error codes.
120
121.SH SEE ALSO
122.ft R
123.nf
124MPI_Op_create
125MPI_Reduce
126MPI_Scan
127
Note: See TracBrowser for help on using the repository browser.