Difference between revisions of "Performance And Debugging Tools: GPC"
Jump to navigation
Jump to search
m (→Debugging) |
|||
Line 21: | Line 21: | ||
===gdb=== | ===gdb=== | ||
− | + | [http://www.gnu.org/software/gdb/ GDB] is solid source-language level serial debugger. | |
− | |||
− | |||
+ | <!-- ===idb=== Don't have this properly installed yet --!> | ||
==Performance Profiling== | ==Performance Profiling== |
Revision as of 17:47, 14 August 2009
Memory Profiling
Valgrind
Valgrind http://valgrind.org/ is a suite of tools for debugging and profiling programs especially useful for finding memory problems, such as memory leaks and segfaults.
In serial valgrind can simply by run as follows, with no need to recompile your binary
valgrind --tool=memcheck ./a.out
there are many useful flags such as --leak-check=yes and --show-reachable=yes that can be found by running valgrind --help on consulting the man pages.
Valgrind can also be used in parallel with MPI as well, http://valgrind.org/docs/manual/mc-manual.html#mc-manual.mpiwrap in a similar fashion, however a library needs to be preloaded first.
LD_PRELOAD=/lib/valgrind/amd64-linux/libmpiwrap.so mpirun -np 2 valgrind --tool=memcheck ./a.out
Debugging
gdb
GDB is solid source-language level serial debugger.