How to start debug version of project in nsight with optirun command?

ε祈祈猫儿з 提交于 2019-12-18 09:28:30

问题


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. :)


回答1:


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.




回答2:


  1. We tested Nsight on Optimus systems without optirun - see "Install the cuda toolkit" in CUDA Toolkit Getting Started on using CUDA toolkit on the Optimus system. We have not tried optirun with Nsight EE.
  2. If you still need to use optirun for debugging, you can try making a shell script that uses optirun to start cuda-gdb and set that shell script as cuda-gdb executable in the debug configuration properties.



回答3:


The simplest thing to do is to run eclipse with optirun, that will also run your app properly.



来源:https://stackoverflow.com/questions/13609233/how-to-start-debug-version-of-project-in-nsight-with-optirun-command

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