Actual source code: petsclogdeprecated.h
1: #pragma once
3: /*
4: This is a continuation of petsclog.h: it is included at the bottom of petsclog.h
5: */
7: /* MANSEC = Sys */
8: /* SUBMANSEC = Log */
10: /* These data structures are no longer used by any non-deprecated PETSc interface functions */
12: typedef struct {
13: char *name;
14: PetscClassId classid;
15: } PetscClassRegInfo;
17: typedef struct _n_PetscClassRegLog *PetscClassRegLog;
18: struct _n_PetscClassRegLog {
19: int numClasses;
20: int maxClasses;
21: PetscClassRegInfo *classInfo;
22: };
24: typedef struct {
25: PetscClassId id;
26: int creations;
27: int destructions;
28: PetscLogDouble mem;
29: PetscLogDouble descMem;
30: } PetscClassPerfInfo;
32: typedef struct _n_PetscClassPerfLog *PetscClassPerfLog;
33: struct _n_PetscClassPerfLog {
34: int numClasses;
35: int maxClasses;
36: PetscClassPerfInfo *classInfo;
37: };
39: typedef struct {
40: char *name;
41: PetscClassId classid;
42: PetscBool collective;
43: #if PetscDefined(HAVE_TAU_PERFSTUBS)
44: void *timer;
45: #endif
46: #if PetscDefined(HAVE_MPE)
47: int mpe_id_begin;
48: int mpe_id_end;
49: #endif
50: } PetscEventRegInfo;
52: typedef struct _n_PetscEventRegLog *PetscEventRegLog;
53: struct _n_PetscEventRegLog {
54: int numEvents;
55: int maxEvents;
56: PetscEventRegInfo *eventInfo; /* The registration information for each event */
57: };
59: typedef struct _n_PetscEventPerfLog *PetscEventPerfLog;
60: struct _n_PetscEventPerfLog {
61: int numEvents;
62: int maxEvents;
63: PetscEventPerfInfo *eventInfo;
64: };
66: typedef struct _PetscStageInfo {
67: char *name;
68: PetscBool used;
69: PetscEventPerfInfo perfInfo;
70: PetscClassPerfLog classLog;
71: #if PetscDefined(HAVE_TAU_PERFSTUBS)
72: void *timer;
73: #endif
74: } PetscStageInfo;
76: typedef struct _n_PetscStageLog *PetscStageLog;
77: struct _n_PetscStageLog {
78: int numStages;
79: int maxStages;
80: PetscIntStack stack;
81: int curStage;
82: PetscStageInfo *stageInfo;
83: PetscEventRegLog eventLog;
84: PetscClassRegLog classLog;
85: };
87: PETSC_DEPRECATED_OBJECT(3, 20, 0, "PetscLogGetState()", "PetscStageLog is no longer used.") PETSC_UNUSED static PetscStageLog petsc_stageLog = PETSC_NULLPTR;
89: /*@
90: PetscLogGetStageLog - Deprecated.
92: Level: deprecated
94: Note:
95: PETSc performance logging and profiling is now split up between the logging state (`PetscLogState`) and the log handler (`PetscLogHandler`).
96: 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.
98: .seealso: [](ch_profiling), `PetscLogEventGetPerfInfo()`
99: @*/
100: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "PetscLogGetState()", "PetscStageLog is no longer used.") static inline PetscErrorCode PetscLogGetStageLog(PetscStageLog *s)
101: {
102: *s = PETSC_NULLPTR;
103: return PETSC_SUCCESS;
104: }
106: /*@
107: PetscStageLogGetCurrent - Deprecated
109: Level: deprecated
111: .seealso: [](ch_profiling)
112: @*/
113: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "PetscLogStateGetCurrentStage()", "PetscStageLog is no longer used.") static inline PetscErrorCode PetscStageLogGetCurrent(PetscStageLog a, int *b)
114: {
115: (void)a;
116: *b = -1;
117: return PETSC_SUCCESS;
118: }
120: /*@
121: PetscStageLogGetEventPerfLog - Deprecated
123: Level: deprecated
125: Note:
126: PETSc performance logging and profiling is now split up between the logging state (`PetscLogState`) and the log handler (`PetscLogHandler`).
127: 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.
129: .seealso: [](ch_profiling)
130: @*/
131: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "PetscLogStateEventGetInfo()", "PetscStageLog is no longer used.") static inline PetscErrorCode PetscStageLogGetEventPerfLog(PetscStageLog a, int b, PetscEventPerfLog *c)
132: {
133: (void)a;
134: (void)b;
135: *c = PETSC_NULLPTR;
136: return PETSC_SUCCESS;
137: }
139: PETSC_DEPRECATED_OBJECT(3, 20, 0, "PetscLogLegacyCallbacksBegin()", ) PETSC_UNUSED static PetscErrorCode (*PetscLogPLB)(PetscLogEvent, int, PetscObject, PetscObject, PetscObject, PetscObject) = PETSC_NULLPTR;
140: PETSC_DEPRECATED_OBJECT(3, 20, 0, "PetscLogLegacyCallbacksBegin()", ) PETSC_UNUSED static PetscErrorCode (*PetscLogPLE)(PetscLogEvent, int, PetscObject, PetscObject, PetscObject, PetscObject) = PETSC_NULLPTR;
141: PETSC_DEPRECATED_OBJECT(3, 20, 0, "PetscLogLegacyCallbacksBegin()", ) PETSC_UNUSED static PetscErrorCode (*PetscLogPHC)(PetscObject) = PETSC_NULLPTR;
142: PETSC_DEPRECATED_OBJECT(3, 20, 0, "PetscLogLegacyCallbacksBegin()", ) PETSC_UNUSED static PetscErrorCode (*PetscLogPHD)(PetscObject) = PETSC_NULLPTR;
144: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "nothing", "PETSc does not guarantee a stack property of logging events.") static inline PetscErrorCode PetscLogPushCurrentEvent_Internal(PetscLogEvent e)
145: {
146: (void)e;
147: return PETSC_SUCCESS;
148: }
150: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "nothing", "PETSc does not guarantee a stack property of logging events.") static inline PetscErrorCode PetscLogPopCurrentEvent_Internal(void)
151: {
152: return PETSC_SUCCESS;
153: }
155: /*@
156: PetscLogAllBegin - Equivalent to `PetscLogDefaultBegin()`.
158: Logically Collective on `PETSC_COMM_WORLD`
160: Level: deprecated
162: Note:
163: In previous versions, PETSc's documentation stated that `PetscLogAllBegin()` "Turns on extensive logging of objects and events," which was not actually true.
164: The actual way to turn on extensive logging of objects and events was, and remains, to call `PetscLogActions()` and `PetscLogObjects()`.
166: .seealso: [](ch_profiling), `PetscLogDump()`, `PetscLogDefaultBegin()`, `PetscLogActions()`, `PetscLogObjects()`
167: @*/
168: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "PetscLogDefaultBegin()", ) static inline PetscErrorCode PetscLogAllBegin(void)
169: {
170: return PetscLogDefaultBegin();
171: }
173: /*@
174: PetscLogSet - Deprecated.
176: Level: deprecated
178: Note:
179: PETSc performance logging and profiling is now split up between the logging state (`PetscLogState`) and the log handler (`PetscLogHandler`).
180: 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.
182: .seealso: [](ch_profiling), `PetscLogEventGetPerfInfo()`
183: @*/
184: PETSC_DEPRECATED_FUNCTION(3, 20, 0, "PetscLogLegacyCallbacksBegin()", )
185: static inline PetscErrorCode PetscLogSet(PetscErrorCode (*a)(int, int, PetscObject, PetscObject, PetscObject, PetscObject), PetscErrorCode (*b)(int, int, PetscObject, PetscObject, PetscObject, PetscObject))
186: {
187: return PetscLogLegacyCallbacksBegin(a, b, PETSC_NULLPTR, PETSC_NULLPTR);
188: }