Hi everyone,

I just upgraded to PETSc 3.20 and read up on the new logging infrastructure - 
its a very nice improvement over the old version.

I have some code which checks that every construction has a corresponding 
destruction via


PetscStageLog  stageLog;
ierr = PetscLogGetStageLog(&stageLog);
for (int i = 0; i < stageLog->stageInfo->classLog->numClasses; ++i)
      {
        if (stageLog->stageInfo->classLog->classInfo[i].destructions !=
            stageLog->stageInfo->classLog->classInfo[i].creations)
          {
            crash();
          }
      }


This no longer works and I can't figure out how to port it. In particular, it 
looks like I need to get a PetscLogEvent number for creation and another for 
destruction to retrieve the relevant PetscEventPerfInfo objects per-class - is 
there some straightforward way to do that for every registered PETSc class?

Best,
David Wells

Reply via email to