petsc-users Digest, Vol 2, Issue 33

Matthew Knepley knepley at gmail.com
Tue Mar 3 08:15:15 CST 2009


On Tue, Mar 3, 2009 at 7:54 AM, STEPHANE TCHOUANMO <tchouanm at msn.com> wrote:

>  Hi all,
>
> thank you Barry for the indication you gave me.
>
> As a matter of fact, i verified my jacobian and function evaluation again
> and again but i really dont see anything wrong in it.
> 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.
> 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.
>
>
> Event                Count      Time (sec)
> Flops/sec                         --- Global ---  --- Stage ---   Total
>                    Max Ratio  Max     Ratio   Max  Ratio  Mess   Avg len
> Reduct  %T %F %M %L %R  %T %F %M %L %R Mflop/s
>
> ------------------------------------------------------------------------------------------------------------------------
>
> --- Event Stage 0: Main Stage
>
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
> 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
>
> ------------------------------------------------------------------------------------------------------------------------
>
> Memory usage is given in bytes:
>
> Object Type          Creations   Destructions   Memory  Descendants' Mem.
>
> --- Event Stage 0: Main Stage
>
>            Index Set     3              3     111792     0
>                  Vec    44              3     223596     0
>          Vec Scatter     3              3          0     0
>               Matrix     1              0          0     0
>                 SNES     1              0          0     0
>        Krylov Solver     1              0          0     0
>       Preconditioner     1              0          0     0
>               Viewer     2              0          0     0
>                 Draw     1              0          0     0
>
> ========================================================================================================================
> Average time to get PetscTime(): 1.60268e-06
>
>
> This shows that the Jacobian evaluation takes 97% of time and the residual
> just 2% in the SNESSolve. 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.
>

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
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
says that this time is too long?

  Matt

-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20090303/71ecdee5/attachment.htm>


More information about the petsc-users mailing list