Debugging and profiling: Difference between revisions
No edit summary |
(Marked this version for translation) |
||
Line 1: | Line 1: | ||
<languages /> | <languages /> | ||
<translate> | <translate> | ||
<!--T:1--> | |||
An important step in the software development process, particularly for compiled languages like Fortran and C/C++, concerns the use of a program called a debugger to detect and identify the origin of runtime errors (e.g. memory leaks, floating point exceptions and so forth) so that they can be eliminated. Once the program's correctness is assured, a further step is profiling the software. This involves the use of another software tool, a profiler, determine what percentage of the total execution time each section of the source code is responsible for when run with a representative test case. A profiler can give information like how many times a particular function is called, which other functions are calling it and how many milli-seconds of time each invocation of this function costs on average. | An important step in the software development process, particularly for compiled languages like Fortran and C/C++, concerns the use of a program called a debugger to detect and identify the origin of runtime errors (e.g. memory leaks, floating point exceptions and so forth) so that they can be eliminated. Once the program's correctness is assured, a further step is profiling the software. This involves the use of another software tool, a profiler, determine what percentage of the total execution time each section of the source code is responsible for when run with a representative test case. A profiler can give information like how many times a particular function is called, which other functions are calling it and how many milli-seconds of time each invocation of this function costs on average. | ||
= Debugging and profiling tools= | = Debugging and profiling tools= <!--T:2--> | ||
<!--T:3--> | |||
The Compute Canada national clusters offer a variety of debugging and profiling tools, both command line and those with a graphical user interface, whose use requires an X11 connection. Note that debugging sessions should be conducted using an [[Running_jobs#Interactive_jobs | interactive job]] and not run on the login node. | The Compute Canada national clusters offer a variety of debugging and profiling tools, both command line and those with a graphical user interface, whose use requires an X11 connection. Note that debugging sessions should be conducted using an [[Running_jobs#Interactive_jobs | interactive job]] and not run on the login node. | ||
== GNU Debugger (gdb) == | == GNU Debugger (gdb) == <!--T:4--> | ||
<!--T:5--> | |||
Please see [[GDB | GDB page]] | Please see [[GDB | GDB page]] | ||
== PGI Debugger (pgdb) == | == PGI Debugger (pgdb) == <!--T:6--> | ||
See [[Pgdbg]] | See [[Pgdbg]] | ||
== ARM Debugger (ddt) == | == ARM Debugger (ddt) == <!--T:7--> | ||
<!--T:8--> | |||
Please see the [[ARM software | ARM software page]]. | Please see the [[ARM software | ARM software page]]. | ||
==GNU Profiler (gprof) == | ==GNU Profiler (gprof) == <!--T:9--> | ||
<!--T:10--> | |||
Please see [[Gprof | Gprof page]] | Please see [[Gprof | Gprof page]] | ||
== PGI Profiler (pgprof) == | == PGI Profiler (pgprof) == <!--T:11--> | ||
Please see [[PGPROF | Pgprof page]] | Please see [[PGPROF | Pgprof page]] | ||
== Nvidia command-line profiler (nvprof) == | == Nvidia command-line profiler (nvprof) == <!--T:12--> | ||
Please see [[Nvprof | nvprof page]] | Please see [[Nvprof | nvprof page]] | ||
== Nvidia Visual Profiler (nvvp) == | == Nvidia Visual Profiler (nvvp) == <!--T:13--> | ||
==Valgrind== | ==Valgrind== <!--T:14--> | ||
<!--T:15--> | |||
Please see [[Valgrind | Valgrind page]] | Please see [[Valgrind | Valgrind page]] | ||
= External references = | = External references = <!--T:16--> | ||
<!--T:17--> | |||
* [https://docs.scinet.utoronto.ca/index.php/Introduction_To_Performance Introduction to (Parallel) Performance] from SciNet | * [https://docs.scinet.utoronto.ca/index.php/Introduction_To_Performance Introduction to (Parallel) Performance] from SciNet | ||
* [https://www.sharcnet.ca/help/index.php/Measuring_Parallel_Scaling_Performance Measuring Parallel Scaling Performance] from SHARCNET | * [https://www.sharcnet.ca/help/index.php/Measuring_Parallel_Scaling_Performance Measuring Parallel Scaling Performance] from SHARCNET | ||
* [https://www.youtube.com/watch?v=YsF5KMr9uEQ "Code profiling on Graham"], video, 54 minutes. | * [https://www.youtube.com/watch?v=YsF5KMr9uEQ "Code profiling on Graham"], video, 54 minutes. | ||
<!--T:18--> | |||
[[Category:Pages with video links]] | [[Category:Pages with video links]] | ||
</translate> | </translate> |
Revision as of 17:26, 16 July 2019
An important step in the software development process, particularly for compiled languages like Fortran and C/C++, concerns the use of a program called a debugger to detect and identify the origin of runtime errors (e.g. memory leaks, floating point exceptions and so forth) so that they can be eliminated. Once the program's correctness is assured, a further step is profiling the software. This involves the use of another software tool, a profiler, determine what percentage of the total execution time each section of the source code is responsible for when run with a representative test case. A profiler can give information like how many times a particular function is called, which other functions are calling it and how many milli-seconds of time each invocation of this function costs on average.
Debugging and profiling tools
The Compute Canada national clusters offer a variety of debugging and profiling tools, both command line and those with a graphical user interface, whose use requires an X11 connection. Note that debugging sessions should be conducted using an interactive job and not run on the login node.
GNU Debugger (gdb)
Please see GDB page
PGI Debugger (pgdb)
See Pgdbg
ARM Debugger (ddt)
Please see the ARM software page.
GNU Profiler (gprof)
Please see Gprof page
PGI Profiler (pgprof)
Please see Pgprof page
Nvidia command-line profiler (nvprof)
Please see nvprof page
Nvidia Visual Profiler (nvvp)
Valgrind
Please see Valgrind page
External references
- Introduction to (Parallel) Performance from SciNet
- Measuring Parallel Scaling Performance from SHARCNET
- "Code profiling on Graham", video, 54 minutes.