Actual source code: petsclogdeprecated.h
1: #pragma once
3: #include <petsclog.h>
5: /* MANSEC = Sys */
6: /* SUBMANSEC = Log */
8: /* These data structures are no longer used by any non-deprecated PETSc interface functions */
10: typedef struct {
11: char *name;
12: PetscClassId classid;
13: } PetscClassRegInfo;
15: typedef struct _n_PetscClassRegLog *PetscClassRegLog;
16: struct _n_PetscClassRegLog {
17: int numClasses;
18: int maxClasses;
19: PetscClassRegInfo *classInfo;
20: };
22: typedef struct {
23: PetscClassId id;
24: int creations;
25: int destructions;
26: PetscLogDouble mem;
27: PetscLogDouble descMem;
28: } PetscClassPerfInfo;
30: typedef struct _n_PetscClassPerfLog *PetscClassPerfLog;
31: struct _n_PetscClassPerfLog {
32: int numClasses;
33: int maxClasses;
34: PetscClassPerfInfo *classInfo;
35: };
37: typedef struct {
38: char *name;
39: PetscClassId classid;
40: PetscBool collective;
41: #if defined(PETSC_HAVE_TAU_PERFSTUBS)
42: void *timer;
43: #endif
44: #if defined(PETSC_HAVE_MPE)
45: int mpe_id_begin;
46: int mpe_id_end;
47: #endif
48: } PetscEventRegInfo;
50: typedef struct _n_PetscEventRegLog *PetscEventRegLog;
51: struct _n_PetscEventRegLog {
52: int numEvents;
53: int maxEvents;
54: PetscEventRegInfo *eventInfo; /* The registration information for each event */
55: };
57: typedef struct _n_PetscEventPerfLog *PetscEventPerfLog;
58: struct _n_PetscEventPerfLog {
59: int numEvents;
60: int maxEvents;
61: PetscEventPerfInfo *eventInfo;
62: };
64: typedef struct _PetscStageInfo {
65: char *name;
66: PetscBool used;
67: PetscEventPerfInfo perfInfo;
68: PetscClassPerfLog classLog;
69: #if defined(PETSC_HAVE_TAU_PERFSTUBS)
70: void *timer;
71: #endif
72: } PetscStageInfo;
74: typedef struct _n_PetscStageLog *PetscStageLog;
75: struct _n_PetscStageLog {
76: int numStages;
77: int maxStages;
78: PetscIntStack stack;
79: int curStage;
80: PetscStageInfo *stageInfo;
81: PetscEventRegLog eventLog;
82: PetscClassRegLog classLog;
83: };
85: PETSC_DEPRECATED_OBJECT(3, 20, 0, "PetscLogGetState()", "PetscStageLog is no longer used.") PETSC_UNUSED static PetscStageLog petsc_stageLog = PETSC_NULLPTR;
87: /*@C
88: PetscLogGetStageLog - Deprecated.
90: Level: deprecated
92: Note:
93: PETSc performance logging and profiling is now split up between the logging state (`PetscLogState`) and the log handler (`PetscLogHandler`).
94: The global logging state is obtained with `PetscLogGetState()`; many log handlers may be used at once (`PetscLogHandlerStart()`) and the default log handler is not directly accessible.
96: .seealso: [](ch_profiling), `PetscLogEventGetPerfInfo()`
97: @*/
98: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "PetscLogGetState()", "PetscStageLog is no longer used.") static inline PetscErrorCode PetscLogGetStageLog(PetscStageLog *s)
99: {
100: *s = PETSC_NULLPTR;
101: return PETSC_SUCCESS;
102: }
104: /*@C
105: PetscStageLogGetCurrent - Deprecated
107: Level: deprecated
109: .seealso: [](ch_profiling)
110: @*/
111: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "PetscLogStateGetCurrentStage()", "PetscStageLog is no longer used.") static inline PetscErrorCode PetscStageLogGetCurrent(PetscStageLog a, int *b)
112: {
113: (void)a;
114: *b = -1;
115: return PETSC_SUCCESS;
116: }
118: /*@C
119: PetscStageLogGetEventPerfLog - Deprecated
121: Level: deprecated
123: Note:
124: PETSc performance logging and profiling is now split up between the logging state (`PetscLogState`) and the log handler (`PetscLogHandler`).
125: The global logging state is obtained with `PetscLogGetState()`; many log handlers may be used at once (`PetscLogHandlerStart()`) and the default log handler is not directly accessible.
127: .seealso: [](ch_profiling)
128: @*/
129: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "PetscLogStateEventGetInfo()", "PetscStageLog is no longer used.") static inline PetscErrorCode PetscStageLogGetEventPerfLog(PetscStageLog a, int b, PetscEventPerfLog *c)
130: {
131: (void)a;
132: (void)b;
133: *c = PETSC_NULLPTR;
134: return PETSC_SUCCESS;
135: }
137: PETSC_DEPRECATED_OBJECT(3, 20, 0, "PetscLogLegacyCallbacksBegin()", ) PETSC_UNUSED static PetscErrorCode (*PetscLogPLB)(PetscLogEvent, int, PetscObject, PetscObject, PetscObject, PetscObject) = PETSC_NULLPTR;
138: PETSC_DEPRECATED_OBJECT(3, 20, 0, "PetscLogLegacyCallbacksBegin()", ) PETSC_UNUSED static PetscErrorCode (*PetscLogPLE)(PetscLogEvent, int, PetscObject, PetscObject, PetscObject, PetscObject) = PETSC_NULLPTR;
139: PETSC_DEPRECATED_OBJECT(3, 20, 0, "PetscLogLegacyCallbacksBegin()", ) PETSC_UNUSED static PetscErrorCode (*PetscLogPHC)(PetscObject) = PETSC_NULLPTR;
140: PETSC_DEPRECATED_OBJECT(3, 20, 0, "PetscLogLegacyCallbacksBegin()", ) PETSC_UNUSED static PetscErrorCode (*PetscLogPHD)(PetscObject) = PETSC_NULLPTR;
142: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "nothing", "PETSc does not guarantee a stack property of logging events.") static inline PetscErrorCode PetscLogPushCurrentEvent_Internal(PetscLogEvent e)
143: {
144: (void)e;
145: return PETSC_SUCCESS;
146: }
148: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "nothing", "PETSc does not guarantee a stack property of logging events.") static inline PetscErrorCode PetscLogPopCurrentEvent_Internal(void)
149: {
150: return PETSC_SUCCESS;
151: }
153: /*@C
154: PetscLogAllBegin - Equivalent to `PetscLogDefaultBegin()`.
156: Logically Collective on `PETSC_COMM_WORLD`
158: Level: deprecated
160: Note:
161: In previous versions, PETSc's documentation stated that `PetscLogAllBegin()` "Turns on extensive logging of objects and events," which was not actually true.
162: The actual way to turn on extensive logging of objects and events was, and remains, to call `PetscLogActions()` and `PetscLogObjects()`.
164: .seealso: [](ch_profiling), `PetscLogDump()`, `PetscLogDefaultBegin()`, `PetscLogActions()`, `PetscLogObjects()`
165: @*/
166: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "PetscLogDefaultBegin()", ) static inline PetscErrorCode PetscLogAllBegin(void)
167: {
168: return PetscLogDefaultBegin();
169: }
171: /*@C
172: PetscLogSet - Deprecated.
174: Level: deprecated
176: Note:
177: PETSc performance logging and profiling is now split up between the logging state (`PetscLogState`) and the log handler (`PetscLogHandler`).
178: The global logging state is obtained with `PetscLogGetState()`; many log handlers may be used at once (`PetscLogHandlerStart()`) and the default log handler is not directly accessible.
180: .seealso: [](ch_profiling), `PetscLogEventGetPerfInfo()`
181: @*/
182: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "PetscLogLegacyCallbacksBegin()", )
183: static inline PetscErrorCode PetscLogSet(PetscErrorCode (*a)(int, int, PetscObject, PetscObject, PetscObject, PetscObject), PetscErrorCode (*b)(int, int, PetscObject, PetscObject, PetscObject, PetscObject))
184: {
185: return PetscLogLegacyCallbacksBegin(a, b, PETSC_NULLPTR, PETSC_NULLPTR);
186: }