Hi everyone,
I’ve been fighting this problem for some time. I’m using the Ubuntu Nsight and I want to debug some of my CUDA code.
I have a GTX650 (only one) and HD4600 integrated graphics. So I switched display to integrated, and that seems to work OK. Without NSight, if I run lsof /dev/nvidia*, I get nothing back. So far so good.
Now, I launch NSight, and if I’m just browsing code, compiling, it’s all good, “lsof /dev/nvidia*” still returns.
Next, I try to debug my CUDA code (the GPU isn’t being used for anything), and here is where the problems occur. When it launches my code (and stops at main), "lsof /dev/nvidia*
" returns:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 12028 cinnamon 17u CHR 195,255 0t0 10482 /dev/nvidiactl
java 12028 cinnamon 139u CHR 195,0 0t0 10483 /dev/nvidia0
java 12028 cinnamon 140u CHR 195,0 0t0 10483 /dev/nvidia0
java 12028 cinnamon 141u CHR 195,0 0t0 10483 /dev/nvidia0
java 12028 cinnamon 143u CHR 250,0 0t0 18230 /dev/nvidia-uvm
And the debugger will not work, claiming all CUDA devices are being used for display. But they’re not! NSight is the only application using the GPU, and it doesn’t understand this, I guess? If I kill that PID it kills NSight, so I’m very sure it’s the only thing using it. Furthermore, it only uses it in Debug mode, so it’s like the CUDA-GDB is using it itself?
I feel I’m really close to getting this to work, but now I just don’t know what to do anymore. :(
I’m hoping someone knows what is going on. This is a NVIDIA tool issue now, so I feel this is the best place to ask (I already annoyed everyone on SO and AskUbuntu, where noone even responded).