Skip to content

Running gnitest with valgrind

Sung-Eun Choi edited this page Jun 24, 2016 · 6 revisions

Note: You will need valgrind 3.10+ to to correctly handle hugetlbfs.

From your libfabric-cray directory:

 % [srun|aprun] ... /path/to/valgrind \
   --suppressions=./prov/gni/contrib/gnitest.supp \
   --trace-children=yes <-q> \
   <--leak-check=full> <--show-leak-kinds=definite> \
   ./prov/gni/test/gnitest -j1 ... <--no-early-exit>

If you want more details about the particular memory leaks, use the --leak-check=full flag to valgrind. This will give you a stack trace at the time the memory was allocated, which sometimes can be enough to help plug the leak.

For now we're only concerned about definite leaks, so if you want less noisy output use --show-leak-kinds=definite.

Sometime it may be useful to run the criterion test with --no-early-exit, so that it will keep running if an criterion assertion is tripped.