TAU
Tuning and Analysis Utilities, or TAU, is a performance analysis tool available from the University of Oregon. There are a number of procedures for instrumenting, tracing, and profiling code using TAU—one common method is illustrated here. For other methods, see the documentation on the TAU website. The local TAU software page.
- Load Modules: Type
module load tau
to load the TAU module. You can view results with the command line utility,pprof
. If you prefer a graphical viewer, you may useparaprof
, but you will first need to configure your SSH client to enable X11 forwarding. Also, Paraprof uses Java, so you will need to entermodule load java-jre
. If another java module, such as the Java Development Kit (module load java
), is already loaded, you need not load both. - TAU Makefiles: TAU accepts "TAU-Makefiles," which contain the parameters to be used. A generic makefile is generally chosen for you, you may want to use a more appropriate one. Sample TAU-Makefiles, may be found in the
${TAUROOT}/lib/
directory on Kraken. If you have very specific things you would like your profile to do, you may want to copy the most similar makefile in${TAUROOT}/lib/
to your home director and edit that file to your liking. - More Configuration: Set the path to your makefile in the environmental variable
TAU_MAKEFILE
. For example,% export TAU_MAKEFILE=${HOME}/mytau/tau_makefile
If there are any options you would like to set (seetau_cc.sh --help
(or corresponding script) or the web documentation for a list of options), this may be set byexport TAU_OPTIONS="<your-options>"
. - Now, to compile a single C source file, you could write
tau_cc.sh <file.c>
. For fortran, use tau_f90.sh. Thus, to profile a group of source files, edit your (make) Makefile to use the TAU wrapper rather than the standard wrapper. For instance, to compile a C program, you might replaceCC = cc
withCC = tau_cc.sh
. Likewise,CC
would be replaced withtau_cxx.sh
, andftn
would be replaced withtau_f90.sh
. When usingtau_cxx.sh
, you may see the error thatSEEK_SET
is defined twice. This error may be solved by defining the following:% tau_cxx.sh -DMPICH_IGNORE_CXX_SEEK test.cpp
- By default, TAU outputs a profile file for each thread. These will be saved to the current directory unless the PROFILEDIR environmental variable is set. For example, you might use the following organization:
% mkdir ${HOME}/tauprofiles/<program>/<date> % export PROFILEDIR=${HOME}/tauprofiles/<program>/<date>
- To view your profile, navigate to the directory containing the output files (eg,
profile.0.0.0
) (if multiple counters are used, instead navigate to the directory containing the__Multi/
directories), and typeparaprof
. For a command line output, simply replaceparaprof
withpprof
.