# PetscGetFlops

Returns the number of flops used on this processor since the program began.

### Synopsis

    #include "petsc.h"
    PetscErrorCode PETSC_DLLEXPORT PetscGetFlops(PetscLogDouble *flops)

Not Collective

### Output Parameter

flops - number of floating point operations

### 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.

PETSc automatically logs library events if the code has been compiled with -DPETSC_USE_LOG (which is the default), and -log, -log_summary, or -log_all are specified. PetscLogFlops() is intended for logging user flops to supplement this PETSc information.

### Keywords

log, flops, floating point operations

### See Also

PetscGetTime(), PetscLogFlops()

Level:intermediate
Location:src/sys/plog/plog.c
Index of all Profiling routines
Table of Contents for all manual pages
Index of all manual pages