Instead of the accumulation of all counter values it is also possible to generate a trace file that contains for every entry and exit of a region a trace record containing the following information:
Further trace records will be generated that define the regions and the counters that are traced.
Due to the timestamps, a tracefile allows to analyze performance values of regions for different calls during program execution.
Tracing is enabled by the following steps:
adaptor ... [-trace=vt | -trace=vtsp]
export TRACE=1 executable -trace executable
a.out -trace -pm=pm_config
Tracefiles generated by VampirTrace can be displayed by VAMPIR [BHNW01]. Vampir provides a convenient way to graphically analyse runtime event traces produced by MPI or serial applications. Vampir offers the possibility to focus quickly at the appropriate level of detail to analyse application performance issues.
For serial programs, the single processor version of VampirTrace should be linked.
adaptor ... -o a.out -trace=vtsp -pm=...
When tracing is enabled, a trace record for VampirTrace will be generated at every entry and exit of a region. Enabled performance counters will also be written in the trace records.
a.out -trace -pm=pm_config
Figure 7 shows the performance counter values related to the regions of the program along a timeline.
The ADAPTOR instrumenation also guarantees that VAMPIR finds the corresponding source file if the user wants to see the source code of a region (see Figure 8).
The main purpose of VAMPIR is the visualization of MPI program. Also for MPI programs all the functionalities can be used together. A little bit attention has been paid to a correct linking step:
adaptor -hpf -trace=vt -pm=perfctr -dm=mpi
When running the application without any flags (-pm or -trace), only the Vampir visualization for MPI is enabled (and it is likely that there is the only distinction between user code and MPI calls). By setting the flag -trace the generated trace records for the regions allow to identify regions and MPI calls.
mpirun -np 2 executable -trace
If performance counting is enabled, there will be additional trace records for the performance counters that can also be visualized.
mpirun -np 2 executable -trace -pm=pm_config
Figure 9 shows the visualization of a performance counter FP_INS for two processes. The display shows that the floating-point rate is rather different on the two processors.