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 70 71 72 73
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>PetscLogEventRegister</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<A NAME="PetscLogEventRegister"><H1>PetscLogEventRegister</H1></A>
Registers an event name for logging operations in an application code.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petsc.h"
PetscErrorCode PETSC_DLLEXPORT PetscLogEventRegister(PetscEvent *event, const char name[],PetscCookie cookie)
</PRE>
Not Collective
<P>
<H3><FONT COLOR="#CC3333">Input Parameter</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </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>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<DT><B>event </B> -The event id for use with <A HREF="../Profiling/PetscLogEventBegin.html#PetscLogEventBegin">PetscLogEventBegin</A>() and <A HREF="../Profiling/PetscLogEventEnd.html#PetscLogEventEnd">PetscLogEventEnd</A>().
<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>(),
<BR>PetscLogEventMPEActivate(), PetscLogEventMPEDeactivate(),
<A HREF="../Profiling/PetscLogEventActivate.html#PetscLogEventActivate">PetscLogEventActivate</A>(), <A HREF="../Profiling/PetscLogEventDeactivate.html#PetscLogEventDeactivate">PetscLogEventDeactivate</A>()
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>intermediate
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/sys/plog/plog.c.html#PetscLogEventRegister">src/sys/plog/plog.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>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/sys/examples/tutorials/ex3.c.html">src/sys/examples/tutorials/ex3.c.html</A><BR>
<A HREF="../../../src/sys/examples/tutorials/ex3f.F.html">src/sys/examples/tutorials/ex3f.F.html</A><BR>
<A HREF="../../../src/vec/vec/examples/tutorials/ex5.c.html">src/vec/vec/examples/tutorials/ex5.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex9.c.html">src/ksp/ksp/examples/tutorials/ex9.c.html</A><BR>
<A HREF="../../../src/dm/ao/examples/tutorials/ex2.c.html">src/dm/ao/examples/tutorials/ex2.c.html</A><BR>
</BODY></HTML>
|