On Tue, Mar 3, 2009 at 7:54 AM, STEPHANE TCHOUANMO <span dir="ltr"><<a href="mailto:tchouanm@msn.com">tchouanm@msn.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<font style="font-size: 12pt;" size="3" face="Courier New">Hi all,</font><font style="font-size: 12pt;" size="3" face="Courier New"><br><br></font><font style="font-size: 12pt;" size="3" face="Courier New">thank you Barry for the indication you gave me.</font><font style="font-size: 12pt;" size="3" face="Courier New"><br>
<br></font><font style="font-size: 12pt;" size="3" face="Courier New">As a matter of fact, i verified my jacobian and function evaluation again and again but i really dont see anything wrong in it. </font><font style="font-size: 12pt;" size="3" face="Courier New"><br>
</font><font style="font-size: 12pt;" size="3" face="Courier New">So i came back to the basic Laplacian problem (- \Delta u = f ) in the unit cube discretized in regular hexes. The numerical scheme i use is a vertex-centred finite volume scheme.</font><font style="font-size: 12pt;" size="3" face="Courier New"><br>
</font><font style="font-size: 12pt;" size="3" face="Courier New">The solution i get is correct compared to the exact solution (of second order) and i know my jacobian and residual evalutions are correct. But here is the log out i get.</font><font style="font-size: 12pt;" size="3" face="Comic Sans MS"><br>
<br></font><br>Event Count Time (sec) Flops/sec --- Global --- --- Stage --- Total<br> Max Ratio Max Ratio Max Ratio Mess Avg len Reduct %T %F %M %L %R %T %F %M %L %R Mflop/s<br>
------------------------------------------------------------------------------------------------------------------------<br><br>--- Event Stage 0: Main Stage<br><br><font color="#ff0000">VecMDot 71 1.0 2.9587e-02 1.0 6.23e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 25 0 0 0 0 25 0 0 0 623</font><font color="#ff0000"><br>
</font><font color="#ff0000">VecNorm 77 1.0 3.3638e-02 1.0 4.24e+07 1.0 0.0e+00 0.0e+00 0.0e+00 0 2 0 0 0 0 2 0 0 0 42</font><font color="#ff0000"><br></font><font color="#ff0000">VecScale 74 1.0 2.1052e-03 1.0 3.26e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 1 0 0 0 0 1 0 0 0 326</font><font color="#ff0000"><br>
</font><font color="#ff0000">VecCopy 80 1.0 3.4863e-03 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0</font><font color="#ff0000"><br></font><font color="#ff0000">VecSet 9 1.0 2.0776e-04 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0</font><font color="#ff0000"><br>
</font><font color="#ff0000">VecAXPY 5 1.0 2.3208e-04 1.0 3.99e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 399</font><font color="#ff0000"><br></font><font color="#ff0000">VecWAXPY 1 1.0 6.6995e-05 1.0 1.38e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 138</font><font color="#ff0000"><br>
</font><font color="#ff0000">VecMAXPY 74 1.0 3.8138e-02 1.0 5.18e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 27 0 0 0 0 27 0 0 0 518</font><font color="#ff0000"><br></font><font color="#ff0000">VecAssemblyBegin 4 1.0 9.8636e-06 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0</font><font color="#ff0000"><br>
</font><font color="#ff0000">VecAssemblyEnd 4 1.0 6.9494e-06 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0</font><font color="#ff0000"><br></font><font color="#ff0000">VecScatterBegin 3 1.0 3.0706e-04 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0</font><font color="#ff0000"><br>
</font><font color="#ff0000">VecNormalize 74 1.0 3.4648e-02 1.0 5.88e+07 1.0 0.0e+00 0.0e+00 0.0e+00 0 3 0 0 0 0 3 0 0 0 59</font><br><font color="#00b050">MatMult 73 1.0 1.4618e-01 1.0 2.22e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 45 0 0 0 0 45 0 0 0 222</font><font color="#00b050"><br>
</font><font color="#00b050">MatAssemblyBegin 2 1.0 6.9899e-06 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0</font><font color="#00b050"><br></font><font color="#00b050">MatAssemblyEnd 2 1.0 6.1999e-03 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0</font><br>
<font color="#17365d">SNESSolve 1 1.0 6.7333e+01 1.0 1.08e+06 1.0 0.0e+00 0.0e+00 3.0e+00 99100 0 0100 99100 0 0100 1</font><font color="#17365d"><br></font><font color="#17365d">SNESLineSearch 1 1.0 5.1989e-01 1.0 8.91e+04 1.0 0.0e+00 0.0e+00 1.0e+00 1 0 0 0 33 1 0 0 0 33 0</font><font color="#17365d"><br>
</font><font color="#17365d">SNESFunctionEval 2 1.0 1.0441e+00 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 2.0e+00 2 0 0 0 67 2 0 0 0 67 0</font><font color="#17365d"><br></font><font color="#17365d">SNESJacobianEval 1 1.0 6.6026e+01 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 1.0e+00 97 0 0 0 33 97 0 0 0 33 0</font><br>
<font color="#974806">KSPGMRESOrthog 71 1.0 6.5884e-02 1.0 5.60e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0 51 0 0 0 0 51 0 0 0 560</font><font color="#974806"><br></font><font color="#974806">KSPSetup 1 1.0 2.2203e-04 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0</font><font color="#974806"><br>
</font><font color="#974806">KSPSolve 1 1.0 2.6036e-01 1.0 2.80e+08 1.0 0.0e+00 0.0e+00 0.0e+00 0100 0 0 0 0100 0 0 0 280</font><font color="#974806"><br></font><font color="#974806">PCSetUp 1 1.0 7.9495e-06 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0</font><font color="#974806"><br>
</font><font color="#974806">PCApply 74 1.0 3.6445e-03 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0</font><br>------------------------------------------------------------------------------------------------------------------------<br>
<br>Memory usage is given in bytes:<br><br>Object Type Creations Destructions Memory Descendants' Mem.<br><br>--- Event Stage 0: Main Stage<br><br> Index Set 3 3 111792 0<br>
Vec 44 3 223596 0<br> Vec Scatter 3 3 0 0<br> Matrix 1 0 0 0<br> SNES 1 0 0 0<br>
Krylov Solver 1 0 0 0<br> Preconditioner 1 0 0 0<br> Viewer 2 0 0 0<br> Draw 1 0 0 0<br>
========================================================================================================================<br>Average time to get PetscTime(): 1.60268e-06<br><br><br><font style="font-size: 12pt;" size="3" face="Courier New">This shows that the Jacobian evaluation takes 97% of time and the residual just 2% in the SNESSolve</font><font style="font-size: 12pt;" size="3" face="Courier New">. But if you look at the total MFlops, you can see that its null(i guess very low) for these phases. What seems to be long is the part in red concerning Vector manips. You can even see at the end that the most memory use is in Index set and Vec.</font><font style="font-size: 12pt;" size="3" face="Courier New"></font></div>
</blockquote><div><br>This analysis does not make sense. If you add all the time spent in the Vec operations (in red), it is less than 1/100 of the time in the<br>SNES Solve. There is obviously a problem in that routine, if there is indeed a problem. Do you have a model of the computation that<br>
says that this time is too long?<br><br> Matt<br> </div></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>