1.4. TAU scripted compilation

If you wish to avoid the modification of your Makefiles, or are not using Makefiles at all, TAU provides three script that will instrument your code from the command line.

1.4.1. Usage

TAU provides these scripts: tau_f90.sh, tau_cc.sh, and tau_cxx.sh to compile Fortan, C, and C++ programs respectively. These can the found in the tools/src/ directory so you may wish to add it to your path. You might use tau_cc.sh to compile a C program by typing:

%>tau_cc.sh -tau_makefile=[path to makefile] \
            -tau_options=[optionx] sampleCprogram.c
    

The Makefile can usually be found in the /[arch]/lib directory, for example /apple/lib/Makefile.tau-pdt.

tau_cc.sh also has the ability to use a Makefile specified in an environment variable. to run tau_cc.sh so it uses the Makefile specified by environment variable TAU_MAKEFILE, type:

%>export TAU_MAKEFILE=[path to tau]/[arch]/lib/[makefile].
%>tau_cc.sh sampleCprogram.c
    

Similarly, if you want to set TAU_COMPILER options like selective instrumentation use the TAU_OPTIONS environment variable.