PLogEventRegister

Registers an event name for logging operations in an application code.

Synopsis

int PLogEventRegister(int *e,char *string,char *color)
Not Collective

Input Parameter

string - name associated with the event
color - (optional) string specifying a color and display pattern for viewing an event, used by Upshot/Nupshot to view logs generated by -log_mpe (e.g., - "red:", "green:vlines3"); use PETSC_NULL to let PETSc assign a color. Output Parameter:
e -event id for use with PLogEventBegin() and PLogEventEnd().

Notes

PETSc automatically logs library events if the code has beencompiled with -DUSE_PETSC_LOG (which is the default) and -log, -log_summary, or -log_all are specified. PLogEventRegister() isintended for logging user events to supplement this PETScinformation.

PETSc can gather data for use with the utilities Upshot/ Nupshot(part of the MPICH distribution). If PETSc has been compiledwith flag -DHAVE_MPE (MPE is an additional utility withinMPICH), the user can employ another command line option, -log_mpe, to create a logfile, "mpe.log", which can be visualizedUpshot/Nupshot. The color argument is used by this utilityin forming the display of this event; the standard X- windowscolor names should be used.

Example of Usage

      #include "petsclog.h"
      int USER_EVENT;
      int user_event_flops;
      PLogEventRegister(&USER_EVENT,"User event name","EventColor");
      PLogEventBegin(USER_EVENT,0,0,0,0);
         [code segment to monitor]
         PLogFlops(user_event_flops);
      PLogEventEnd(USER_EVENT,0,0,0,0);

Keywords

log, event, register

See Also

PLogEventBegin(), PLogEventEnd(), PLogFlops(),
PLogEventMPEActivate(), PLogEventMPEDeactivate(), PLogEventActivate(), PLogEventDeactivate()

Examples

src/sles/examples/tutorials/ex9.c
src/sys/examples/tutorials/ex3f.F
src/sys/examples/tutorials/ex3.c

Location: src/plog/src/plog.c
Logging Index
Table of Contents