Fix/Edit manual page

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

Synopsis

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

Input Parameters

a - pointer to the input data to be reduced
c - the number of MPI data items in a and b
d - the MPI datatype, for example MPI_INT
e - the MPI operation, for example MPI_SUM
fcomm - the MPI communicator on which the operation occurs

Output Parameter

b - the reduced values

Notes

In optimized mode this directly calls MPI_Allreduce()

This is defined as a macro that can return error codes internally so it cannot be used in a subroutine that returns void.

The error code this returns should be checked with CHKERRMPI()

See Also

MPI_Allreduce()

Level

developer

Location

include/petscsys.h

Examples

src/ksp/ksp/tutorials/ex10.c.html
src/ksp/ksp/tutorials/ex82.c.html
src/ts/utils/dmplexlandau/tutorials/ex2.c.html

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