4

I have a two gpu system, a Geforce 8400 GS and Geforce GT 520. I am able to run my cuda programs on both the gpus. But when I use cuda-gdb to debug them I get an error saying that the Cuda driver initialization failed. Also, when I run the program with cuda-gdb, the cudaGetDeviceCount says I have only 1 gpu. I am able to run the programs on either of the gpus if I am not using cuda-gdb. Can somebody help me with this?

I am running Ubuntu 11.04.

catchmrbharath
  • 69
  • 1
  • 2
  • 8

1 Answers1

7
  1. It looks like you have a display driver version older than the one required by the CUDA Toolkit. Make sure you installed the display driver downloaded from the same download page you got your toolkit from.
  2. cuda-gdb will hide from the application being debugged GPUs used to run your desktop environment. Otherwise the desktop environment might've hanged when the application is suspended on the breakpoint. To see both GPUs in cuda-gdb you need to run without desktop environment.
Eugene
  • 9,242
  • 2
  • 30
  • 29
  • 1) I tried reinstalling the driver, but it still doesn't work. Any other way to solve the problem? – catchmrbharath Sep 12 '12 at 05:12
  • @user601928 I double-checked this with our debugger team and they confirmed that there's no theories other then driver-toolkit version mismatch. Feel free to contact us at cudatools@nvidia.com so we can help you troubleshoot your system. What OS are you running (assuming Linux, distro and version), is it 32 or 64 bit system? What toolkit version do you use? Thank you in advance. – Eugene Sep 12 '12 at 17:20
  • I came across a thread where it said it works as root. So I went into root and ran `cuda-gdb`. I get an error saying `Cuda ELF image contains unknown ABI version: 5`. I am running Ubuntu 11.04. Its a 32 bit system. My cuda_toolkit version is 4.2.9 . Thanks for helping me out here. – catchmrbharath Sep 13 '12 at 18:19
  • 1
    @catchmrbharath the ABI version message likely means that your application uses PTX code that is JITted by a new driver. You need to use newer toolkit to debug applications built with new driver. – Eugene Sep 17 '12 at 16:42
  • Thanks. I was using the Nvidia graphic drivers instead of the dev drivers and the Nvidia graphic drivers were of a higher version. – catchmrbharath Sep 23 '12 at 09:28