1
1
openmpi/ompi/mpi/man/man3/MPI_Reduce_scatter_block.3in
Nathan Hjelm 9235b290d5 Update man pages for MPI-3 and add some missing man pages for MPI-2.x
functions.

cmr=v1.7.4

This commit was SVN r29336.
2013-10-02 14:27:47 +00:00

111 строки
4.4 KiB
Plaintext

.\" -*- nroff -*-
.\" Copyright 2013 Los Alamos National Security, LLC. All rights reserved.
.\" Copyright 2010 Cisco Systems, Inc. All rights reserved.
.\" Copyright 2006-2008 Sun Microsystems, Inc.
.\" Copyright (c) 1996 Thinking Machines Corporation
.TH MPI_Reduce_scatter_block 3 "#OMPI_DATE#" "#PACKAGE_VERSION#" "#PACKAGE_NAME#"
.SH NAME
\fBMPI_Reduce_scatter_block, MPI_Ireduce_scatter_block\fP \- Combines values and scatters the results in blocks.
.SH SYNTAX
.ft R
.SH C Syntax
.nf
#include <mpi.h>
int MPI_Reduce_scatter_block(const void *\fIsendbuf\fP, void\fI *recvbuf\fP, int\fI recvcount\fP,
MPI_Datatype\fI datatype\fP, MPI_Op\fI op\fP, MPI_Comm\fI comm\fP)
int MPI_Ireduce_scatter_block(const void *\fIsendbuf\fP, void\fI *recvbuf\fP, int\fI recvcount\fP,
MPI_Datatype\fI datatype\fP, MPI_Op\fI op\fP, MPI_Comm\fI comm\fP, MPI_Request \fI*request\fP)
.fi
.SH Fortran Syntax
.nf
INCLUDE 'mpif.h'
MPI_REDUCE_SCATTER_BLOCK(\fISENDBUF, RECVBUF, RECVCOUNT, DATATYPE, OP,
COMM, IERROR\fP)
<type> \fISENDBUF(*), RECVBUF(*)\fP
INTEGER \fIRECVCOUNT, DATATYPE, OP, COMM, IERROR \fP
MPI_IREDUCE_SCATTER_BLOCK(\fISENDBUF, RECVBUF, RECVCOUNT, DATATYPE, OP,
COMM, REQUEST, IERROR\fP)
<type> \fISENDBUF(*), RECVBUF(*)\fP
INTEGER \fIRECVCOUNT, DATATYPE, OP, COMM, REQUEST, IERROR \fP
.fi
.SH INPUT PARAMETERS
.ft R
.TP 1i
sendbuf
Starting address of send buffer (choice).
.TP 1i
recvcount
lement count per block (non-negative integer).
.TP 1i
datatype
Datatype of elements of input buffer (handle).
.TP 1i
op
Operation (handle).
.TP 1i
comm
Communicator (handle).
.SH OUTPUT PARAMETERS
.ft R
.TP 1i
recvbuf
Starting address of receive buffer (choice).
.TP 1i
request
Request (handle, non-blocking only).
.ft R
.TP 1i
IERROR
Fortran only: Error status (integer).
.SH DESCRIPTION
.ft R
MPI_Reduce_scatter_block first does an element-wise reduction on vector of \fIcount\fP\
=\ n * \fIrevcount\fP elements in the send buffer defined by \fIsendbuf\fP, \fIcount\fP, and
\fIdatatype\fP, using the operation \fIop\fP, where n is the number of
processes in the group of \fIcomm\fP. Next, the resulting vector of results is split into n disjoint
segments, where n is the number of processes in the group. Each segments contains \fIrecvcount\fP
elements. The ith segment is sent to process i and stored in the receive buffer defined by
\fIrecvbuf\fP, \fIrecvcount\fP, and \fIdatatype\fP.
.SH USE OF IN-PLACE OPTION
When 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.
.sp
.SH WHEN COMMUNICATOR IS AN INTER-COMMUNICATOR
.sp
When 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.
.sp
.SH NOTES ON COLLECTIVE OPERATIONS
The reduction functions (
.I MPI_Op
) do not return an error value. As a result,
if the functions detect an error, all they can do is either call
.I MPI_Abort
or silently skip the problem. Thus, if you change the error handler from
.I MPI_ERRORS_ARE_FATAL
to something else, for example,
.I MPI_ERRORS_RETURN
,
then no error may be indicated.
The reason for this is the performance problems in ensuring that
all collective routines return the same error value.
.SH ERRORS
Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument.
.sp
Before the error value is returned, the current MPI error handler is
called. 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.
.SH SEE ALSO
MPI_Reduce_scatter