你在make命令行加以下参数试试:
-arch sm_11
PS:你这妹子也太牛了吧?
让大神见笑了。。弄不出来很捉急啊~~ 话说我像下图里这样设置可以等同于您说的吗?我第一听说make这个东东,搜了一圈发现一般多用于Linux和Unix系统,因为我这个是Windows系统下的vs,我没看懂Windows的vs里怎样设置~ 下图中我把GPU architecture 都改成sm_11,等同于设置-arch sm_11吗?
还有我按照图中设置完,编译后还是现实原子函数未定义。5555~~~~ 怎么办呀,求大神支招。
@Hobbit:
可以把Build Log贴上来看看吗?
@XiaoFaye:
build log如下:
生成日志 |
生成 已启动: 项目: simpleMultiGPU,配置: Debug|Win32 |
命令行 |
正在创建临时文件“c:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\0_Simple\王相入\归约相加 (线程通信)\Debug\BAT0000011884819348.bat”,其内容为 [ @echo off echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\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\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --machine 32 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin" -DWIN32 -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd " -I"./" -I"../../common/inc" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" -maxrregcount=0 --compile -o "Debug/simpleMultiGPU.cu.obj" simpleMultiGPU.cu -Xcompiler "/wd 4819" cd "Debug" findstr /L /I "\"Debug/simpleMultiGPU.cu.obj\"" "simpleMultiGPU.device-link.options" >nul 2>&1 IF ERRORLEVEL 1 echo "Debug/simpleMultiGPU.cu.obj">> "simpleMultiGPU.device-link.options" cd "c:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\0_Simple\王相入\归约相加 (线程通信)\" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\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\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --machine 32 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin" -DWIN32 -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd " -I"./" -I"../../common/inc" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" -maxrregcount=0 --compile -o "Debug/simpleMultiGPU.cu.obj" "c:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\0_Simple\王相入\归约相加 (线程通信)\simpleMultiGPU.cu" -Xcompiler "/wd 4819" if errorlevel 1 goto VCReportError goto VCEnd :VCReportError echo Project : error PRJ0019: 某个工具从以下位置返回了错误代码: "Compiling with CUDA Build Rule..." exit 1 :VCEnd ] 正在创建命令行“""c:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\0_Simple\王相入\归约相加 (线程通信)\Debug\BAT0000011884819348.bat""” |
输出窗口 |
Compiling with CUDA Build Rule... "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\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\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --machine 32 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin" -DWIN32 -Xcompiler "/EHsc /W3 /nologo /Od /Zi /MTd " -I"./" -I"../../common/inc" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.5\include" -maxrregcount=0 --compile -o "Debug/simpleMultiGPU.cu.obj" simpleMultiGPU.cu -Xcompiler "/wd 4819" simpleMultiGPU.cu simpleMultiGPU.cu c:/ProgramData/NVIDIA Corporation/CUDA Samples/v5.5/0_Simple/王相入/归约相加 (线程通信)/simpleMultiGPU.cu(136): error: identifier "atomicInc" is undefined 1 error detected in the compilation of "C:/Users/ADMINI~1/AppData/Local/Temp/tmpxft_00004bc8_00000000-20_simpleMultiGPU.compute_10.cpp1.ii". Project : error PRJ0019: 某个工具从以下位置返回了错误代码: "Compiling with CUDA Build Rule..." |
结果 |
生成日志保存在“file://c:\ProgramData\NVIDIA Corporation\CUDA Samples\v5.5\0_Simple\王相入\归约相加 (线程通信)\Debug\BuildLog.htm” simpleMultiGPU - 2 个错误,0 个警告 |
@Hobbit:
你看看这里吧:
http://stackoverflow.com/search?q=%5Bcuda%5D+PRJ0019