:orphan: # PetscLogEventSync Synchronizes the beginning of a user event. ## Synopsis ``` #include PetscErrorCode PetscLogEventSync(int e,MPI_Comm comm) ``` Collective ## Input Parameters - ***e -*** integer associated with the event obtained from PetscLogEventRegister() - ***comm -*** an MPI communicator ## Usage ```none PetscLogEvent USER_EVENT; PetscLogEventRegister("User event",0,&USER_EVENT); PetscLogEventSync(USER_EVENT,PETSC_COMM_WORLD); PetscLogEventBegin(USER_EVENT,0,0,0,0); [code segment to monitor] PetscLogEventEnd(USER_EVENT,0,0,0,0); ``` ## Note This routine should be called only if there is not a `PetscObject` available to pass to `PetscLogEventBegin()`. ## See Also [](ch_profiling), `PetscLogEventRegister()`, `PetscLogEventBegin()`, `PetscLogEventEnd()` ## Level developer ## Location src/sys/logging/plog.c ## Examples src/sys/tutorials/ex3.c
--- [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)