[petsc-users] Interpreting flamegraph and profiling logs

Matthew Knepley knepley at gmail.com
Mon Feb 24 14:56:09 CST 2025


On Mon, Feb 24, 2025 at 3:10 PM Alfredo J Duarte Gomez <aduarteg at utexas.edu>
wrote:

> Good afternoon PETSC team,
>
> I am doing some profiling on one of my applications (petsc 3.15) using the
> command options:
>  -log_view :performance.out
> -log_view :flame.out:ascii_flamegraph.
>
> I want to understand the specifics of the gnereated flamegraphs and I am
> attaching performance.out and flame.out to this email.
>
> I am assuming that the flamegraphs represent what is labeled "MPI
> Messages" in the regular output file (i.e. performance.out) instead of time
> or is it some other quantity? Since the "unit" of these flamegraphs is not
> time when I load into speedscope app and quantities most closely resemble
> the order of magnitude of the messages sent.
>

No. The flame graphs represent time. I forget what the normalization, but I
think you will see that the ratios match the ratios in the performance.out
file.


> My application being an unsteady solver, I can understand that in time
> percentage, the amount of time spent in SNESsolve is almost equal to the
> amount spent in TSStep (~1.63e02 s, see performance.out). However, that
> percentage is not represented in the flamegraph (97% vs 82% in flame.out).
> How would I interpret this difference in percentage?
>

SNESSolve is nested in TSSolve, as you see in the flamegraph. Do you have
multiple SNESolves? (I cannot look at the flamegraph right now)

  Thanks,

     Matt


> Thanks,
>
> Alfredo
>
>

-- 
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

https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!c_-aeuJAFXYfHQTColMAQdUWfWjw1ddAzBpk8EeqF_v9bfTtRQ8PKjSF8mYiYDWi3GkkWQa9991vePUQPPTm$  <https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!c_-aeuJAFXYfHQTColMAQdUWfWjw1ddAzBpk8EeqF_v9bfTtRQ8PKjSF8mYiYDWi3GkkWQa9991veGsRWtVx$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250224/57c336a6/attachment.html>


More information about the petsc-users mailing list