Debugging CUDA programs on Keeneland
There are at least two debuggers that can be used with CUDA code on Keeneland.
Allinea DDT
To use ddt on Keeneland, load the appropriate module and start the debugger with the "ddt" command as follows.
$ module load ddt $ ddt
Once the debugger is started, you can point it to the CUDA executable in the same way that a non-accelerated executable would be loaded.
For further details, there are a couple of videos that provide a brief walk-through of CUDA debugging with Allinea DDT debugger.
A very quick introduction that shows how to start a CUDA debugging session with Allinea DDT: Getting Started with GPU Debugging Using Alllinea DDT
A more detailed look at some CUDA debugging features with Allinea DDT: Debugging with Allinea DDT
CUDA-gdb
A command-line debugger with a similar interface to "gdb" comes with the CUDA developer toolkit. On Keeneland, this is usually available by default. In the case that it is not, it can be accessed through the "cuda" module, and then the "cuda-gdb" command.
$ module load cuda $ cuda-gdb
A detailed manual for the cuda-gdb debugger can be found at NVIDIA's CUDA documentation site.