Author: M.S Mabakane Date: February, 08 2011
TAU (Tuning and Analysis Utilities) is a portable profiling and tracing toolkit that can be used to analyse the performance of parallel models written in Fortran, C, C++ and Python. It is also used to identify key areas such as mpi processes, message passing; in general; the performance of the application that occur during the execution of the model. Many various options are also available in the TAU package that can be selected to obtain more detail information about the performance of the model.
At CHPC, TAU is installed and tested in the CHPC Sun Microsystems cluster to help users improve the performance of their models. On the other hand, TAU is also anticipated to be a useful tool for developers who need to solve challenging errors of their programs. For this task, DLPOLY-2 was selected for the purpose of testing this tuning analysis system in the CHPC cluster. However, other models such as (WRF, CAM, POP and CCSM) were also tested by the TAU Developers (University of Oregon and University of Tennessee, USA) in their supercomputing systems.
Now, this is the procedure to port, compile and run the code using TAU:
Please note: typewriter characters depicts the command, directory or files in the system.
ssh -X firstname.lastname@example.org
module add intel. The system will then add the intel compiler and open-mpi in the user's environment. To test the environment type:
which ifortand the following path should be displayed:
module add tau. It will add the following path to tau libraries:
TAU_MAKEFILE=/opt/gridware/performance/tau-2.19.1/x86_64/lib/Makefile.tau-mpi-pdt-tracein your profile. To test the TAU environment type:
which tau_f90.sh, it should display these message:
tau_f90.shto compile the code. If it is written in C language use tau_cc.sh. All TAU binaries are located in:
/opt/gridware/performance/tau-2.19.1/x86_64/bin/. The current installation of TAU has been performed using Intel Fortran compiler.
untar -xzvf packagename. For this test, the working directory is:
Makefileby doing the following:
BINROOT = /export/home/username/scratch/dlpoly-tar/executables/ # Location of executable CC = icc # Intel compiler EX = DLPOLY_2.18.X # Executable name EXE = $(BINROOT)/$(EX) FC=ifort # Fortran compiler SHELL=/bin/sh TYPE=par $(MAKE) LD="tau_f90.sh -o" \ # Tau mpi wrapper (e.g. In this line, users normally put mpi wrapper such as mpif90) LDFLAGS="-O3 " \ FC="tau_f90.sh -c" \ # Tau mpi wrapper (e.g. in this line, users normally put an mpi wrapper such as mpif90) FCFLAGS="-O3 " \ EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
dl_poly_2.18/srcmod, compile the model using the following command:
/export/home/username/scratch/dlpoly-tar/executables/. Note: The only important change in your model is to replace
mpiwith tau wrapper. e.g. (
mpif90should be replaced by
mpiccshould be replaced by
###These lines are for Moab #MSUB -l nodes=2:ppn=8 #MSUB -l partition=ALL #MSUB -l walltime=168:00:00 #MSUB -m be #MSUB -V #MSUB -o /export/home/username/scratch/dlpoly-2/out #MSUB -e /export/home/username/scratch/dlpoly-2/err #MSUB -d /export/home/username/scratch/dlpoly-2/ #MSUB -mb ##### Running commands exe=/export/home/username/scratch/dlpoly-tar/executables/DLPOLY_2.18.X nproc=`cat $PBS_NODEFILE | wc -l` mpirun -np $nproc $exe
tau_treemerge.pl. Note: this command will merge all the tautrace & events files to just two files named: tau.trc and tau.edf)
tau2slog2 tau.trc tau.edf -o tau.slog2. Note: This will then converts the traces to the slog2 format. This process may take more than 40 minutes depending on the size of the model.
jumpshot tau.slog2. It will then pop-up a message which state as follows “It seems this is your first time using Jumpshot-4, a setup file will be created in your home directory with the default settings”.
For more information about TAU, visit the following website address: http://www.cs.uoregon.edu/research/tau/docs/newguide/bk01ch01s02.html