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> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Profiling/PetscPreLoadBegin.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>PetscPreLoadBegin</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.4.2 2013-07-02</b></div>
<A NAME="PetscPreLoadBegin"><H1>PetscPreLoadBegin</H1></A>
Begin a segment of code that may be preloaded (run twice) to get accurate timings
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petsclog.h"
void PetscPreLoadBegin(PetscBool flag,char *name);
</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>flag </B></TD><TD>- <A HREF="../Sys/PETSC_TRUE.html#PETSC_TRUE">PETSC_TRUE</A> to run twice, <A HREF="../Sys/PETSC_FALSE.html#PETSC_FALSE">PETSC_FALSE</A> to run once, may be overridden
with command line option -preload true or -preload false
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>name </B></TD><TD>- name of first stage (lines of code timed separately with -log_summary) to
be preloaded
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Usage</FONT></H3>
<PRE>
<A HREF="../Profiling/PetscPreLoadBegin.html#PetscPreLoadBegin">PetscPreLoadBegin</A>(<A HREF="../Sys/PETSC_TRUE.html#PETSC_TRUE">PETSC_TRUE</A>,"first stage);
lines of code
<A HREF="../Profiling/PetscPreLoadStage.html#PetscPreLoadStage">PetscPreLoadStage</A>("second stage");
lines of code
<A HREF="../Profiling/PetscPreLoadEnd.html#PetscPreLoadEnd">PetscPreLoadEnd</A>();
</PRE>
<P>
Notes: Only works in C/C++, not Fortran
<P>
Flags available within the macro.
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PetscPreLoadingUsed </B></TD><TD>- true if we are or have done preloading
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PetscPreLoadingOn </B></TD><TD>- true if it is CURRENTLY doing preload
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PetscPreLoadIt </B></TD><TD>- 0 for the first computation (with preloading turned off it is only 0) 1 for the second
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PetscPreLoadMax </B></TD><TD>- number of times it will do the computation, only one when preloading is turned on
The first two variables are available throughout the program, the second two only between the <A HREF="../Profiling/PetscPreLoadBegin.html#PetscPreLoadBegin">PetscPreLoadBegin</A>()
and <A HREF="../Profiling/PetscPreLoadEnd.html#PetscPreLoadEnd">PetscPreLoadEnd</A>()
</TD></TR></TABLE>
<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../Profiling/PetscLogEventRegister.html#PetscLogEventRegister">PetscLogEventRegister</A>(), <A HREF="../Profiling/PetscLogEventBegin.html#PetscLogEventBegin">PetscLogEventBegin</A>(), <A HREF="../Profiling/PetscLogEventEnd.html#PetscLogEventEnd">PetscLogEventEnd</A>(), <A HREF="../Profiling/PetscPreLoadEnd.html#PetscPreLoadEnd">PetscPreLoadEnd</A>(), <A HREF="../Profiling/PetscPreLoadStage.html#PetscPreLoadStage">PetscPreLoadStage</A>()
<BR>
<P>
<P>
<P>
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>intermediate
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/sys/logging/plog.c.html#PetscPreLoadBegin">src/sys/logging/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/mat/examples/tutorials/ex1.c.html">src/mat/examples/tutorials/ex1.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex10.c.html">src/ksp/ksp/examples/tutorials/ex10.c.html</A><BR>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex27.c.html">src/ksp/ksp/examples/tutorials/ex27.c.html</A><BR>
</BODY></HTML>
|