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