Questions tagged [cuda-gdb]

CUDA-GDB is the NVIDIA tool for debugging CUDA applications running on Linux and Mac. CUDA-GDB is an extension to the x86-64 port of GDB, the GNU Project debugger.

From the CUDA-GDB documentation:

CUDA-GDB is the NVIDIA tool for debugging CUDA applications running on Linux and Mac. CUDA-GDB is an extension to the x86-64 port of GDB, the GNU Project debugger. The tool provides developers with a mechanism for debugging CUDA applications running on actual hardware. This enables developers to debug applications without the potential variations introduced by simulation and emulation environments.

CUDA-GDB runs on Linux and Mac OS X, 32-bit and 64-bit. CUDA-GDB is based on GDB 7.2 on both Linux and Mac OS X.

88 questions
9
votes
2 answers

All CUDA devices are used for display: Can not debug my CUDA-code from within desktop environment

since last week I got a big problem with my CUDA-development setup. I have an integrated GPU which I attached my monitors too and an extra NVIDIA Card for running my CUDA kernels on. However, i can not debug my code anymore, because it says: fatal:…
kain
  • 129
  • 1
  • 7
8
votes
1 answer

How to find where does program crashed when Cuda API error detected: cudaMemcpy returned (0xb)

I am debugging a cuda program and got the following warning: warning: Cuda API error detected: cudaMemcpy returned (0xb) warning: Cuda API error detected: cudaMemcpy returned (0xb) warning: Cuda API error detected: cudaGetLastError returned…
Xing Shi
  • 2,152
  • 3
  • 21
  • 32
5
votes
1 answer

CUDA debugging, or how to get source code lines in cuda-gdb without disabling optimization?

I have a rather large and complex CUDA code that hangs quite reliably for large numbers of blocks/threads. I am trying to figure out exactly where the code hangs. When I run the code in cuda-gdb, I can see which threads/blocks are hanging, but I…
Pedro
  • 1,344
  • 9
  • 17
4
votes
1 answer

how to prevent values in cuda-gdb

how do I prevent cuda-gdb from optimizing out any value ( whether device or host, local or global )? I have checked nvidia forums but most of them are years old and there seems to be not a solution for old cuda versions, but is there one for the…
4
votes
1 answer

How to run cuda-gdb in windows? Can I use cygwin for it?

I want to debug my application using cuda-gdb in windows. Is it possible to run cuda-gdb in windows? Will cygwin help to do it?
Hemanthkumar
  • 51
  • 1
  • 6
4
votes
1 answer

States of memory data after cuda exceptions

CUDA document is not clear on how memory data changes after CUDA applications throws an exception. For example, a kernel launch(dynamic) encountered an exception (e.g. Warp Out-of-range Address), current kernel launch will be stopped. After this…
cache
  • 1,239
  • 3
  • 13
  • 21
4
votes
2 answers

cudaGetLastError returned (0xb)

I am trying to resolve a CUDA runtime error. Debug information reported by cuda-gdb (with cuda-memcheck on): warning: Cuda API error detected: cudaLaunch returned (0xb) warning: Cuda API error detected: cudaGetLastError returned (0xb) [Thread…
Chirag Jain
  • 143
  • 2
  • 8
4
votes
2 answers

Debug JCuda program

I'd like to know what is the best debugger for a JCuda project (if exists). I know that for normal CUDA applications there are tools like cuda-gdb and cuda-memcheck and I wonder if I can use any of them or similar ones for a JCuda project. Thank…
Rorrim
  • 190
  • 2
  • 7
3
votes
1 answer

cuda-gdb sees only one least capable device from four CUDA-capable devices available

There are four CUDA-capable devices available: teslabot$ ./deviceQuery | grep -i "device [0-9]\|capability" Device 0: "Tesla C2050 / C2070" CUDA Capability Major/Minor version number: 2.0 Device 1: "Tesla C2050 / C2070" CUDA Capability…
Jakub Narębski
  • 309,089
  • 65
  • 217
  • 230
3
votes
2 answers

Nvidia CUDA - passing struct by pointer

I have a problem with passing a pointer to the struct to the device function. I want to create a struct in local memory (i know it's slow, it's just an example) and pass it to the other function by pointer. The problem is that when i debug it with…
unnamed
  • 41
  • 4
2
votes
2 answers

Why is cuda-gdb much slower than gdb in executing the same program without breakpoints in CUDA kernels?

I am having trouble using cuda-gdb. My program starts from python and it loads a shared library containing tensorflow and cuda code. The command I used to start cuda-gdb is cuda-gdb --args python test_cr_bbp_tf2.py. After typing run in cuda-gdb, I…
Ziqi Fan
  • 162
  • 2
  • 11
2
votes
1 answer

Why cuda-gdb shows unexpected memory values?

I am compiling the following fragment of code with nvcc -g -G gdbfail.cu. #include #include __global__ void mykernel() { uint8_t* ptr = (uint8_t*) malloc(8); for (int i = 0; i < 8; i++) { ptr[i] = 7 - i; } …
Curious
  • 507
  • 3
  • 16
2
votes
1 answer

Cannot see any variable values while debugging

I am using Nsight on Ubuntu 16.04. My current set up allows me to compile and run my code perfectly fine through the nsight IDE. After making sure the program was building in debug mode (wasn't originally), it finally allowed me step through my…
cmacia06
  • 189
  • 1
  • 2
  • 13
2
votes
1 answer

Illegal Memory Access on cudaDeviceSynchronize

I am encountering a very strange bug in that I get an 'illegal memory access' error when running a Heat 2D simulation of a particular size, but the simulation runs well if I run the exact same simulation, just with fewer elements. Is there a reason…
Acerebral
  • 225
  • 1
  • 4
  • 13
2
votes
1 answer

Cuda-gdb not stopping at breakpoints inside kernel

Cuda-gdb was obeying all the breakpoints I would set, before adding '-arch sm_20' flag while compiling. I had to add this to avoid error being thrown : 'atomicAdd is undefined' (as pointed here). Here is my current statement to compile the…
Chirag Jain
  • 143
  • 2
  • 8
1
2 3 4 5 6