petsc-3.5.4 2015-05-23
PetscLogEventBegin
Logs the beginning of a user event.
Synopsis
#include
PetscErrorCode PetscLogEventBegin(int e,PetscObject o1,PetscObject o2,PetscObject o3,PetscObject o4)
Not Collective
Input Parameters
| e | - integer associated with the event obtained from PetscLogEventRegister()
|
| o1,o2,o3,o4 | - objects associated with the event, or 0
|
Fortran Synopsis
void PetscLogEventBegin(int e,PetscErrorCode ierr)
Usage
PetscLogEvent USER_EVENT;
PetscLogDouble user_event_flops;
PetscLogEventRegister("User event",0,&USER_EVENT);
PetscLogEventBegin(USER_EVENT,0,0,0,0);
[code segment to monitor]
PetscLogFlops(user_event_flops);
PetscLogEventEnd(USER_EVENT,0,0,0,0);
Notes
You need to register each integer event with the command
PetscLogEventRegister(). The source code must be compiled with
-DPETSC_USE_LOG, which is the default.
PETSc automatically logs library events if the code has been
compiled with -DPETSC_USE_LOG, and -log, -log_summary, or -log_all are
specified. PetscLogEventBegin() is intended for logging user events
to supplement this PETSc information.
See Also
PetscLogEventRegister(), PetscLogEventEnd(), PetscLogFlops()
Keywords
log, event, begin
Level:intermediate
Location:src/sys/logging/plog.c
Index of all Profiling routines
Table of Contents for all manual pages
Index of all manual pages
Examples
src/sys/classes/random/examples/tutorials/ex1.c.html
src/sys/examples/tutorials/ex3.c.html
src/sys/examples/tutorials/ex3f.F.html
src/vec/vec/examples/tutorials/ex5.c.html
src/vec/vec/examples/tutorials/ex10.c.html
src/vec/vec/examples/tutorials/ex15.c.html
src/ksp/ksp/examples/tutorials/ex4.c.html
src/ksp/ksp/examples/tutorials/ex9.c.html
src/snes/examples/tutorials/ex12.c.html
src/snes/examples/tutorials/ex54.c.html
src/snes/examples/tutorials/ex62.c.html