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

查看:714
本文介绍了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)\MSBuild\Microsoft.Cpp\v4 .0 \BuildCustomizations \CUDA
4.2.targets(361,9):错误MSB3721:命令C:\Program Files \ NVIDIA GPU计算工具包\CUDA \v4.2 \ bin \\\
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 -ccbinC:\Program Files(x86)\Microsoft Visual Studio 10.0 \VC\\ \\ bin \x86_amd64-I./-I../../ common / inc
-I../../../ shared / inc-IC: \Program Files\ NVIDIA GPU计算工具包\CUDA \v4.2 \include-G --keep-dirx64 \Debug-maxrregcount = 0
--machine 64 --compile -g -Xcompiler/ EHsc / nologo / Od / Zi / MTd-ox64 / Debug / bandwidthTest.cu.objC:\ProgramData\NVIDIA
公司\ NVIDIA GPU计算SDK
4.2\C\src\bandwidthTest\bandwidthTest.cu以代码1退出。

"C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\BuildCustomizations\CUDA 4.2.targets(361,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\nvcc.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.0\VC\bin\x86_amd64" -I"./" -I"../../common/inc" -I"../../../shared/inc" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.2\include" -G --keep-dir "x64\Debug" -maxrregcount=0 --machine 64 --compile -g -Xcompiler "/EHsc /nologo /Od /Zi /MTd " -o "x64/Debug/bandwidthTest.cu.obj" "C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 4.2\C\src\bandwidthTest\bandwidthTest.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 Files\Microsoft Visual Studio 10.0
C:\Program Files\NVIDIA GPU Computing Toolkit

手动移除应用程式数据文件夹:

Manually remove any left over app data folders:

C:\Users\<your user folder>\AppData\Roaming\NVIDIA
C:\Users\<your user folder>\AppData\Roaming\NVIDIA 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。工具箱&amp; VS2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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