WHen the communicator is an intracommunicator, you can perform a scanning 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 argument. The input data is taken from the receive buffer and replaced by the output data.
.SHNOTESONCOLLECTIVEOPERATIONS
.ftR
The reduction functions of type MPI_Op do not return an error value.
As a result, if the functions detect an error, all they can do is
either call MPI_Abort or silently skip the problem. Thus, if the
error handler is changed from MPI_ERRORS_ARE_FATAL to something else
(e.g., MPI_ERRORS_RETURN), then no error may be indicated.
.sp
The reason for this is the performance problems in ensuring that
all collective routines return the same error value.
.SHERRORS
.ftR
Almost 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.
.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.
.sp
See the MPI man page for a full list of MPI error codes.