Difference between revisions of "Performance And Debugging Tools: GPC"

From oldwiki.scinet.utoronto.ca
Jump to navigation Jump to search
Line 30: Line 30:
 
===gprof===
 
===gprof===
  
===peekview===
+
[http://sourceware.org/binutils/docs-2.19/gprof/index.html gprof] is a very useful tool for finding out where a program is spending its time; its use is described in our [[Introduction_To_Performance#gprof_.28profiling:_everywhere.29 | Intro To Performance]].
  
===peekperf===
+
===Valgrind===
 +
 
 +
Besides being a extremely good at [[Performance_And_Debugging_Tools:_GPC#Memory_Profiling | finding memory problems]], [http://valgrind.org/ valgrind] comes with a tool called [http://valgrind.org/docs/manual/cg-manual.html cachegrind] which can find cache use problems in your code; its use is described in our [[Introduction_To_Performance#cachegrind_.28Memory_use_analysis:_GPC.29 | Intro To Performance]].
 +
 
 +
 
 +
===Scalasca===
 +
 
 +
[http://www.fz-juelich.de/jsc/scalasca/ Scalasca] is a sophisticated tool for analyzing performance and finding common performance problems.  We describe it in our [[Introduction_To_Performance#Scalasca_.28profiling.2C_tracing:_TCS.2C_GPC.29 | Intro to Performance]].

Revision as of 17:46, 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

idb

pdb

Performance Profiling

gprof

gprof is a very useful tool for finding out where a program is spending its time; its use is described in our Intro To Performance.

Valgrind

Besides being a extremely good at finding memory problems, valgrind comes with a tool called cachegrind which can find cache use problems in your code; its use is described in our Intro To Performance.


Scalasca

Scalasca is a sophisticated tool for analyzing performance and finding common performance problems. We describe it in our Intro to Performance.