Cuda-gdb User Manual Cuda 9

When developing massively parallel applications on the GPU, you need a debugger capable of handling thousands of threads running simultaneously on each GPU in the system. CUDA-GDB delivers a seamless debugging experience that allows you to debug both the CPU.

When developing massively parallel applications on the GPU, you need a debugger capable of handling thousands of threads running simultaneously on each GPU in the system. CUDA-GDB delivers a seamless debugging experience that allows you to debug both the CPU and GPU portions of your application simultaneously.

If you already use GDB to debug your CPU application then getting started with CUDA-GDB involves learning just a few additional debugger commands. Just like GDB, CUDA-GDB provides a console-based debugging interface you can use from the command line on your local system or any remote system on which you have Telnet or SSH access. If you prefer debugging with a GUI frontend, CUDA-GDB also supports integration with DDD, EMACS or Nsight Eclipse Edition

Cuda Guide

CUDA-GDB Feature Set Overview

Cuda 9.0

CUDA-GDB supports debugging of both 32 and 64-bit CUDA C/C++ applications. It provides full control over the execution of the CUDA application including breakpoints and single-stepping. You can examine variables, read/write memory and registers and inspect the GPU state when the application is suspended. Third party developers can leverage CUDA-GDB powerful features directly, see CUDA Samples, which can be downloaded with the latest CUDA Toolkit .


(Click to zoom)

/vector-smart-battery-charger-user-manual.html. CUDA-GDB on Linux and MAC
> Debug CUDA C and C++ applications directly on the GPU
> Simultaneously debug on the CPU and more GPUs
> Debug at either high-level C/C++ source or low-level GPU assembly
> Use conditional breakpoints to identify and correct errors in CUDA code
> Identify memory access violations
> Automatically break on every kernel launch
> Use the autostep mode to detect errors more precisely
> Debug multiple applications simultaneously using multiple sessions
> Selectively assert in CUDA code
> Dynamic Parallelism Support
> Inlined Subroutine Support
> Run CUDA-MEMCHECK in integrated mode to detect precise exceptions.


(Click to zoom)

> Kernel launch stack information
> Single-GPU debugging
> Long-running kernel debugging
> Remote debugging for x86 and ARM

Developers should be sure to check out NVIDIA Nsight for integrated debugging and profiling. Nsight Eclipse Edition for Linux and MAC support, and Nsight Visual Studio Edition for Windows.

CUDA Debugging on Clusters

NVIDIA partners with the following vendors to provide cluster-class debugging solutions for CUDA applications:

Gdb

CUDA-GDB Documentation

Questions on CUDA Tools

If you encounter difficulty with any of the CUDA Tools or have more questions please contact the NVIDIA tools team at [email protected] .

(Manual) Configurations for GPU Debugging¶

Debugging a CUDA GPU involves pausing that GPU. When the graphics desktopmanager is running on the same GPU, then debugging that GPU freezes the GUI andmakes the desktop unusable. To avoid this, use CUDA-GDB in the following systemconfigurations:

Single GPU¶

In a single GPU system, CUDA-GDB can be used to debug CUDA applications only ifno X11 server (on Linux) or no Aqua desktop manager (on Mac OS X) is running on thatsystem. On Linux you can stop the X11 server by stopping the gdm service. On Mac OSX you can log in with >console as the user name in the desktop UI login screen. Thisallows CUDA applications to be executed and debugged in a single GPU configuration.

Multi-GPU Debugging with the Desktop Manager Running¶

This can be achieved by running the desktop GUI on one GPU and CUDA on the otherGPU to avoid hanging the desktop GUI.

Cuda Gdb Mac

On Linux¶

Cuda Gdb Tutorial

The CUDA driver automatically excludes the GPU used by X11 from being visible tothe application being debugged. This might alter the behavior of the application since, ifthere are n GPUs in the system, then only n-1 GPUs will be visible to the application.

On Mac OS X¶

The CUDA driver exposes every CUDA-capable GPU in the system, including the oneused by Aqua desktop manager. To determine which GPU should be used for CUDA,run the deviceQuery app from the CUDA SDK sample. The output of deviceQueryas shown in Figure 1 deviceQuery Output indicates all the GPUs in the system.For example, if you have two GPUs you will see Device0: “GeForce xxxx” andDevice1: “GeForce xxxx”. Choose the Device<index> that is not rendering thedesktop on your connected monitor. If Device0 is rendering the desktop, then chooseDevice1 for running and debugging the CUDA application. This exclusion of thedesktop can be achieved by setting the CUDA_VISIBLE_DEVICES environment variableto 1: