如何使用optirun命令在nsight中启动项目的调试版本? [英] How to start debug version of project in nsight with optirun command?

查看:165
本文介绍了如何使用optirun命令在nsight中启动项目的调试版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一些简单的cuda程序(我是学生,所以我需要练习),事情是我可以编译它与nvcc从终端(使用Kubuntu 12.04LTS),然后执行它与optirun ./ a.out(hardver是geell gt 525m在dell inspiron)和一切工作正常。主要的问题是,我不能做任何事情从Nsight。当我尝试启动调试版本的代码的消息是启动失败!二进制找不到!。我认为这是关于运行命令与optirun,但我不知道。任何类似的经历吗?谢谢,帮助提前人。 :)

解决方案

由于这是我在搜索nsight optirun时发现的第一个帖子,我只是想写下来


  1. 转到运行 - > Debug Configurations - > Debugger


  2. 查找 CUDA GDB可执行档的文字方块(在本例中设定为$ {cuda_bin} / cuda -gdb)


  3. 预置optirun --no-xorg,在我的例子中为optirun --no-xorg $ {cuda_bin} / cuda-gdb


--no-xorg选项可能不需要,一个OpenGL窗口,因为它防止任何出现。对我的科学代码,但它是必需的,因为它阻止我陷入内核超时。



快乐的bug狩猎。


I'we been writing some simple cuda program (I'm student so I need to practice), and the thing is I can compile it with nvcc from terminal (using Kubuntu 12.04LTS) and then execute it with optirun ./a.out (hardver is geforce gt 525m on dell inspiron) and everything works fine. The major problem is that I can't do anything from Nsight. When I try to start debug version of code the message is "Launch failed! Binaries not found!". I think it's about running command with optirun but I'm not sure. Any similar experiences? Thanks, for helping in advance folks. :)

解决方案

As this was the first post I found when searching for "nsight optirun" I just wanted to wanted to write down the steps I took to make it working for me.

  1. Go to Run -> Debug Configurations -> Debugger

  2. Find the textbox for CUDA GDB executable (in my case it was set to "${cuda_bin}/cuda-gdb")

  3. Prepend "optirun --no-xorg", in my case it was then "optirun --no-xorg ${cuda_bin}/cuda-gdb"

The "--no-xorg" option might not be required or even counterproductive if you have an OpenGL window as it prevents any of that to appear. For my scientific code however it is required as it prevents me from running into kernel timeouts.

Happy bug hunting.

这篇关于如何使用optirun命令在nsight中启动项目的调试版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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