PetscLogEventEnd — PETSc 3.22.5 documentation

Skip to main content
`Ctrl`+`K`

# PetscLogEventEnd

Log the end of a user event.

## Synopsis

    #include <petsclog.h>
    PetscErrorCode PetscLogEventEnd(PetscLogEvent e, PetscObject o1, PetscObject o2, PetscObject o3, PetscObject o4)

Not Collective

## Input Parameters

- e - `PetscLogEvent` obtained from `PetscLogEventRegister()`

- o1 - object associated with the event, or `NULL`

- o2 - object associated with the event, or `NULL`

- o3 - object associated with the event, or `NULL`

- o4 - object associated with the event, or `NULL`

## Fortran Synopsis

void PetscLogEventEnd(int e, PetscErrorCode ierr)

## Example 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);

## See Also

Profiling, `PetscLogEventRegister()`, `PetscLogEventBegin()`, `PetscLogFlops()`

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