# PetscLogEventEnd

Log the end of a user event.

### Input Parameters

| e | - integer associated with the event obtained with PetscLogEventRegister()
| o1,o2,o3,o4 | - objects associated with the event, or 0

### Synopsis

    void PetscLogEventEnd(int e,PetscObject o1,PetscObject o2,PetscObject o3,
    PetscObject o4)

### Fortran Synopsis

void PetscLogEventEnd(int e,int ierr)

### Usage

         int USER_EVENT;
         int user_event_flops;
         PetscLogEventRegister(&USER_EVENT,"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 should also register each additional integer event with the command PetscLogEventRegister(). 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. PetscLogEventEnd() is intended for logging user events to supplement this PETSc information.

### See Also

PetscLogEventRegister(), PetscLogEventBegin(), PetscLogFlops()

### Keywords

log, event, end

Level:intermediate
Location: src/sys/src/plog/plog.c
Index of all Profiling routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/sys/examples/tutorials/ex3.c.html
src/sys/examples/tutorials/ex3f.F.html
src/vec/examples/tutorials/ex5.c.html
src/ksp/examples/tutorials/ex9.c.html
src/dm/ao/examples/tutorials/ex2.c.html