For more detailed profiles, TAU provides two means to compile your application with TAU: through your compiler or through source transformation using PDT.
TAU provides these scripts: tau_cc.sh, tau_cxx.sh, tau_upc.sh, tau_f77.sh and tau_f90.sh to compile programs. You might use tau_cc.sh to compile a C program by typing:
%> module load tau %> tau_cc.sh -tau_options=-optCompInst samplecprogram.c
On machines where a TAU module is not available, you will need to set the tau makefile and/or options. The makefile and options controls how will TAU will compile you application. Use
%>tau_cc.sh -tau_makefile=[path to makefile] \ -tau_options=[option] samplecprogram.c
The Makefile can be found in the /[arch]/lib
directory of your TAU distribution, for example
/x86_64/lib/Makefile.tau-mpi-pdt
.
You can also 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] %>export TAU_OPTIONS=-optCompInst %>tau_cc.sh sampleCprogram.c
Similarly, if you want to set compile time options like
selective instrumentation you can use the TAU_OPTIONS
environment variable.
TAU provides these scripts: tau_cc.sh, tau_cxx.sh, tau_upc.sh, tau_f77.sh and tau_f90.sh to instrument and compile programs. You might use tau_cc.sh to compile a C program by typing:
%> module load tau %> tau_cc.sh samplecprogram.c
When setting the TAU_MAKEFILE make sure the Makefile name contains
pdt
because you will need a version of TAU built with
PDT.
A list of options for the TAU compiler scripts can be found by typing
man tau_compiler.sh
or in this chapter of the reference guide.
These are some commonly used options available to the TAU compiler
scripts. Either set them via the TAU_OPTIONS
environment
variable or the -tau_options=
option to
tau_cc.sh, tau_cxx.sh, tau_upc.sh, tau_f77.sh and tau_f90.sh
-optVerbose
-
Enable verbose output (default: on)
-optKeepFiles
-
Do not remove intermediate files
-optShared
-
Use shared library of TAU (consider when using
tau_exec