Skip to content

Using TAU with Python

Kevin Huck edited this page Oct 19, 2020 · 1 revision

TAU can be used to profile and/or trace Python programs. A simple set of Python configuration/installation instructions for Summit are below (unfortunately, the TAU module on Summit doesn't have a Python configuration).

Get latest TAU source code from GitHub

(or you can download the latest release from http://tau.uoregon.edu)

git clone https://github.com/UO-OACISS/tau2.git
cd tau2

Configure and build TAU

First, load the Python module of choice, for example:

module load python/3.7.0

Then configure TAU to use the default base GCC compilers:

module unload xl darshan-runtime
./configure -python
make -j install
# Add TAU to your path
PATH=`pwd`/ibm64linux/bin:$PATH

Test the build:

# Go to the TAU python example directory
cd examples/python
# Run the example.  the -T arguments specify the TAU configuration.  'serial' means without MPI.
tau_python -T serial,python ./firstprime.py
# dump the profile summary (in profile.0.0.0)
pprof