petsc-3.8.4 2018-03-24
Report Typos and Errors


a PETSc replacement for MPI_Allreduce() that tries to determine if the call from all the MPI processes occur from the same place in the PETSc code. This helps to detect bugs where different MPI processes follow different code paths resulting in inconsistent and incorrect calls to MPI_Allreduce(). Collective on MPI_Comm


#include <petscsys.h>
PetscErrorCode MPIU_Allreduce(void *indata,void *outdata,PetscMPIInt count,MPI_Datatype datatype, MPI_Op op, MPI_Comm comm);

Input Parameters

indata - pointer to the input data to be reduced
count - the number of MPI data items in indata and outdata
datatype - the MPI datatype, for example MPI_INT
op - the MPI operation, for example MPI_SUM
comm - the MPI communicator on which the operation occurs

Output Parameter

outdata -the reduced values


In optimized mode this directly calls MPI_Allreduce()

See Also


Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages