I have just installed the CUDA Toolkit 9.1 on my Windows machine.
Also, I have the latest version of Visual Studio installed.
I did build the deviceQuery_vs2017.sln
in Visual Studio 2017 in Release mode and everything went fine. The .exe is where it is supposed to be. The output makes sense.
My question is: why can’t I build other solutions in VS 2017?
For instance, when I try to build nbody_vs2017.sln
or bandwidthTest_vs2017.sln
I get the following error (reported only for nbody):
1>------ Build started: Project: nbody, Configuration: Release x64 ------
1>Compiling CUDA source file bodysystemcuda.cu...
1>
1>C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1_Simulations\nbody>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\bin\nvcc.exe" -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" -gencode=arch=compute_37,code=\"sm_37,compute_37\" -gencode=arch=compute_50,code=\"sm_50,compute_50\" -gencode=arch=compute_52,code=\"sm_52,compute_52\" -gencode=arch=compute_60,code=\"sm_60,compute_60\" -gencode=arch=compute_61,code=\"sm_61,compute_61\" -gencode=arch=compute_70,code=\"sm_70,compute_70\" --use-local-env --cl-version 2017 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio017\Community\VC\Tools\MSVC4.13.26128\bin\HostX86\x64" -x cu -I./ -I../../common/inc -I./ -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\/include" -I../../common/inc -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -Xcompiler "/wd 4819" -DWIN32 -DWIN32 -D_MBCS -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /FS /Zi /MT " -o x64/Release/bodysystemcuda.cu.obj "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1_Simulations\nbody\bodysystemcuda.cu"
1>c:\program files\nvidia gpu computing toolkit\cuda\v9.1\include\crt/host_config.h(135): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported!
1>bodysystemcuda.cu
1>C:\Program Files (x86)\Microsoft Visual Studio017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations\CUDA 9.1.targets(707,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\bin\nvcc.exe" -gencode=arch=compute_30,code=\"sm_30,compute_30\" -gencode=arch=compute_35,code=\"sm_35,compute_35\" -gencode=arch=compute_37,code=\"sm_37,compute_37\" -gencode=arch=compute_50,code=\"sm_50,compute_50\" -gencode=arch=compute_52,code=\"sm_52,compute_52\" -gencode=arch=compute_60,code=\"sm_60,compute_60\" -gencode=arch=compute_61,code=\"sm_61,compute_61\" -gencode=arch=compute_70,code=\"sm_70,compute_70\" --use-local-env --cl-version 2017 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio017\Community\VC\Tools\MSVC4.13.26128\bin\HostX86\x64" -x cu -I./ -I../../common/inc -I./ -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\/include" -I../../common/inc -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.1\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -Xcompiler "/wd 4819" -DWIN32 -DWIN32 -D_MBCS -D_MBCS -Xcompiler "/EHsc /W3 /nologo /O2 /FS /Zi /MT " -o x64/Release/bodysystemcuda.cu.obj "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.1_Simulations\nbody\bodysystemcuda.cu"" exited with code 2.
1>Done building project "nbody_vs2017.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Everything works fine when I build the vs2015 solution.
I’ve just read below that others have the same problem. It’s been quiet some time since it has been reported. I would like to know whether anyone is working on this, or we should not expect to be considered.