PetscLogFlops#

Adds floating point operations to the global counter.

Synopsis#

#include <petsclog.h>
PetscErrorCode PetscLogFlops(PetscLogDouble f)

Not Collective

Input Parameter#

  • f - flop counter

Usage#

     PetscLogEvent USER_EVENT;
     PetscLogEventRegister("User event",0,&USER_EVENT);
     PetscLogEventBegin(USER_EVENT,0,0,0,0);
        [code segment to monitor]
        PetscLogFlops(user_flops)
     PetscLogEventEnd(USER_EVENT,0,0,0,0);

Note#

A global counter logs all PETSc flop counts. The user can use PetscLogFlops() to increment this counter to include flops for the application code.

See Also#

Profiling, PetscLogGPUFlops(), PetscLogEventRegister(), PetscLogEventBegin(), PetscLogEventEnd(), PetscGetFlops()

Level#

intermediate

Location#

src/sys/logging/plog.c

Examples#

src/ksp/ksp/tutorials/ex9.c
src/snes/tutorials/ex14.c
src/snes/tutorials/ex15.c
src/snes/tutorials/ex18.c
src/snes/tutorials/ex19.c
src/snes/tutorials/ex22.c
src/snes/tutorials/ex33.c
src/snes/tutorials/ex46.c
src/snes/tutorials/ex5.c
src/snes/tutorials/ex55.c
src/snes/tutorials/ex55k.kokkos.cxx


Edit on GitLab

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