PetscLogHandlerCreateLegacy#
Create a PetscLogHandler
from callbacks matching PETSc’s legacy log handler callbacks
Synopsis#
PetscErrorCode PetscLogHandlerCreateLegacy(MPI_Comm comm, PetscErrorCode (*PetscLogPLB)(PetscLogEvent e, int _i, PetscObject o1, PetscObject o2, PetscObject o3, PetscObject o4), PetscErrorCode (*PetscLogPLE)(PetscLogEvent e, int _i, PetscObject o1, PetscObject o2, PetscObject o3, PetscObject o4), PetscErrorCode (*PetscLogPHC)(PetscObject o), PetscErrorCode (*PetscLogPHD)(PetscObject o), PetscLogHandler *handler)
Collective
Input Parameters#
comm - an MPI communicator
PetscLogPLB - a function to call during
PetscLogHandlerEventBegin()
(orNULL
)PetscLogPLE - a function to call during
PetscLogHandlerEventEnd()
(orNULL
)PetscLogPHC - a function to call during
PetscLogHandlerObjectCreate()
(orNULL
)PetscLogPHD - a function to call during
PetscLogHandlerObjectDestroy()
(orNULL
)
Output Parameter#
handler - a
PetscLogHandler
Calling sequence of PetscLogPLB
#
e - a
PetscLogEvent
that is beginning_i - deprecated, unused
o1 - a
PetscObject
associated withe
(orNULL
)o2 - a
PetscObject
associated withe
(orNULL
)o3 - a
PetscObject
associated withe
(orNULL
)o4 - a
PetscObject
associated withe
(orNULL
)
Calling sequence of PetscLogPLE
#
e - a
PetscLogEvent
that is beginning_i - deprecated, unused
o1 - a
PetscObject
associated withe
(orNULL
)o2 - a
PetscObject
associated withe
(orNULL
)o3 - a
PetscObject
associated withe
(orNULL
)o4 - a
PetscObject
associated withe
(orNULL
)
Calling sequence of PetscLogPHC
#
o - a
PetscObject
that has just been created
Calling sequence of PetscLogPHD
#
o - a
PetscObject
that is about to be destroyed
Notes#
This is for transitioning from the deprecated function PetscLogSet()
and should not be used in new code.
PetscLogLegacyCallbacksBegin()
, which calls this function, creates and starts (PetscLogHandlerStart()
) a log handler,
should be used in almost all cases.
See Also#
Level#
developer
Location#
src/sys/logging/handler/impls/legacy/loglegacy.c
Index of all Profiling routines
Table of Contents for all manual pages
Index of all manual pages