Difference between revisions of "GettingStarted"

From Tau Wiki
Jump to: navigation, search
(Getting started with TAU)
(Getting started with TAU)
 
(12 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
This is a short guide to using TAU. Download both [http://www.cs.uoregon.edu/research/pdt/downloads.php PDT] and [http://www.cs.uoregon.edu/research/tau/downloads.php TAU].
 
This is a short guide to using TAU. Download both [http://www.cs.uoregon.edu/research/pdt/downloads.php PDT] and [http://www.cs.uoregon.edu/research/tau/downloads.php TAU].
 +
 +
Before configuring TAU we need to decide which MPI implementation we have and to insure that TAU and PDT are built with the same compiler, if for example your MPI was compiled with Intel, type: (for different compiler see PDT's ''./configure --help'' and change TAU configure parameters ''-cc=, -c++='' and ''fortran=''.)
  
 
<pre>
 
<pre>
 
%> tar -xzf pdtoolkit-3.11
 
%> tar -xzf pdtoolkit-3.11
 
%> cd pdtoolkit
 
%> cd pdtoolkit
%> ./configure
+
%> ./configure -ICPC
%> make all install
+
%> make clean install
 
%> cd ..
 
%> cd ..
 
%> tar -xzf tau2.16.5
 
%> tar -xzf tau2.16.5
 
%> cd tau2
 
%> cd tau2
%> ./configure -pdt=[PDT directory] -mpiinc=[MPI include] -mpilib=[MPI library]
+
%> ./configure -pdt=[PDT directory] -mpiinc=[MPI include] -mpilib=[MPI library] \
 +
  -cc=icc -c++=icpc -fortran=intel
 
%> make clean install
 
%> make clean install
 
</pre>
 
</pre>
This a basic configuration of TAU, there are many more [http://www.cs.uoregon.edu/research/tau/docs/newguide/ch01.html options]. TAU executables are placed in a directory based on your platform like ''x86_64'' (replace this with your own platform). Let us add the bin directory to our path.
+
This a basic configuration of TAU, there are many more [http://www.cs.uoregon.edu/Research/tau/tau-installguide.pdf options]. TAU executables are placed in a directory based on your platform like ''x86_64'' (replace this with your own platform). Let us add the bin directory to our path.
  
 
<pre>
 
<pre>
Line 20: Line 23:
 
</pre>
 
</pre>
  
We can use TAU's [http://www.cs.uoregon.edu/research/tau/docs/taucompiler/index.html compiler scripts] which automatically link-in TAU's instrumentation libraries as well as the MPI libraries. But first we need to tell TAU which instrumentation library to use, we do this by setting the ''TAU_MAKEFILE'' environment variable. If you would like to set some [http://www.cs.uoregon.edu/research/tau/docs/taucompiler/ch01s03.html options] you can use the ''TAU_OPTIONS'' environment variable.  
+
We can use TAU's [http://www.cs.uoregon.edu/research/tau/docs/taucompiler/index.html compiler scripts] (''tau_cc.sh, tau_cxx.sh'', and ''tau_f90.sh'') to build our application. These scripts automatically link-in TAU's instrumentation libraries as well as the MPI libraries. But first we need to tell TAU which instrumentation library to use, we do this by setting the ''TAU_MAKEFILE'' environment variable. If you would like to set some [http://www.cs.uoregon.edu/research/tau/docs/taucompiler/ch01s03.html options] you can use the ''TAU_OPTIONS'' environment variable.
 +
 
 +
Each Makefile is labeled with the options used when configuring TAU; for our example we want ''Makefile.tau-icpc-mpi-pdt''.
  
 
<pre>
 
<pre>
%> export TAU_MAKEFILE=[path to tau2]/tau2/x86_64/lib/Makefile.tau-mpi-pdt
+
%> export TAU_MAKEFILE=[path to tau2]/tau2/x86_64/lib/Makefile.tau-icpc-mpi-pdt
 
%> tau_cxx.sh -c foo.cpp -o foo.o
 
%> tau_cxx.sh -c foo.cpp -o foo.o
 
%> tau_cxx.sh foo.o -o foo
 
%> tau_cxx.sh foo.o -o foo
Line 29: Line 34:
 
</pre>
 
</pre>
  
If you run into any linker errors make sure that TAU is being built with the same compilers as your mpi implementation. Use the ''-cc=, -c++='' and ''fortran='' compiler options, Like to use Intel's compilers type:
+
After we have successfully build and run our application we can view the performance data by using [http://www.cs.uoregon.edu/research/tau/docs/newguide/ch03s10.html pprof]:
 
<pre>
 
<pre>
%> ./configure -pdt=[PDT directory] -mpiinc=[MPI include] -mpilib=[MPI library] \
+
%> pprof
  -cc=icc -c++=icpc -fortran=intel
 
%> make clean install
 
 
</pre>
 
</pre>
  
Afterwards we can view the performance data by using [http://www.cs.uoregon.edu/research/tau/docs/newguide/ch03s10.html pprof]:
+
Or [http://www.cs.uoregon.edu/Research/tau/docs/newguide/bk02.html ParaProf]
 +
 
 
<pre>
 
<pre>
%> pprof
+
%> paraprof
 
</pre>
 
</pre>

Latest revision as of 20:15, 20 July 2012

Getting started with TAU

This is a short guide to using TAU. Download both PDT and TAU.

Before configuring TAU we need to decide which MPI implementation we have and to insure that TAU and PDT are built with the same compiler, if for example your MPI was compiled with Intel, type: (for different compiler see PDT's ./configure --help and change TAU configure parameters -cc=, -c++= and fortran=.)

%> tar -xzf pdtoolkit-3.11
%> cd pdtoolkit
%> ./configure -ICPC
%> make clean install
%> cd ..
%> tar -xzf tau2.16.5
%> cd tau2
%> ./configure -pdt=[PDT directory] -mpiinc=[MPI include] -mpilib=[MPI library] \
   -cc=icc -c++=icpc -fortran=intel
%> make clean install

This a basic configuration of TAU, there are many more options. TAU executables are placed in a directory based on your platform like x86_64 (replace this with your own platform). Let us add the bin directory to our path.

%> export PATH=[path to tau2]/tau2/x86_64/bin:$PATH

We can use TAU's compiler scripts (tau_cc.sh, tau_cxx.sh, and tau_f90.sh) to build our application. These scripts automatically link-in TAU's instrumentation libraries as well as the MPI libraries. But first we need to tell TAU which instrumentation library to use, we do this by setting the TAU_MAKEFILE environment variable. If you would like to set some options you can use the TAU_OPTIONS environment variable.

Each Makefile is labeled with the options used when configuring TAU; for our example we want Makefile.tau-icpc-mpi-pdt.

%> export TAU_MAKEFILE=[path to tau2]/tau2/x86_64/lib/Makefile.tau-icpc-mpi-pdt
%> tau_cxx.sh -c foo.cpp -o foo.o
%> tau_cxx.sh foo.o -o foo
%> mpirun -np 4 ./foo

After we have successfully build and run our application we can view the performance data by using pprof:

%> pprof

Or ParaProf

%> paraprof