1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>EventRegLogRegister</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="EventRegLogRegister"><H1>EventRegLogRegister</H1></A>
Registers an event for logging operations in an application code.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petsc.h"
PetscErrorCode EventRegLogRegister(EventRegLog eventLog, const char ename[], PetscCookie cookie, PetscEvent *event)
</PRE>
Not Collective
<P>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>eventLog </B></TD><TD>- The EventLog
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>ename </B></TD><TD>- The name associated with the event
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>cookie </B></TD><TD>- The cookie associated to the class for this event
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<DT><B>event </B> -The event
<br>
<P>
<H3><FONT COLOR="#CC3333">Example of Usage</FONT></H3>
<PRE>
int USER_EVENT;
int user_event_flops;
<A HREF="../Profiling/PetscLogEventRegister.html#PetscLogEventRegister">PetscLogEventRegister</A>(&USER_EVENT,"User event name");
<A HREF="../Profiling/PetscLogEventBegin.html#PetscLogEventBegin">PetscLogEventBegin</A>(USER_EVENT,0,0,0,0);
[code segment to monitor]
<A HREF="../Profiling/PetscLogFlops.html#PetscLogFlops">PetscLogFlops</A>(user_event_flops);
<A HREF="../Profiling/PetscLogEventEnd.html#PetscLogEventEnd">PetscLogEventEnd</A>(USER_EVENT,0,0,0,0);
</PRE>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
PETSc automatically logs library events if the code has been
compiled with -DPETSC_USE_LOG (which is the default) and -log,
-log_summary, or -log_all are specified. <A HREF="../Profiling/PetscLogEventRegister.html#PetscLogEventRegister">PetscLogEventRegister</A>() is
intended for logging user events to supplement this PETSc
information.
<P>
PETSc can gather data for use with the utilities Upshot/Nupshot
(part of the MPICH distribution). If PETSc has been compiled
with flag -DPETSC_HAVE_MPE (MPE is an additional utility within
MPICH), the user can employ another command line option, -log_mpe,
to create a logfile, "mpe.log", which can be visualized
Upshot/Nupshot.
<P>
<P>
<H3><FONT COLOR="#CC3333">Keywords</FONT></H3>
log, event, register
<BR>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../Profiling/PetscLogEventBegin.html#PetscLogEventBegin">PetscLogEventBegin</A>(), <A HREF="../Profiling/PetscLogEventEnd.html#PetscLogEventEnd">PetscLogEventEnd</A>(), <A HREF="../Profiling/PetscLogFlops.html#PetscLogFlops">PetscLogFlops</A>(), PetscLogEventMPEActivate(), PetscLogEventMPEDeactivate(),
<BR>EventLogActivate(), EventLogDeactivate()
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>intermediate
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/sys/plog/eventLog.c.html#EventRegLogRegister">src/sys/plog/eventLog.c</A>
<BR><A HREF="./index.html">Index of all Profiling routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>
|