MPIU_Allreduce#
A replacement for MPI_Allreduce()
that (1) performs single-count MPIU_INT
operations in PetscInt64
to detect integer overflows and (2) tries to determine if the call from all the MPI ranks occur in the same place in the PETSc code. This helps to detect bugs where different MPI ranks follow different code paths resulting in inconsistent and incorrect calls to MPI_Allreduce()
.
Synopsis#
#include <petscsys.h>
PetscMPIInt MPIU_Allreduce(void *indata,void *outdata,PetscCount count,MPI_Datatype dtype, MPI_Op op, MPI_Comm comm);
Collective
Input Parameters#
a - pointer to the input data to be reduced
count - the number of MPI data items in
a
andb
dtype - 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#
b - the reduced values
Note#
Should be wrapped with PetscCallMPI()
for error checking
See Also#
Level#
developer
Location#
Examples#
src/dm/impls/plex/tutorials/ex10.c
src/ts/tutorials/ex9.c
src/ts/tutorials/ex44.c
src/ts/tutorials/ex11.c
src/ts/tutorials/ex77.c
src/ts/tutorials/ex11_sa.c
src/dm/impls/plex/tutorials/ex16.c
src/ts/tutorials/ex14.c
src/ts/tutorials/ex18.c
src/ts/tutorials/ex30.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages