[aspect-devel] profiling

Rene Gassmoeller rene.gassmoeller at mailbox.org
Mon Feb 27 09:10:35 PST 2017


Hi Lev,

I did some profiling of ASPECT, so I can give a few general hints, but I 
did not use gprof but callgrind instead.

Anyway about your question: You will likely want to add that option also 
to your configuration of deal.II, and more specifically to the 
DEAL_II_CXX_FLAGS_RELEASE. So adding '-DDEAL_II_CXX_FLAGS_RELEASE=-pg' 
to your cmake command (or setting the same option in ccmake) should do 
the trick. You will want to add that to the release option, because 
profiling in debug mode has not much use, you will only optimize things 
the compiler will optimize for you anyway in release mode (and many 
assertions will show up in your profile that will not longer be there in 
release mode). The reason you want to add that to deal.II is that many 
of the expensive operations of ASPECT happen in deal.II, and it will be 
helpful to see where in deal.II your time is spent. ASPECT should pick 
up the deal.II option automatically the next time you run cmake and 
recompile. You should notice that the release executable is now 
approximately the same size as the debug executable, both for ASPECT and 
the deal.II libraries in deal.II/lib/. For ASPECT on my system it grows 
from 16 MB to 266 MB, compared to 280 MB for the debug executable). Now 
gprof should give you reasonable output.

Cheers,

Rene


On 02/26/2017 03:11 PM, Lev Karatun wrote:
> Hi all,
>
> sorry for the newbie question, but how can I profile Aspect? I didn't 
> find the place where I can add "-pg" to the compiler option in the 
> CMake generated makefile, if someone could point me at it, I would 
> appreciate it.
> (I know there is wallclock time elapsed information in the standard 
> output, unfortunately it's not enough for what I'm trying to do)
>
> Thanks in advance!
>
> Best regards,
> Lev Karatun.
>
>
> _______________________________________________
> Aspect-devel mailing list
> Aspect-devel at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20170227/dcba44c3/attachment.html>


More information about the Aspect-devel mailing list