[mpas-developers] COMMIT CHECK: TAU Hooks

Doug Jacobsen jacobsen.douglas at gmail.com
Tue Sep 4 12:56:38 MDT 2012


Hi All,

So I spent some time last week learning how to use TAU, which stands for
Tuning and Analysis Utilities. It is essentially a tool that allows easy
profiling of software, including using hardware counters for things like
cache misses and floating point instructions. It uses PAPI underneath to
use the hardware counters, and it provides a graphical interface for making
performance plots. It has a lot of other capabilities that I don't know how
to use yet, but so far it has been pretty useful to use.

It can auto instrument software to profile the code for you, or you can
manually instrument the code. I've had some issues with the auto
instrumentation, as it doesn't work well with fortran for some reason.
Since we have built in timers in MPAS already, I have a version where I
added the tau hooks into the timer module. This allows tau to profile
sections of code specified by us with our mpas timers, and you can get
hardware counter information for those sections of code.

I'm proposing to commit these changes to the trunk. I have attached the
three files that change. Essentially, we add the tau hooks to mpas_timer.F
wrapped with ifdefs on the variable MPAS_TAU, and then change two makefiles
(root and src) to pass a different linker in if you build with tau.

I'm currently using the make variable TAU=true to define you want to use
the tau hooks, and MPAS_TAU for tau hooks in the actual code. If anyone
would rather these be named something different feel free to let me know,
as I'm not attached to either one.

If no one has any issues with this, I'll probably commit it to the trunk
either tomorrow or the day after.

Also just so everyone knows, without TAU=true the code will compile as it
currently does and you won't get the extra tau information. One last thing,
in doing this TAU handles all of the calls to PAPI. So we could remove the
option to build with PAPI, and leave the timers in MPAS to be either the
MPI timers or the system clock timers. Just to take one option away that is
already handled.

Let me know if anyone has any questions/comments.
Thanks,
Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/mpas-developers/attachments/20120904/960d0ef0/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 9446 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/mpas-developers/attachments/20120904/960d0ef0/attachment-0003.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: src-Makefile
Type: application/octet-stream
Size: 1331 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/mpas-developers/attachments/20120904/960d0ef0/attachment-0004.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpas_timer.F
Type: application/octet-stream
Size: 12025 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/mpas-developers/attachments/20120904/960d0ef0/attachment-0005.obj 


More information about the mpas-developers mailing list