[petsc-dev] Custom reductions

Håkon Strandenes haakon at hakostra.net
Tue Apr 21 11:25:22 CDT 2015

The MPI_MIN, MPI_MAX and MPI_SUM only indicate that we want to have the 
smallest or largest value, or in case of MPI_SUM, the sum of all values 
participating in the reduction. It has nothing to do with floting point 
or integer types as such, they work with both.

(In addition there is some boolean operations like MPI_LAND, MPI_LOR, 
MPI_LXOR, MPI_BAND, MPI_BOR that work with boolean types, and some 
operations like MPI_SUM and MPI_PROD can also be used with complex 
types, but I don't know if PETSc use this at all.)


On 21. april 2015 18:11, Matthew Knepley wrote:
> I understood from Jed that MPIU_MIN and friends are for floating point,
> but here
> https://bitbucket.org/petsc/petsc/src/da407576a5bf29881cba0f2df6c198aa8caa98f0/src/sys/logging/plog.c?at=master#cl-1346
> we use MPI_MIN. Is this wrong?
>    Thanks,
>       Matt
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which
> their experiments lead.
> -- Norbert Wiener

More information about the petsc-dev mailing list