Debugger in CUDA 5

[亡魂溺海] 提交于 2020-01-05 05:44:27

问题


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.


回答1:


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.




回答2:


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:


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.




回答4:


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!




回答5:


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.



来源:https://stackoverflow.com/questions/11858500/debugger-in-cuda-5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!