PLogFlops

Adds floating point operations to the global counter.

Input Parameter

f -flop counter

Synopsis

void PLogFlops(int f)

Notes

A global counter logs all PETSc flop counts. The user can usePLogFlops() to increment this counter to include flops for theapplication code.

PETSc automatically logs library events if the code has beencompiled with -DUSE_PETSC_LOG (which is the default), and -log, -log_summary, or -log_all are specified. PLogFlops() isintended for logging user flops to supplement this PETScinformation.

Example of Usage

    int USER_EVENT;
    PLogEventRegister(&USER_EVENT,"User event","Color:");
    PLogEventBegin(USER_EVENT,0,0,0,0);
       [code segment to monitor]
       PLogFlops(user_flops)
    PLogEventEnd(USER_EVENT,0,0,0,0);

See Also

PLogEventRegister(), PLogEventBegin(), PLogEventEnd(), PetscGetFlops()

Keywords

log, flops, floating point operations

Examples

src/mat/examples/tutorials/ex1.c
src/sles/examples/tutorials/ex10.c
src/sles/examples/tutorials/ex9.c
src/sys/examples/tutorials/ex3f.F
src/sys/examples/tutorials/ex3.c

Location: include/petsclog.h
Logging Index
Table of Contents