“The launch timed out and was terminated” error with Bumblebee on Linux

落爺英雄遲暮 提交于 2019-12-08 11:48:18

问题


When running a long kernel (especially in debug mode with some memory checking) on a CUDA-enabled GeForce GPU with Bumblebee, I get the following error:

CUDA error 6: the launch timed out and was terminated

This seems to be caused by the NVIDIA driver's watchdog. A solution is available here. However, why is this happening while using Bumblebee and optirun to run a simple CUDA kernel (i.e. I do not use my NVIDIA GPU for display)?

The command I used to launch the program is:

optirun [cuda-memcheck] ./my_program program_options

回答1:


The solution (found here) was to use the --no-xorg option for optirun, i.e.:

optirun --no-xorg [cuda-memcheck or cuda-gdb] ./my_program program_options

Indeed, the default behavior of optirun is to create a secondary X server which will then be subject to the driver's watchdog. By using the --no-xorg option, we can avoid the unnecessary consequences of this extra X server. This new option is available since Bumblebee 3.2.

It also provides a way to use cuda-gdb and avoid the following error:

fatal: All CUDA devices are used for display and cannot be used while debugging. (error code = 24)



来源:https://stackoverflow.com/questions/17335808/the-launch-timed-out-and-was-terminated-error-with-bumblebee-on-linux

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