> On Apr 21, 2015, at 11:25 AM, Håkon Strandenes <[email protected]> wrote: > > 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.
However as Jed notes MPI_MIN, MPI_MAX and MPI_SUM do not work with __float128, hence to have PETSc code that works for --with-precision=__float128 one must use MPIU_MIN, MPIU_MAX, and MPIU_SUM for PetscReal and PetscScalar > > (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.) > > Håkon > > > 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
