PetscLogStagePush

Users can log up to 10 stages within a code by using -log_summary in conjunction with PetscLogStagePush() and PetscLogStagePop().

Synopsis

#include "petsc.h"   
int PetscLogStagePush(int stage)
Not Collective

Input Parameter

stage -stage on which to log (0 <= stage <= 9)

Usage

If the option -log_sumary is used to run the program containing the following code, then 3 sets of summary data will be printed during PetscFinalize().
      PetscInitialize(int *argc,char ***args,0,0);
      [stage 0 of code]   
      PetscLogStagePush(1);
      [stage 1 of code]
      PetscLogStagePop();
      PetscBarrier(...);
      [more stage 0 of code]   
      PetscFinalize();

Notes

Use PETSC_DETERMINE to increase the previous stage number (which was poped) by one Use PetscLogStageRegister() to register a name with a stage.

See Also

PetscLogStagePop(), PetscLogStageRegister(), PetscBarrier(), PreLoadBegin(), PreLoadEnd(),
PreLoadStage()

Level:intermediate
Location:
src/sys/src/plog/plog.c
Index of all Profiling routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/sles/examples/tutorials/ex5.c.html
src/sles/examples/tutorials/ex9.c.html