ARCHIVED: How do I use VAMPIR?

This content has been archived, and is no longer maintained by Indiana University. Information here may no longer be accurate, and links may no longer be available or reliable.

To use VAMPIR to extract performance information from your parallel application:

  1. Generate a trace file by linking your code to the VAMPIRtrace library, and then executing the linked code. See Instrumenting your code below.
  2. 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.

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:

  mpicc MyApp -lMyLibraries ...

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 1

Once the parallel job starts, a file paralleljob.*.out will exist and contain a line similar to this:

  Server listens on: s11c1b11:30000

Invoke the parallel trace viewer with:

  > vng

You 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 National Science Foundation (NSF) grants 1053575 and 1548562. Any opinions, findings, conclusions, or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the NSF.

This is document awbx in the Knowledge Base.
Last modified on 2023-04-21 16:57:27.