petsc-3.9.4 2018-09-11
Report Typos and Errors

MPIU_Allreduce

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

Synopsis

#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

Notes

In optimized mode this directly calls MPI_Allreduce()

See Also

MPI_Allreduce()

Level

developer

Location

include/petscsys.h

Examples

src/ksp/ksp/examples/tutorials/ex10.c.html

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