PETSc version 3.16.6
Fix/Edit manual page

PetscLogEventBegin

Logs the beginning of a user event.

Synopsis

#include <petsclog.h>
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().

See Also

PetscLogEventRegister(), PetscLogEventEnd(), PetscLogFlops()

Level

intermediate

Location

src/sys/logging/plog.c

Examples

src/sys/classes/random/tutorials/ex1.c.html
src/sys/logging/tutorials/ex1f.F90.html
src/sys/tutorials/ex3.c.html
src/sys/tutorials/ex3f.F.html
src/vec/vec/tutorials/ex5.c.html
src/vec/vec/tutorials/ex10.c.html
src/vec/vec/tutorials/ex15.c.html
src/vec/vec/tutorials/ex5f.F90.html
src/ksp/ksp/tutorials/ex9.c.html

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