PetscLogHandlerCreate — PETSc 3.25.2 documentation

Skip to main content
`Ctrl`+`K`

# PetscLogHandlerCreate

Create a log handler for profiling events and stages. PETSc provides several implementations of `PetscLogHandler` that interface to different ways to summarize or visualize profiling data: see `PetscLogHandlerType` for a list.

## Synopsis

    #include "petscsys.h"
    PetscErrorCode PetscLogHandlerCreate(MPI_Comm comm, PetscLogHandler *handler)

Collective

## Input Parameter

- comm - the communicator for synchronizing and viewing events with this handler

## Output Parameter

- handler - the `PetscLogHandler`

## Notes

This does not put the handler in use in PETSc’s global logging system: use `PetscLogHandlerStart()` after creation.

See `PetscLogHandler` for example usage.

## See Also

Profiling, `PetscLogHandler`, `PetscLogHandlerSetType()`, `PetscLogHandlerStart()`, `PetscLogHandlerStop()`

## Level

developer

## Location

src/sys/logging/handler/interface/loghandler.c

## Implementations

PetscLogHandlerCreate_Default() in src/sys/logging/handler/impls/default/logdefault.c
PetscLogHandlerCreate_Legacy() in src/sys/logging/handler/impls/legacy/loglegacy.c
PetscLogHandlerCreate_MPE() in src/sys/logging/handler/impls/mpe/logmpe.c
PetscLogHandlerCreate_Nested() in src/sys/logging/handler/impls/nested/lognested.c
PetscLogHandlerCreate_NVTX() in src/sys/logging/handler/impls/nvtx/lognvtx.c
PetscLogHandlerCreate_Perfstubs() in src/sys/logging/handler/impls/perfstubs/logperfstubs.c
PetscLogHandlerCreate_ROCTX() in src/sys/logging/handler/impls/roctx/logroctx.c
PetscLogHandlerCreate_Trace() in src/sys/logging/handler/impls/trace/logtrace.c

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