How do I use VAMPIR?
To use VAMPIR to extract performance information from your parallel application:
- Generate a trace file by linking your code to the VAMPIRtrace
library, and then executing the linked code. See Instrumenting your code below.
- Use VAMPIR to view the contents of that trace file in various formats. You can insert VAMPIR calls to obtain more detailed information. See Viewing trace results below.
VAMPIR converts the tracefile results into a variety of useful graphical displays, including timelines showing state changes and communication between processors, charts and tables displaying execution times of routines, and plots indicating message sizes and transmission rates. See Information available in the trace files below.
Instrumenting your code
Instrumenting your code is done at build time. Several VAMPIR tracing libraries exist and are available by choosing an appropriate SoftEnv key.
To set up the appropriate environment variables that let you build
your application with instrumentation, add one of the following to your
.soft file:
+VampirTrace-gcc-32
+VampirTrace-gcc-64
+VampirTrace-intel-32
+VampirTrace-intel-64
The softenv command will give you the above list of
available compiler options. If an appropriate combination does not
exist, contact hpa-admin@iu.edu to request
that one be added.
Alternatively, the tracing libraries can be downloaded and built
privately. The build procedure is straightforward and well
documented. Once your library is selected and your environment is set
up, build the application by replacing the mpi** commands
with vt** commands. For example, suppose your build involves:
An instrumented version is built with:
vtcc MyApp -lMyLibraries ...Once the instrumented application is built, it is run as usual. Trace files will appear in the same location as the output from the application. Due to the large amount of detail contained in these trace files, they can be quite large. Writing to your home directory is not recommended.
Viewing trace results
To invoke the viewers from the command line, add
+Vampir to your .soft file, and then execute
a resoft.
Two trace viewers exist, a single processor version for small trace files (less than a few 100MB), and a parallel version for others. To invoke the serial version, execute: > vampir
The parallel job involves starting a server on several processors:
> paralleljob vngd -CPU 16 -queue LONG -wallhours 1Once the parallel job starts, a file paralleljob.*.out
will exist and contain a line similar to this:
Invoke the parallel trace viewer with:
> vngYou will need to know the hostname ("s11c1b11" in this case) to connect to the server. Follow the instructions presented by the GUI to view your trace files.
Information available in the trace files
A very large amount of information is recorded during tracing. The GUIs are somewhat intuitive and you may not need the user guides to use them. Details are available in manuals maintained online. The path to the viewer executables contains documentation with details.
This document was developed with support from the National Science Foundation (NSF) under Grant No. 0503697 to the University of Chicago and subcontracted to Indiana University. Additional support was provided by IU through its participation in the TeraGrid, which is supported by the NSF under Grants No. 0833618, SCI451237, SCI535258, and SCI504075. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.




