Debugger in CUDA 5

2019-08-05 10:29发布

Nvidia has released extended eclipse for CUDA 5. They have Nsight plugin for VS2010 also. In VS2010 we can stop program execution at breakpoint in kernel but how to achieve this functionality in eclipse on Linux? I don't see any nsight specific keys to stop execution. I tried changing perspective but it debugs as a normal C/C++ application. I'm using Tesla C2070, Intel Xeon 8 core machine with Linux.

标签: cuda nsight
5条回答
我想做一个坏孩纸
2楼-- · 2019-08-05 10:44

Couple things, and not sure which solved the issue. Drivers updated to latest ones with RC5.0, but I chose to run VNC server instead of native X server. Then the CUDA card(s) are dedicated to my apps and debugging, and it works like a charm, and now accessible from everywhere.

查看更多
虎瘦雄心在
3楼-- · 2019-08-05 10:54

Have you tried CUDA 5.0 RC1? It is available now. You can download and try it. And I have tried the Nsight in it, it works well for debugging.

Best regards!

查看更多
爷的心禁止访问
4楼-- · 2019-08-05 10:55

The 304.43 NVIDIA Driver does not let users other than root debug their CUDA application.

That problem is not present in any past or future public releases. The CUDA documentation recommends using only drivers listed in the CUDA DevZone. The 304.43 driver is not one of them.

That may or may not be the issue you are hitting. But I thought it was worth mentioning.

查看更多
干净又极端
5楼-- · 2019-08-05 10:57

Eugene, I just installed Cuda 5, and I wasn't able to break in any kernel code. It was a clean install of centos 5.5, with a fresh download of cuda-5, and i am running on a asus g71x laptop which has a gtx260m installed.

I thought maybe you cant run display and dedbug on one device still, so i switched to non-nv x display, but still had same issue, cant stop in the kernel code.

查看更多
聊天终结者
6楼-- · 2019-08-05 11:06

I'm from Nsight Eclipse Edition team.

Our goal is specifically for the application to be debugged as a normal C/C++ application. This means that you can set breakpoints, use "run to line", etc. regardless of whether you debug host or device code.

Basically, the process is quite standard for Eclipse:

  1. Create a project (you can also import existing executable)
  2. Click debug button
  3. Debugger will run and by default will break in the main function. Note that no device code posted on the device so you will only see the host thread.
  4. Set a breakpoint in the device code and hit resume (note that Breakpoints view toolbar also allows you setting breakpoint on any CUDA kernel launch)

Debugger will break when device code reaches the breakpoint. You can inspect your application state using visual debugger UI.

查看更多
登录 后发表回答