CUDA 4.2.工具箱VS2010 [英] CUDA 4.2. toolbox & VS2010

查看:23
本文介绍了CUDA 4.2.工具箱VS2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编译 Cuda SDK 示例,但我收到MSB3721 错误",因为nvcc"是以代码 1 退出".完整输出:

I am trying to compile Cuda SDK examples but I am getting "MSB3721 error" since "nvcc" is "exited with code 1". Complete output:

"C:Program 文件(x86)MSBuildMicrosoft.Cppv4.0BuildCustomizationsCUDA4.2.targets(361,9): error MSB3721: The command ""C:Program FilesNVIDIA GPU Computing ToolkitCUDAv4.2in vcc.exe"-gencode=arch=compute_10,code="sm_10,compute_10" -gencode=arch=compute_20,code="sm_20,compute_20" -gencode=arch=compute_30,code="sm_30,compute_30" --使用-local-env --cl-version 2010 -ccbin "C:Program Files (x86)Microsoft Visual Studio 10.0VCinx86_amd64" -I"./" -I"../../common/公司"-I"../../../shared/inc" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv4.2include" -G --keep-dir "x64Debug"-maxrregcount=0--machine 64 --compile -g -Xcompiler "/EHsc/nologo/Od/Zi/MTd " -o "x64/Debug/bandwidthTest.cu.obj" "C:ProgramDataNVIDIA公司NVIDIA GPU计算SDK4.2CsrcandwidthTestandwidthTest.cu"" 退出,代码为 1."

"C:Program Files (x86)MSBuildMicrosoft.Cppv4.0BuildCustomizationsCUDA 4.2.targets(361,9): error MSB3721: The command ""C:Program FilesNVIDIA GPU Computing ToolkitCUDAv4.2in vcc.exe" -gencode=arch=compute_10,code="sm_10,compute_10" -gencode=arch=compute_20,code="sm_20,compute_20" -gencode=arch=compute_30,code="sm_30,compute_30" --use-local-env --cl-version 2010 -ccbin "C:Program Files (x86)Microsoft Visual Studio 10.0VCinx86_amd64" -I"./" -I"../../common/inc" -I"../../../shared/inc" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv4.2include" -G --keep-dir "x64Debug" -maxrregcount=0 --machine 64 --compile -g -Xcompiler "/EHsc /nologo /Od /Zi /MTd " -o "x64/Debug/bandwidthTest.cu.obj" "C:ProgramDataNVIDIA CorporationNVIDIA GPU Computing SDK 4.2CsrcandwidthTestandwidthTest.cu"" exited with code 1."

Cuda toolkit 4.2 用于带有 VS2010 Ultimate 的 Win7 x64 Ultimate 系统.使用配置管理"中的win32"选项时,错误仍然存​​在.

Cuda toolkit 4.2 is used on Win7 x64 Ultimate system with VS2010 Ultimate. The error remains when the "win32" option in "Configuration management" is used.

有什么建议吗?

!!!!!!最后在构建新计算机(Z77 mobo + i7 + GTX550Ti)后重新安装Win7 + VS2010 + CUDA驱动程序超过10次后阅读所有可用的NVIDIA手册关于CUDA入门"后,等待数月后,我发现NVIDIA论坛复活当在我桌面上的 VS2010 快捷方式上选择以管理员身份运行"选项时,nvcc 构建错误以代码 1 退出"的问题消失了!!!!!!尽管我使用的是管理员帐户(PC 上的唯一帐户),但无法构建任何 CUDA 示例.可执行文件运行没有任何问题,但我无法使用 VS2010 构建源代码!

!!!!! Finally after reading all available NVIDIA manuals about "Getting started with CUDA" after reinstalling Win7+VS2010+CUDA drivers more than 10 times after building a new computer (Z77 mobo + i7 + GTX550Ti) and after waiting for months the NVIDIA forum resurrection I found out that the problem with the nvcc build error "exited with code 1" was disappeared when the "Run as administrator" option was selected on the VS2010 shortcut on my desktop!!!!!! Although I was using an administrator account (the only account on the PC) it was impossible to build any of the CUDA Examples. The executables were running without any problem but I couldn't build the source code using VS2010!

!!!!!!感谢大家的支持!!!!!!

!!!!!Thank you all for your support!!!!!

推荐答案

我会尝试从头开始.删除 CUDA、Nsight 和 Visual Studio.重启.手动删除可能留下的任何程序文件夹.我不能保证删除这些是安全的,但如果任何其他 NVIDIA 或 Microsoft 产品因此而损坏,我会在修复 CUDA 后修复它们:

I would try to start from scratch. Remove CUDA, Nsight, and Visual Studio. Reboot. Manually remove any program folders that might be left. I can't guarantee that it's safe to remove these, but if any other NVIDIA or Microsoft products break because of this, I'd just fix those after having fixed CUDA:

C:Program Files (x86)Microsoft Visual Studio 10.0
C:Program Files (x86)Microsoft Visual Studio 9.0
C:Program Files (x86)NVIDIA Parallel Nsight 2.1
C:Program Files (x86)NVIDIA Parallel Nsight Monitor 2.1
C:Program FilesMicrosoft Visual Studio 10.0
C:Program FilesNVIDIA GPU Computing Toolkit

手动删除任何剩余的应用数据文件夹:

Manually remove any left over app data folders:

C:Users<your user folder>AppDataRoamingNVIDIA
C:Users<your user folder>AppDataRoamingNVIDIA Corporation

您可能还想查找注册表项.

You might want to look for registry keys as well.

然后重新安装所有内容.Nsight 带有 CUDA,所以我先安装 VS,然后再安装 Nsight.这应该是所有需要的.然后,从头开始创建一个 CUDA 项目.

Then reinstall everything. Nsight comes with CUDA, so I'd first install VS then Nsight. That should be all that is required. Then, create a CUDA project from scratch.

这篇关于CUDA 4.2.工具箱VS2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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