Memcheck is part the Valgrind suite of simulation-based debugging and profiling tools. Memcheck detects memory-management problems, and is aimed primarily at C and C++ programs. When a program is run under Memcheck's supervision, all reads and writes of memory are checked, and calls to malloc/new/free/delete are intercepted. As a result, Memcheck can detect if your program:
Memcheck reports these errors as soon as they occur, giving the source line number at which it occurred, and also a stack trace of the functions called to reach that line. Memcheck tracks addressability at the byte-level, and initialization of values at the bit-level. As a result, it can detect the use of single uninitialized bits, and does not report spurious errors on bitfield operations. Memcheck runs programs about 10-30x slower than normal.
|x86_64 Linux||/usr/local/bin/memcheck*||Multiple versions are available. Use Dotkit to load.|
|BG/Q||/usr/local/tools/valgrind/branch38bgq-2014May21||See BG/Q usage notes in "Quick Start" section below.|
See the LC document "Using Valgrind's Memcheck Tool to Find Memory Errors and Leaks in MPI and Serial Applications on Linux" located at https://computing.llnl.gov/code/memcheck/.
BG/Q Usage Notes:
LC's current version of Memcheck for BG/Q is limited to statically linked executables. Additionally, you must build your application using LC's memcheck_link utility. For example:
memcheck_link mpixlc -g -o testmpi_mc testmpi.cFollowing this, memcheck usage is similar to that described in the Memcheck document linked above.