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

后端 未结 3 1344
一向
一向 2020-12-22 02:17

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

3条回答
  •  我在风中等你
    2020-12-22 02:30

    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.

提交回复
热议问题