MPI_Reduce
Reduces values on all processes to a single value.
Syntax
r = MPI_Reduce(Value, Operation, Root)
r = MPI_Reduce(Value, Operation, Root, Comm)
Input argument
Value - value to send: numeric or logical array (sparse not supported).
Operation - a string: MPI_SUM, MPI_MAX, MPI_MIN, MPI_SUM, MPI_PROD, MPI_LAND, MPI_LOR, MPI_BAND, MPI_BOR, MPI_LXOR or MPI_BXOR
Root - a integer value: rank of root process.
Comm - a MPI_Comm object.
Output argument
r - received value
Description
Reduces values on all processes to a single value.
Nelson does not check to ensure that the reduction operation are all the same size across the various processes in the group.
Please be sure that each process passes the same sized array to the MPI_Allreduce operation.
See also
Example
mpiexec([modulepath('mpi'), '/examples/help_examples/MPI_Reduce.m'], 4)
History
1.0.0
initial version
Author
Allan CORNET
Last updated