使用仿真模式时出现 nvcc 错误
当尝试使用 Visual Studio 2008 从 NVIDIA GPU 计算 SDK 构建示例时,我收到以下奇怪的错误:
"C:\CUDA\bin\nvcc.exe" -arch sm_10 -ccbin "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin" -deviceemu -D_DEVICEEMU -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd " -I"C:\CUDA\include" -I"../../common/inc" -maxrregcount=32 --compile -o "Debug\matrixMul.cu.obj" "c:\Documents and Settings\All Users.SYSROOT\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\matrixMul\matrixMul.cu"
nvcc fatal : Could not open input file C:\DOCUME~1\Murali_Krishna05\Local Settings\Temp/tmpxft_000008cc_00000000-1
When trying to build an example from the NVIDIA GPU Computing SDK using Visual Studio 2008, I get this weird error:
"C:\CUDA\bin\nvcc.exe" -arch sm_10 -ccbin "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin" -deviceemu -D_DEVICEEMU -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd " -I"C:\CUDA\include" -I"../../common/inc" -maxrregcount=32 --compile -o "Debug\matrixMul.cu.obj" "c:\Documents and Settings\All Users.SYSROOT\Application Data\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\src\matrixMul\matrixMul.cu"
nvcc fatal : Could not open input file C:\DOCUME~1\Murali_Krishna05\Local Settings\Temp/tmpxft_000008cc_00000000-1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我通过将环境变量“TEMP=%USERPROFILE%\Local Settings\Temp”替换为“TEMP=%SystemRoot%\TEMP”解决了这个问题。
I solved it by replacing the environmental varialble "TEMP=%USERPROFILE%\Local Settings\Temp" by "TEMP=%SystemRoot%\TEMP".
这是NVIDIA VS2008 集成中已知的 老错误。我们必须执行以下所有 3 个步骤才能解决该问题。
设置 TEMP=%SystemRoot%\TEMP
设置 PATH=
以避免任何多余的引号"
(和危险!)。只需删除它们即可:各个目录之间用分号;
分隔,并且空格不是问题"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\ 中的第一对括号
和(
和)
vcvarsamd64.bat""C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
步骤 3 的示例:
替换
为
This is a known old bug in the NVIDIA VS2008 integration. We've had to do all of the following 3 steps to solve it.
set TEMP=%SystemRoot%\TEMP
set PATH=
to avoid any quotation marks"
which are anyway superfluous (and dangerous!). Just delete them: individual directories are separated by semicolon;
and spaces are not a problem(
and)
in"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat"
and"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
Example for step 3:
Replace
by