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

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);

Notes

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

PetscLogEventRegister(), PetscLogEventBegin(), PetscLogEventEnd(), PetscGetFlops()

Keywords

log, flops, floating point operations

Level

intermediate

Location

src/sys/logging/plog.c

Examples

src/sys/logging/examples/tutorials/ex1f.F90.html
src/sys/examples/tutorials/ex3.c.html
src/sys/examples/tutorials/ex3f.F.html
src/ksp/ksp/examples/tutorials/ex9.c.html
src/snes/examples/tutorials/ex5.c.html
src/snes/examples/tutorials/ex5s.c.html
src/snes/examples/tutorials/ex9.c.html
src/snes/examples/tutorials/ex14.c.html
src/snes/examples/tutorials/ex15.c.html
src/snes/examples/tutorials/ex18.c.html
src/snes/examples/tutorials/ex19.c.html

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