如何调试CUDA使用eclipse Nsight与只有一个GPU [英] How to debug CUDA using eclipse Nsight with only one GPU

查看:604
本文介绍了如何调试CUDA使用eclipse Nsight与只有一个GPU的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到一个错误:所有的cuda设备都用于显示,调试时不能使用
(使用Ubuntu)

I'm getting an error: "all cuda devices are used for display and cannot be used while debugging" (Using Ubuntu)

任何方式使用Nsight eclipse只有一个GPU调试?
我看到了解决方案像
sudo service lightdm stop
杀死X但是杀死Nsight eclipse太多了什么意思?

Is there ANY way to use Nsight eclipse with only one GPU for debugging? I have seen solutions like "sudo service lightdm stop" to kill X but that kills Nsight eclipse too so what's the point?

更新:由于不可能使用运行X的同一GPU进行调试,我不得不问:在家庭网络中如何使用ANOTHER计算机远程访问Ubuntu,使X桌面

Update: Since it is not possible to debug with the same GPU that runs X, I have to ask: How does one go about using ANOTHER computer in his home network to "remotely" access Ubuntu in such a way that the X desktop rendering will be performed by the Guest computer while letting the host GPU run the debugger?

推荐答案

一般来说,它不支持调试在承载X显示器的相同GPU上。从 nsight入门指南运行X11(在Linux上)或Aqua(在Mac上)的GPU不能用于调试CUDA应用程序,并且会在调试器中运行的应用程序中被隐藏,这样的GPU仍然可以使用

In general, it's not supported to debug on the same GPU that is hosting an X display. From the nsight getting started guide: "A GPU that is running X11 (on Linux) or Aqua (on Mac) cannot be used to debug a CUDA application and will be hidden from the application ran in the debugger. Such GPU can still be used for profiling GPU applications. "

然而,我相信在不同的窗口管理器之间实际上有不同的行为。我有一台笔记本电脑与Quadro1000M和RHEL 6.2(与GNOME),与CUDA 5.0,我可以进入调试器在nsight EE(Project ...构建项目,然后运行...调试)。此时,我可以在主机代码中通过并设置断点。如果我运行代码完成我得到正确的输出。但是,您仍然无法调试设备代码。如果您在设备代码中设置了断点(并点击了该断点),则会挂起X会话。

I believe there is actually different behavior amongst different window managers, however. I have a laptop with Quadro1000M and RHEL 6.2 (with GNOME), with CUDA 5.0, and I am able to get into the debugger in nsight EE (Project...Build Project followed by Run...Debug). At that point I can step through and set breakpoints in host code. And if I run the code to completion I get proper output. However, you still can't debug device code. If you set a breakpoint in the device code (and hit that breakpoint), you will hang the X session.

EDIT: =http://docs.nvidia.com/cuda/nsight-eclipse-edition-getting-started-guide/index.html#unique_347065367 =nofollow> CUDA 5.5及更高版本现在支持在单个cc3.5或更高的GPU上进行调试。

CUDA 5.5 and beyond now support the ability to debug on a single cc3.5 or higher GPU.

这篇关于如何调试CUDA使用eclipse Nsight与只有一个GPU的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆