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