Assignment #7:"Tau - The
Art of Visualization" - Study of Tau/PDT in Program Analysis
The
documents on this page refer to the Tau documentation and user's guide
which is available from:
http://www.cs.uoregon.edu/research/paracomp/tau/tauprofile/docs/usersguide.pdf
Description:
Tau
(Tuning and Analysis Utilities) is a program analysis tool
used to analyze C/C++/Java/MPI programs. TAU is capable of gathering
performance information through instrumentation of functions, methods,
basic blocks, and statements. TAUs profile visualization
tool, paraprof, provides graphical displays of all the performance
analysis results, in aggregate and single node/context/thread forms. In
this assignment we look into Tau and paraprof and their capabilities.
Installation:
- Download PDT from here: http://www.cs.uoregon.edu/research/paracomp/pdtoolkit/Download/pdt_latest.tar.gz
- Extract the contents of the directory into a convenient location
and run:
%
./configure -prefix=/path/to/your/pdt/installation (I assume this
path is /usr/share/pdt)
% make
% make
install
- Put the path to PDT in your PATH environment variable.
%
PATH=/usr/share/pdt/linux/bin:$PATH
% export
PATH
- Download
VTF library and extract & copy to a convenient location.
- Download the latest version of Tau from here.
- Extract the contents into a directory where you want to install
tau, say /usr/share/tau
- Now run the following commands:
#>./configure
-mpilib=/usr/share/OpenMPI/lib -mpiinc=/usr/share/OpenMPI/include
-pdt=/usr/share/pdt -TRACE -PROFILE -slog2 -vtf=/usr/share/vtf
#> make install
- Add the path to the
bin directory in your PATH variable. For example,
PATH=/usr/share/tau/i386_linux/bin:/usr/share/pdt/linux/bin:$PATH;
export
PATH
- This will install
tau and you are ready.
Running Instrumentation:
The following discussion assumes the packages are
installed in these locations:
PDT: /usr/share/pdt
TAU: /usr/share/tau
VTF: /usr/share/vtf
OpenMPI: /usr/share/OpenMPI
I will assume an OpenMPI installation as the
parallel compiler platform and gcc compiler for compiling c programs.
I will use my old fox algorithm program of matrix
multiplication and use tau to analyze this program.
I used this makefile to compile my program with
tau instrumentation and build tau-mpi executable. One can directly use
tau_cc.sh to compile c programs for tau and tau_cxx.sh for compiling
C++ programs. These scripts in turn use the tau_compiler.sh script to
compile the program with tau instrumentation. Further details are
provided in the users guide documentation mentioned above.
After building the program, we run* it using:
#> mpirun -np 4 taufox
and then we use paraprof (just type paraprof) to visualize it.
- This visualization shows the time
required for execution by different function calls. The bars are
unstacked so that their lengths can be visually compared. One can
increase the scale of this bar plot by dragging the slider at the top
towards the right. A long blue bar shows the amount of time taken to
initialize the MPI system. Clearly time taken by other operations is
negligible as compared to this time. The stacked bar
version is shown here.
- Double clicking on any of the colored sections open up the
visualization for the specific function call as shown
here. In this visualization, we focus on only one function call
MPI_Finalize() and the amount of time it takes to execute this function
call on 4 different nodes.
- Clicking 3-D visualization from menu opens up the 3-D visualization. The x-axis shows the nodes
(written as threads in general), the y-axis shows the function calls
and the z-axis shows the time taken in each call. This is a bar plot.
We can also have triangle and scatter plot by selecting the appropriate radio
button on the top right. Scatter plots help us in finding clustering
information between the data. We can change the scale, the color, the
axes, the specific functions and nodes that we want to highlight (in
green) all using the controls on the right. We can rotate the 3-D
figure to any angle by dragging the mouse as shown in this another figure where we have changed the
orientation and scale of the diagram. The figure can also be set to
auto rotation where it keeps rotating 360 dregs.
Check these cool videos.
- One can also obtain the mean
data of function calls for a specific thread for more clear
understanding.
- One can also view all the matrices
specific to a particular node through
Windows->Thread->statistics table.
Paraprof as many other interesting features for analyzing time in
function calls. The details of these features can be found in the users guide.
For tracing & using Jumshot to visualize call traces, we issue the
following commands:-
#>
tau_merge tau_trace*.trc fox.trc
This
concatenates all the trace files corresponding to all the nodes
into a single file.
Next, we convert trc files to slog2 files for visualizing in Jumpshot.
We issue the
commands:-
#> tau2slog2 fox.trc tau.edf -o fox.slog2
This converts the trace files to slog2 format.
These commands are shown in the console
screenshot.
Another interesting tool that can be used to visualize
these traces is Vampir.
Vampir - Visualization and Analysis of Parallel
Applications:
http://tudresden.de/die_tu_dresden/zentrale_einrichtungen/zih/forschung/software_werkzeuge_zur_unterstuetzung_von_programmierung_und_optimierung/vampir
However, during the time of writing this report, Vampir was not
available for free download.
We used jumpshot to visualize our output.
Issues that remained unresolved:-
- Selective instrumentation did not work for me. The instructions
in users guide proved ineffective.
- How do someone apply instrumentation when a makefile for a
project already exists? There are shabby instructions in the manual,
but they never worked for me.
* In openMPI, lamboot operation
is no longer required.
First Posted: Mar 11 2006. Last Updated:
Mar 12 2006 Credits: 10
Page Last Revised:Monday March 31, 2008