1*1c1ad86eSToby Isaac #ifndef PETSCLOGTYPES_H 2*1c1ad86eSToby Isaac #define PETSCLOGTYPES_H 3*1c1ad86eSToby Isaac #include <petscsystypes.h> 4*1c1ad86eSToby Isaac 5*1c1ad86eSToby Isaac /* SUBMANSEC = Profiling */ 6*1c1ad86eSToby Isaac 7*1c1ad86eSToby Isaac /*S 8*1c1ad86eSToby Isaac PetscEventPerfInfo - statistics on how many times the event is used, how much time it takes, etc. 9*1c1ad86eSToby Isaac 10*1c1ad86eSToby Isaac Level: advanced 11*1c1ad86eSToby Isaac 12*1c1ad86eSToby Isaac Note: 13*1c1ad86eSToby Isaac This is the data structure that describes profiling statsitics collected for an event from 14*1c1ad86eSToby Isaac the default log handler (`PetscLogDefaultBegin()`) using `PetscLogEventGetPerfInfo()`. 15*1c1ad86eSToby Isaac 16*1c1ad86eSToby Isaac .seealso(): [](ch_profiling) 17*1c1ad86eSToby Isaac S*/ 18*1c1ad86eSToby Isaac typedef struct { 19*1c1ad86eSToby Isaac int id; /* The integer identifying this event / stage */ 20*1c1ad86eSToby Isaac PetscBool active; /* Deprecated */ 21*1c1ad86eSToby Isaac PetscBool visible; /* The flag to print info in summary */ 22*1c1ad86eSToby Isaac int depth; /* The nesting depth of the event call */ 23*1c1ad86eSToby Isaac int count; /* The number of times this event was executed */ 24*1c1ad86eSToby Isaac PetscLogDouble flops; /* The flops used in this event */ 25*1c1ad86eSToby Isaac PetscLogDouble flops2; /* The square of flops used in this event */ 26*1c1ad86eSToby Isaac PetscLogDouble flopsTmp; /* The accumulator for flops used in this event */ 27*1c1ad86eSToby Isaac PetscLogDouble time; /* The time taken for this event */ 28*1c1ad86eSToby Isaac PetscLogDouble time2; /* The square of time taken for this event */ 29*1c1ad86eSToby Isaac PetscLogDouble timeTmp; /* The accumulator for time taken for this event */ 30*1c1ad86eSToby Isaac PetscLogDouble syncTime; /* The synchronization barrier time */ 31*1c1ad86eSToby Isaac PetscLogDouble dof[8]; /* The number of degrees of freedom associated with this event */ 32*1c1ad86eSToby Isaac PetscLogDouble errors[8]; /* The errors (user-defined) associated with this event */ 33*1c1ad86eSToby Isaac PetscLogDouble numMessages; /* The number of messages in this event */ 34*1c1ad86eSToby Isaac PetscLogDouble messageLength; /* The total message lengths in this event */ 35*1c1ad86eSToby Isaac PetscLogDouble numReductions; /* The number of reductions in this event */ 36*1c1ad86eSToby Isaac PetscLogDouble memIncrease; /* How much the resident memory has increased in this event */ 37*1c1ad86eSToby Isaac PetscLogDouble mallocIncrease; /* How much the maximum malloced space has increased in this event */ 38*1c1ad86eSToby Isaac PetscLogDouble mallocSpace; /* How much the space was malloced and kept during this event */ 39*1c1ad86eSToby Isaac PetscLogDouble mallocIncreaseEvent; /* Maximum of the high water mark with in event minus memory available at the end of the event */ 40*1c1ad86eSToby Isaac #if defined(PETSC_HAVE_DEVICE) 41*1c1ad86eSToby Isaac PetscLogDouble CpuToGpuCount; /* The total number of CPU to GPU copies */ 42*1c1ad86eSToby Isaac PetscLogDouble GpuToCpuCount; /* The total number of GPU to CPU copies */ 43*1c1ad86eSToby Isaac PetscLogDouble CpuToGpuSize; /* The total size of CPU to GPU copies */ 44*1c1ad86eSToby Isaac PetscLogDouble GpuToCpuSize; /* The total size of GPU to CPU copies */ 45*1c1ad86eSToby Isaac PetscLogDouble GpuFlops; /* The flops done on a GPU in this event */ 46*1c1ad86eSToby Isaac PetscLogDouble GpuTime; /* The time spent on a GPU in this event */ 47*1c1ad86eSToby Isaac #endif 48*1c1ad86eSToby Isaac } PetscEventPerfInfo; 49*1c1ad86eSToby Isaac 50*1c1ad86eSToby Isaac typedef struct _n_PetscIntStack *PetscIntStack; 51*1c1ad86eSToby Isaac 52*1c1ad86eSToby Isaac /*MC 53*1c1ad86eSToby Isaac PetscLogEvent - id used to identify PETSc or user events which timed portions (blocks of executable) 54*1c1ad86eSToby Isaac code. 55*1c1ad86eSToby Isaac 56*1c1ad86eSToby Isaac Level: intermediate 57*1c1ad86eSToby Isaac 58*1c1ad86eSToby Isaac .seealso: [](ch_profiling), `PetscLogEventRegister()`, `PetscLogEventBegin()`, `PetscLogEventEnd()`, `PetscLogStage` 59*1c1ad86eSToby Isaac M*/ 60*1c1ad86eSToby Isaac typedef int PetscLogEvent; 61*1c1ad86eSToby Isaac 62*1c1ad86eSToby Isaac /*MC 63*1c1ad86eSToby Isaac PetscLogStage - id used to identify user stages (phases, sections) of runs - for logging 64*1c1ad86eSToby Isaac 65*1c1ad86eSToby Isaac Level: intermediate 66*1c1ad86eSToby Isaac 67*1c1ad86eSToby Isaac .seealso: [](ch_profiling), `PetscLogStageRegister()`, `PetscLogStagePush()`, `PetscLogStagePop()`, `PetscLogEvent` 68*1c1ad86eSToby Isaac M*/ 69*1c1ad86eSToby Isaac typedef int PetscLogStage; 70*1c1ad86eSToby Isaac 71*1c1ad86eSToby Isaac #endif 72