Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
valgrind [2018/01/08 14:09] – [On Mogon] doeringn | valgrind [2019/05/22 10:10] (current) – removed meesters | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Valgrind ====== | ||
- | Valgrind is - to quote its [[http:// | ||
- | |||
- | 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, | ||
- | |||
- | ===== On Mogon ===== | ||
- | |||
- | On Mogon, valgrind is compiled on the a*-nodes and available as the module '' | ||
- | |||
- | ===== Things to consider when using Valgrind ===== | ||
- | |||
- | Valgrind' | ||
- | |||
- | ==== Submitting jobs ==== | ||
- | |||
- | When submitting a job for profiling consider the run time overhead or else the profiling might be partial, skewed and the output abbreviated: | ||
- | |||
- | ==== Compiling for Valgrind ==== | ||
- | |||
- | Remember to compile with '' | ||
- | |||
- | ===== An example with visualization ===== | ||
- | |||
- | Imaging you submit a job like: | ||
- | <code bash> | ||
- | bsub -n 1 -app Reserve1800M -q short -W 300 valgrind --tool=callgrind cmd [args] | ||
- | </ | ||
- | where '' | ||
- | |||
- | This will produce an output file (e.g. '' | ||
- | <code bash> | ||
- | callgrind_annotate --auto=yes callgrind.out.44289 |less | ||
- | </ | ||
- | |||
- | Or -- on login nodes -- with '' | ||
- | <code bash> | ||
- | kcachegrind callgrind.out.44289 & | ||
- | </ | ||
- | |||
- | giving results like {{ : |