source: proiecte/hpl/openmpi_compiled/share/man/man3/MPI_Reduce_scatter.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_Reduce_scatter 3 "Dec 08, 2009" "1.4" "Open MPI"
4.SH NAME
5\fBMPI_Reduce_scatter\fP \- Combines values and scatters the results.
6
7.SH SYNTAX
8.ft R
9.SH C Syntax
10.nf
11#include <mpi.h>
12int MPI_Reduce_scatter(void *\fIsendbuf\fP, void\fI *recvbuf\fP, int\fI *recvcounts\fP,
13        MPI_Datatype\fI datatype\fP, MPI_Op\fI op\fP, MPI_Comm\fI comm\fP)       
14
15.SH Fortran Syntax
16.nf
17INCLUDE 'mpif.h'
18MPI_REDUCE_SCATTER(\fISENDBUF, RECVBUF, RECVCOUNTS, DATATYPE, OP,
19                COMM, IERROR\fP)
20        <type>  \fISENDBUF(*), RECVBUF(*)\fP
21        INTEGER \fIRECVCOUNTS(*), DATATYPE, OP, COMM, IERROR \fP
22
23.SH C++ Syntax
24.nf
25#include <mpi.h>
26void MPI::Comm::Reduce_scatter(const void* \fIsendbuf\fP, void* \fIrecvbuf\fP,
27        int \fIrecvcounts\fP[], const MPI::Datatype& \fIdatatype\fP,
28        const MPI::Op& \fIop\fP) const
29
30.SH INPUT PARAMETERS
31.ft R
32.TP 1i
33sendbuf
34Starting address of send buffer (choice).
35.TP 1i
36recvcounts
37Integer array specifying the number of elements in result distributed to
38each process. Array must be identical on all calling processes.
39.TP 1i
40datatype
41Datatype 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
53Starting address of receive buffer (choice).
54.ft R
55.TP 1i
56IERROR
57Fortran only: Error status (integer).
58
59.SH DESCRIPTION
60.ft R
61
62MPI_Reduce_scatter first does an element-wise reduction on vector of \fIcount\fP\
63 =\ S(i)\fIrevcounts\fP[i] elements in the send buffer defined by \fIsendbuf\fP, \fIcount\fP, and
64\fIdatatype\fP. Next, the resulting vector of results is split into n disjoint
65segments, where n is the number of processes in the group. Segment i contains
66\fIrecvcounts\fP[i] elements. The ith segment is sent to process i and stored in
67the receive buffer defined by \fIrecvbuf\fP, \fIrecvcounts\fP[i], and \fIdatatype\fP.
68
69
70.SH USE OF IN-PLACE OPTION
71When the communicator is an intracommunicator, you can perform a reduce-scatter operation in-place (the output buffer is used as the input buffer).  Use the variable MPI_IN_PLACE as the value of the \fIsendbuf\fR.  In this case, the input data is taken from the top of the receive buffer.  The area occupied by the input data may be either longer or shorter than the data filled by the output data.
72.sp
73.SH WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR
74.sp
75When the communicator is an inter-communicator, the reduce-scatter operation occurs in two phases.  First, the result of the reduction performed on the data provided by the processes in the first group is scattered among the processes in the second group.  Then the reverse occurs: the reduction performed on the data provided by the processes in the second group is scattered among the processes in the first group.  For each group, all processes provide the same \fIrecvcounts\fR argument, and the sum of the \fIrecvcounts\fR values should be the same for both groups. 
76.sp 
77.SH NOTES ON COLLECTIVE OPERATIONS
78
79The reduction functions (
80.I MPI_Op
81) do not return an error value.  As a result,
82if the functions detect an error, all they can do is either call
83.I MPI_Abort
84or silently skip the problem.  Thus, if you change the error handler from
85.I MPI_ERRORS_ARE_FATAL
86to something else, for example,
87.I MPI_ERRORS_RETURN
88,
89then no error may be indicated.
90
91The reason for this is the performance problems in ensuring that
92all collective routines return the same error value.
93
94.SH ERRORS
95Almost 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.
96.sp
97Before the error value is returned, the current MPI error handler is
98called. 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. 
99
Note: See TracBrowser for help on using the repository browser.