History log of /petsc/src/sys/logging/handler/impls/default/logdefault.c (Results 76 – 82 of 82)
Revision Date Author Comments
# 6c37f76f 27-Jul-2023 Satish Balay <balay@mcs.anl.gov>

Merge branch 'tisaac/feature-log-handler' into 'main'

Deglobalize logging into PetscLogHandler and PetscLogState

See merge request petsc/petsc!6709


# dff009be 24-Jul-2023 Toby Isaac <toby.isaac@gmail.com>

Profiling: Add composed functions for default log handler functions

This makes them extensible to other implementations.
Where appropriate, the global log handler will now dispatch
these functions t

Profiling: Add composed functions for default log handler functions

This makes them extensible to other implementations.
Where appropriate, the global log handler will now dispatch
these functions to all running log handlers.

It is not always appropriate to dispatch to all running log handlers:
when a single return value is expected or when a filename
is given, it will continue to dispatch only to the default
log handler.

show more ...


# 294de794 20-Jul-2023 Toby Isaac <toby.isaac@gmail.com>

Profiling: Rename PETSC_LOG_HANDLER_XXX -> PETSCLOGHANDLERXXX


# 461318eb 19-Jul-2023 Toby Isaac <toby.isaac@gmail.com>

Profiling: add flag for testing threadsafe data structures

We don't have coverage tests with PETSC_HAVE_THREADSAFETY, so
this flag allows us to test the data structures even without
it.


# b665b14e 18-Jul-2023 Toby Isaac <toby.isaac@gmail.com>

Profiling: Switch logging over to the new PetscLogHandler infrastructure

- Move data structures only needed by the default logger now (Action,
Object) to logdefault.c

- Create petsclogdeprecated.

Profiling: Switch logging over to the new PetscLogHandler infrastructure

- Move data structures only needed by the default logger now (Action,
Object) to logdefault.c

- Create petsclogdeprecated.h and petsc/private/logimpldeprecated.h
for publicly visible symbols that are now deprecated. Yes,
lots of symbols in petsc/private/logimpl.h were not only visible
but had docstrings.

- The macros PetscLogEventBegin(), PetscLogEventEnd(),
PetscLogEventSync(), PetscLogObjectCreate(), and
PetscLogObjectDestroy() now looks through the log handlers
in PetscLogHandlers, sees if they have they appropriate
callbacks (Exposed in PetscLogHandlerHot), and calls them.
Up to 4 log handlers can run simultaneously.

- All queries about the registered things now go through
petsc_log_state.

- Output functions dispatch to the appropriate PetscLogHandler

- There is no need for xmllogevent.c, xmlviewer.c, eventlog.c,
classlog.c, and stagelog.c anymore. Some orphaned functions
(PetscLogSetThreshold(), PetscLogEventSetDof(),
PetscLogEventSetError(), PetscASend(), PetscARecv(), PetscAReduce())

- PetscFEOpenCLLogResidual() did some intrusive things related
to the old logging infrastruture: the private header
for the default log handler is now imported into feopencl.c
so that it can do equivalent things with the new infrastructure.

- PetscLogPauseCurrentEvent_Internal() is replaced with
PetscLogEventsPause()

Deprecated symbols include:

- All functions related to PetscStageLog and the resizable array structs
that it contained.

- The legacy EventBegin()/EventEnd() callbacks.

- PetscLogAllBegin(), which actually reported less information than
PetscLogDefaultBegin() because it was not kept up-to-date with
regards to GPU profiling.

show more ...


# 2611ad71 14-Jul-2023 Toby Isaac <toby.isaac@gmail.com>

Profiling: Improve !defined(PETSC_USE_LOG) #defines

- If we cast macro arguments to void, we can avoid unused errors that have
forced lots of conditionally included code like this:

```c
#if def

Profiling: Improve !defined(PETSC_USE_LOG) #defines

- If we cast macro arguments to void, we can avoid unused errors that have
forced lots of conditionally included code like this:

```c
#if defined(PETSC_USE_LOG)
PetscLogEvent event;
#endif
```

- Having global counters like petsc_TotalFlops externed event
if !PetscDefined(USE_LOG) helps to remove a lot of needless
`#ifdef`s around code that can instead be placed in
`if (PetscDefined(USE_LOG)) {}` blocks.

show more ...


# 78f1b9b4 13-Jul-2023 Toby Isaac <toby.isaac@gmail.com>

Profiling: Implement the default PetscLogHandler

The existing default log handling that uses the PetscStageLog
is translated in the PetscLogHandler_Default implementation
of PetscLogHandler.

- Most

Profiling: Implement the default PetscLogHandler

The existing default log handling that uses the PetscStageLog
is translated in the PetscLogHandler_Default implementation
of PetscLogHandler.

- Most data that is global in the existing log handling
is moved into the struct, with the exception of the
raw counters.

- The registry data structures of PetscStageLog (eventLog,
classLog) are not reproduced because they are now in
the PetscLogState interface.

- PETSC_LOG_RESIZABLE_ARRAY is used to implement
resizable arrays instead of PetscStageInfo,
PetscEventPerfLog, and PetscClassPerfLog

- The tau perfstubs and MPE functionality is not
reproduced because they will become new
handlers on their own.

- The PetscLogGlobalNames provided by the
PetscLogRegistry interface make the logging
robust to differences in which events / stages are
registered on which process and in which order.

Otherwise the functions are relatively faithful translations
of the existing PetscStageLog functions into the new interface.
When reviewing this commit it might help to have a diff
between the PetscStageLog and PetscLogHandler_Default functions
to see what changes between them. I am working on a way to attach
that to the MR associated with this change.

show more ...


1234