:orphan: # PetscLogEventEnd Log the end of a user event. ## Synopsis ``` #include PetscErrorCode PetscLogEventEnd(int e,PetscObject o1,PetscObject o2,PetscObject o3,PetscObject o4) ``` Not Collective ## Input Parameters - ***e -*** integer associated with the event obtained with PetscLogEventRegister() - ***o1,o2,o3,o4 -*** objects associated with the event, or 0 ## Fortran Synopsis void PetscLogEventEnd(int e,PetscErrorCode ierr) ## Usage ```none 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); ``` ## See Also [](ch_profiling), `PetscLogEventRegister()`, `PetscLogEventBegin()`, `PetscLogFlops()` ## Level intermediate ## Location src/sys/logging/plog.c ## Examples src/ksp/ksp/tutorials/ex9.c
src/mat/tutorials/ex5cu.cu
src/mat/tutorials/ex5k.kokkos.cxx
src/sys/classes/random/tutorials/ex1.c
src/sys/tutorials/ex3.c
src/sys/tutorials/ex3f.F90
src/sys/tutorials/ex3f90.F90
src/vec/vec/tutorials/ex10.c
src/vec/vec/tutorials/ex15.c
src/vec/vec/tutorials/ex5.c
src/vec/vec/tutorials/ex5f.F90
--- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/logging/plog.c) [Index of all Profiling routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)