
100 Cray T3E User’s Guide
program must be compiled with the option -g, which disables optimiza-
tion and thus increases the run time.
More information about PAT in general and on its advanced features can
be found on the manual pages (man pat).
9.5 Tracing message passing: VAMPIR
VAMPIR Visualization and Analysis of MPI Resources is a profiling tool for
MPI applications. It consists of two parts: the VAMPIRtrace library which
is linked to the program to be profiled, and the VAMPIR visualization
tool which is used to analyze the trace file after the program execution.
The VAMPIR trace library is installed on the Cray T3E. The trace files
must, however, be inspected with the visualization tool on Caper.
9.5.1 The VAMPIRtrace library
VAMPIRtrace is an MPI profiling library that generates VAMPIR traces.
It hooks into the MPI profiling interface which guarantees low tracing
overhead. The effects of distributed clock drifts are corrected automat-
ically. Tracing can be enabled or disabled during runtime. The profiling
library is suitable for Fortran 90, FORTRAN 77, C and C++ programs.
Before using the VAMPIRtrace library the VAMPIR environment on the
T3E must be initialized with the command use vampir. The VAMPIR-
trace library can be linked to a user’s program, without any amendments,
with the options -lVT -pmpi. In practice, however, one needs to add
calls to VAMPIRtrace API routines in the source code to facilitate the
analysis. This is done most conveniently using the source code pre-
processor to maintain a single version to be run with or without the
VAMPIRtrace. When a parallel program linked with the trace library is
executed, it generates a trace file with the suffix .bvp. The trace file may
be so large that you should run the program in the temporary or work
directory ($TMPDIR or $WRKDIR).
The following example shows how to generate a trace file from a For-
tran 90 master-slave application. The source code in the example is
divided into modules in files loadbal.F90, pgamma.F90, mpi.f and
vt.F90, and can be found at the Web address http://www.csc.fi/
programming/examples/vampir_mod/
t3e% use vampir
[vampir is now in use]
t3e% f90 -I $PAL_ROOT/include -o loadbal mpi.f vt.F90 \
loadbal.F90 pgamma.F90 -lVT -lpmpi -DUSE_VT
Comentarios a estos manuales