valgrind

This is an old revision of the document!


Valgrind

Valgrind is - to quote its web site - β€œan instrumentation framework for building dynamic analysis tools. There are Valgrind tools that can automatically detect many memory management and threading bugs, and profile your programs in detail. You can also use Valgrind to build new tools.”

In particular Valgrind is frequently used to:

  • detect memory problems (e.g. leaks and cache misses)
  • detect problems related to branch misses

While the program suite is able to profile parallel programs (e.g. those with threading by OpenMP or even multiprocessing with MPI) it does not run programs in parallel. Threads for instance are serialized. This results in an fairly big overhead. If you want to analyze MPI-Programs, you may want to build Valgrind for the respective program yourself – you can ask the HPC-team for support1).

On Mogon, valgrind is compiled on the a*-nodes and available as the module software/valgrind/3.11.02).

Valgrind's documentation is pretty good and straight forward, we recommend the quick start tutorial as well as the actual user manual.

When submitting a job for profiling consider the run time overhead or else the profiling might be partial, skewed and the output abbreviated.


1)
It might be simpler to try Allinea, which is installed on Mogon, too.
2)
as of 21. Oct. 2016
  • valgrind.1477030324.txt.gz
  • Last modified: 2016/10/21 08:12
  • by meesters