我在我的Ubuntu 12.10上安装了cuda 5,运行良好,我也可以在终端上通过cuda-gdb进行编译和调试。我正在尝试使用nsight,它编译并执行我的代码时没有任何问题,但是当我尝试调试时,我得到了以下错误
Error in final launch sequence
Failed to execute MI command:
-gdb-set cuda api_failures ignore
Error message from debugger back end:
Undefined set cuda command: "api_failures ignore". Try "help set cuda".
Undefined set cuda command: "api_failures ignore". Try "help set cuda".我使用ubuntu 12.10 64位,并使用optirun (大黄蜂)启动cuda可执行程序和nsight,因为我有一个GTX 675M (optimus)。我通过apt-get安装了cuda-gdb,我得到了4.2版本:
frederico@zeus:~/Dropbox/coisas/projetos/delta_cuda$ cuda-gdb --version
NVIDIA (R) CUDA Debugger
4.2 release
Portions Copyright (C) 2007-2012 NVIDIA Corporation
GNU gdb (GDB) 7.2我认为这不是问题,因为我可以单独使用它(没有nsight)。我将nsight更改为使用optirun启动cuda-gdb,但仍然收到相同的错误。
发布于 2012-10-21 08:16:34
问题出在cuda-gdb的版本上,我不得不使用cuda-gdb版本5。它附带了工具包版本5,只需对/usr/bin进行一下符号操作,它就可以工作了。
发布于 2013-10-26 16:08:14
这是可能的调试CUDA程序与nsight和大黄蜂。(nsight v.5.0.0,大黄蜂3.2.1,Debian sid)
您只需替换调试器命令行(CUDA GDB可执行文件):项目资源管理器->右键单击您的项目->选择"Debug as“->单击"Debug configurations...”->选择" debugger“选项卡
/usr/bin/opti-cuda-gdb:CUDA GDB Executable: CUDA(另一种可能是创建一个像下面这样的小shell脚本:CUDA)
#!/bin/bash
optirun --no-xorg /usr/bin/cuda-gdb $*这样,optirun不会为gdb启动虚拟屏幕,GPU不接受图形,调试也是可能的。
希望这能有所帮助!
发布于 2012-12-18 17:58:40
不需要创建此链接。
您可以在运行/调试配置中选择nsight使用的cuda-gdb可执行文件...菜单。在此菜单中,单击C/C++ Application下的应用程序,然后选择Debugger选项卡,您可以在其中浏览文件系统并设置cuda-gdb-5.0可执行文件的路径。
https://stackoverflow.com/questions/12991271
复制相似问题