PetscMPITypeSizeComm#

Atomically add a PetscLogDouble value to both a global counter and its per-thread counterpart based on the length of an MPI_Datatype

Synopsis#

static inline PetscErrorCode PetscMPITypeSizeComm(MPI_Comm comm, const PetscMPIInt *counts, MPI_Datatype type, PetscLogDouble *length, PetscLogDouble *length_th)

Not Collective; No Fortran Support

Input Parameters#

  • comm - the MPI_Comm that shared the communication of the MPI_Datatype

  • counts - the length of the array containing a specific MPI_Datatype being sent to each MPI process

  • type - the MPI_Datatype

  • length - pointer to the global counter to update

  • length_th - pointer to the per-thread counter to update

Note#

When PETSc is built without thread safety this is a fast routine that performs the same update without locking.

Developer Note#

This should have a better name related to its functionality

See Also#

PetscAddLogDouble(), PetscAddLogDoubleCnt(), PetscLogFlops(), PetscLogDouble, PetscMPITypeSize()

Level#

developer

Location#

include/petsclog.h


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