File: PLogEvent.c.html

package info (click to toggle)
petsc 3.18.5%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 523,616 kB
  • sloc: ansic: 740,865; cpp: 41,511; python: 36,523; f90: 16,706; makefile: 12,524; javascript: 11,855; sh: 1,007; xml: 619; objc: 445; java: 13; csh: 1
file content (72 lines) | stat: -rw-r--r-- 6,528 bytes parent folder | download
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
<center><a href="https://gitlab.com/petsc/petsc/-/blob/01a2522431ef63feaceabbc11dd32b16a352f77d/src/benchmarks/PLogEvent.c">Actual source code: PLogEvent.c</a></center><br>

<html>
<head>
<title></title>
<meta name="generator" content="c2html 0.9.4">
<meta name="date" content="2023-02-27T22:24:47+00:00">
</head>

<body bgcolor="#FFFFFF">
<pre width="80">

<a name="line2">  2: </a>#include <A href="../../include/petscsys.h.html">&lt;petscsys.h&gt;</A>
<a name="line3">  3: </a>#include <A href="../../include/petsctime.h.html">&lt;petsctime.h&gt;</A>

<a name="line5">  5: </a><strong><font color="#4169E1"><a name="main"></a>int main(int argc,char **argv)</font></strong>
<a name="line6">  6: </a>{
<a name="line7">  7: </a>  <a href="../../docs/manualpages/Sys/PetscLogDouble.html">PetscLogDouble</a> x,y;
<a name="line8">  8: </a>  <a href="../../docs/manualpages/Sys/PetscLogEvent.html">PetscLogEvent</a>  e1;
<a name="line9">  9: </a>  <a href="../../docs/manualpages/Sys/PetscBool.html">PetscBool</a>      flg;

<a name="line11"> 11: </a>  <a href="../../docs/manualpages/Sys/PetscInitialize.html">PetscInitialize</a>(&amp;argc,&amp;argv,0,0);
<a name="line12"> 12: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventRegister.html">PetscLogEventRegister</a>(<font color="#666666">"*DummyEvent"</font>,0,&amp;e1);
<a name="line13"> 13: </a>  <font color="#B22222">/* To take care of the paging effects */</font>
<a name="line14"> 14: </a>  <a href="../../docs/manualpages/Sys/PetscTime.html">PetscTime</a>(&amp;x);
<a name="line15"> 15: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventBegin.html">PetscLogEventBegin</a>(e1,&amp;x,0,0,0);
<a name="line16"> 16: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventEnd.html">PetscLogEventEnd</a>(e1,&amp;x,0,0,0);

<a name="line18"> 18: </a>  <a href="../../docs/manualpages/Sys/PetscTime.html">PetscTime</a>(&amp;x);
<a name="line19"> 19: </a>  <font color="#B22222">/* 10 Occurrences of the dummy event */</font>
<a name="line20"> 20: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventBegin.html">PetscLogEventBegin</a>(e1,&amp;x,0,0,0);
<a name="line21"> 21: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventEnd.html">PetscLogEventEnd</a>(e1,&amp;x,0,0,0);
<a name="line22"> 22: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventBegin.html">PetscLogEventBegin</a>(e1,&amp;x,&amp;y,0,0);
<a name="line23"> 23: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventEnd.html">PetscLogEventEnd</a>(e1,&amp;x,&amp;y,0,0);
<a name="line24"> 24: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventBegin.html">PetscLogEventBegin</a>(e1,&amp;y,0,0,0);
<a name="line25"> 25: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventEnd.html">PetscLogEventEnd</a>(e1,&amp;y,0,0,0);
<a name="line26"> 26: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventBegin.html">PetscLogEventBegin</a>(e1,&amp;x,0,0,0);
<a name="line27"> 27: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventEnd.html">PetscLogEventEnd</a>(e1,&amp;x,0,0,0);
<a name="line28"> 28: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventBegin.html">PetscLogEventBegin</a>(e1,&amp;x,&amp;y,0,0);
<a name="line29"> 29: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventEnd.html">PetscLogEventEnd</a>(e1,&amp;x,&amp;y,0,0);
<a name="line30"> 30: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventBegin.html">PetscLogEventBegin</a>(e1,&amp;y,0,0,0);
<a name="line31"> 31: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventEnd.html">PetscLogEventEnd</a>(e1,&amp;y,0,0,0);
<a name="line32"> 32: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventBegin.html">PetscLogEventBegin</a>(e1,&amp;x,0,0,0);
<a name="line33"> 33: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventEnd.html">PetscLogEventEnd</a>(e1,&amp;x,0,0,0);
<a name="line34"> 34: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventBegin.html">PetscLogEventBegin</a>(e1,&amp;x,&amp;y,0,0);
<a name="line35"> 35: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventEnd.html">PetscLogEventEnd</a>(e1,&amp;x,&amp;y,0,0);
<a name="line36"> 36: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventBegin.html">PetscLogEventBegin</a>(e1,&amp;y,0,0,0);
<a name="line37"> 37: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventEnd.html">PetscLogEventEnd</a>(e1,&amp;y,0,0,0);
<a name="line38"> 38: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventBegin.html">PetscLogEventBegin</a>(e1,&amp;x,&amp;e1,0,0);
<a name="line39"> 39: </a>  <a href="../../docs/manualpages/Profiling/PetscLogEventEnd.html">PetscLogEventEnd</a>(e1,&amp;x,&amp;e1,0,0);

<a name="line41"> 41: </a>  <a href="../../docs/manualpages/Sys/PetscTime.html">PetscTime</a>(&amp;y);
<a name="line42"> 42: </a>  fprintf(stderr,<font color="#666666">"%-15s : %e sec, with options : "</font>,<font color="#666666">"<a href="../../docs/manualpages/Sys/PetscLogEvent.html">PetscLogEvent</a>"</font>,(y-x)/10.0);

<a name="line44"> 44: </a>  <a href="../../docs/manualpages/Sys/PetscOptionsHasName.html">PetscOptionsHasName</a>(NULL,<font color="#666666">"-log"</font>,&amp;flg);
<a name="line45"> 45: </a>  <font color="#4169E1">if</font> (flg) fprintf(stderr,<font color="#666666">"-log "</font>);
<a name="line46"> 46: </a>  <a href="../../docs/manualpages/Sys/PetscOptionsHasName.html">PetscOptionsHasName</a>(NULL,<font color="#666666">"-log_all"</font>,&amp;flg);
<a name="line47"> 47: </a>  <font color="#4169E1">if</font> (flg) fprintf(stderr,<font color="#666666">"-log_all "</font>);
<a name="line48"> 48: </a>  <a href="../../docs/manualpages/Sys/PetscOptionsHasName.html">PetscOptionsHasName</a>(NULL,<font color="#666666">"-log_view"</font>,&amp;flg);
<a name="line49"> 49: </a>  <font color="#4169E1">if</font> (flg) fprintf(stderr,<font color="#666666">"-log_view "</font>);
<a name="line50"> 50: </a>  <a href="../../docs/manualpages/Sys/PetscOptionsHasName.html">PetscOptionsHasName</a>(NULL,<font color="#666666">"-log_mpe"</font>,&amp;flg);
<a name="line51"> 51: </a>  <font color="#4169E1">if</font> (flg) fprintf(stderr,<font color="#666666">"-log_mpe "</font>);

<a name="line53"> 53: </a>  fprintf(stderr,<font color="#666666">"\n"</font>);

<a name="line55"> 55: </a>  <a href="../../docs/manualpages/Sys/PetscFinalize.html">PetscFinalize</a>();
<a name="line56"> 56: </a>  <font color="#4169E1">return</font> 0;
<a name="line57"> 57: </a>}
</pre>
</body>

</html>