NVIDIA / gvdb-voxels

Sparse volume compute and rendering on NVIDIA GPUs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CMake Error: No CUDA toolset found.

inhahe opened this issue · comments

Maybe this is a problem on my end, I'm not expert enough to know, but I've installed other CUDA projects and cmake was able to find CUDA. Here's the full error:


:\gvdb>cmake CMakeLists.txt
CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineCompilerId.cmake:367 (message):
No CUDA toolset found.
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID)
source/gvdb_library/CMakeLists.txt:10 (project)

-- Configuring incomplete, errors occurred!
See also "C:/gvdb/CMakeFiles/CMakeOutput.log".


Here's CMakeOutput.log:


The system is: Windows - 10.0.18362 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler:
Build flags:
Id flags:

The output was:
0
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 5/30/2020 3:08:09 AM.
Project "C:\gvdb\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug".
Creating directory "Debug\CompilerIdC.tlog".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:classic /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\" /Fd"Debug\vc141.pdb" /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X64 Debug\CMakeCCompilerId.obj
CompilerIdC.vcxproj -> C:\gvdb\CMakeFiles\3.17.2\CompilerIdC.\CompilerIdC.exe
PostBuildEvent:
for %%i in (cl.exe) do @echo CMAKE_C_COMPILER=%%~$PATH:i
:VCEnd
CMAKE_C_COMPILER=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\cl.exe
FinalizeBuildStatus:
Deleting file "Debug\CompilerIdC.tlog\unsuccessfulbuild".
Touching "Debug\CompilerIdC.tlog\CompilerIdC.lastbuildstate".
Done Building Project "C:\gvdb\CMakeFiles\3.17.2\CompilerIdC\CompilerIdC.vcxproj" (default targets).

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:01.22

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.exe"

Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CompilerIdC.vcxproj"

The C compiler identification is MSVC, found in "C:/gvdb/CMakeFiles/3.17.2/CompilerIdC/CompilerIdC.exe"

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
Compiler:
Build flags:
Id flags:

The output was:
0
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 5/30/2020 3:08:11 AM.
Project "C:\gvdb\CMakeFiles\3.17.2\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug".
Creating directory "Debug\CompilerIdCXX.tlog".
InitializeBuildStatus:
Creating "Debug\CompilerIdCXX.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:classic /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\" /Fd"Debug\vc141.pdb" /Gd /TP /FC /errorReport:queue CMakeCXXCompilerId.cpp
CMakeCXXCompilerId.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCXX.lib" /MACHINE:X64 Debug\CMakeCXXCompilerId.obj
CompilerIdCXX.vcxproj -> C:\gvdb\CMakeFiles\3.17.2\CompilerIdCXX.\CompilerIdCXX.exe
PostBuildEvent:
for %%i in (cl.exe) do @echo CMAKE_CXX_COMPILER=%%~$PATH:i
:VCEnd
CMAKE_CXX_COMPILER=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64\cl.exe
FinalizeBuildStatus:
Deleting file "Debug\CompilerIdCXX.tlog\unsuccessfulbuild".
Touching "Debug\CompilerIdCXX.tlog\CompilerIdCXX.lastbuildstate".
Done Building Project "C:\gvdb\CMakeFiles\3.17.2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets).

Build succeeded.
0 Warning(s)
0 Error(s)

Time Elapsed 00:00:00.61

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.exe"

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CompilerIdCXX.vcxproj"

The CXX compiler identification is MSVC, found in "C:/gvdb/CMakeFiles/3.17.2/CompilerIdCXX/CompilerIdCXX.exe"

Determining if the C compiler works passed with the following output:
Change Dir: C:/gvdb/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/MSBuild/15.0/Bin/MSBuild.exe cmTC_95f2c.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27040 for x64

Copyright (C) Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_95f2c.dir\Debug\" /Fd"cmTC_95f2c.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue C:\gvdb\CMakeFiles\CMakeTmp\testCCompiler.c

testCCompiler.c

cmTC_95f2c.vcxproj -> C:\gvdb\CMakeFiles\CMakeTmp\Debug\cmTC_95f2c.exe

Detecting C compiler ABI info compiled with the following output:
Change Dir: C:/gvdb/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/MSBuild/15.0/Bin/MSBuild.exe cmTC_8f9d0.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27040 for x64

Copyright (C) Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_8f9d0.dir\Debug\" /Fd"cmTC_8f9d0.dir\Debug\vc141.pdb" /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.17\Modules\CMakeCCompilerABI.c"

CMakeCCompilerABI.c

cmTC_8f9d0.vcxproj -> C:\gvdb\CMakeFiles\CMakeTmp\Debug\cmTC_8f9d0.exe

Determining if the CXX compiler works passed with the following output:
Change Dir: C:/gvdb/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/MSBuild/15.0/Bin/MSBuild.exe cmTC_ead57.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27040 for x64

Copyright (C) Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_ead57.dir\Debug\" /Fd"cmTC_ead57.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue C:\gvdb\CMakeFiles\CMakeTmp\testCXXCompiler.cxx

testCXXCompiler.cxx

cmTC_ead57.vcxproj -> C:\gvdb\CMakeFiles\CMakeTmp\Debug\cmTC_ead57.exe

Detecting CXX compiler ABI info compiled with the following output:
Change Dir: C:/gvdb/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/MSBuild/15.0/Bin/MSBuild.exe cmTC_40517.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework

Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27040 for x64

Copyright (C) Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /diagnostics:classic /Od /Ob0 /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_40517.dir\Debug\" /Fd"cmTC_40517.dir\Debug\vc141.pdb" /Gd /TP /errorReport:queue "C:\Program Files\CMake\share\cmake-3.17\Modules\CMakeCXXCompilerABI.cpp"

CMakeCXXCompilerABI.cpp

cmTC_40517.vcxproj -> C:\gvdb\CMakeFiles\CMakeTmp\Debug\cmTC_40517.exe


I have the following CUDA versions installed:

Directory of C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA

05/28/2020 08:57 PM

.
05/28/2020 08:57 PM ..
05/12/2020 08:27 PM v10.1
05/12/2020 06:04 PM v10.2
05/24/2020 04:54 AM v7.0
05/26/2020 06:34 PM v7.5
05/28/2020 08:58 PM v8.0
05/23/2020 11:31 PM v9.1

Hmm, I'm wondering if maybe the older versions of CUDA are tripping up CMake somehow.
Just out of curiosity, if you create a new CMakeLists.txt file in an empty folder containing only the following three lines (which are hopefully the essential parts of the GVDB CMake script for the top-level file that builds everything), does CMake have a similar error when configuring?

cmake_minimum_required(VERSION 3.10)
project(gvdb_all)
project(gvdb LANGUAGES CUDA CXX C)

Here's what this prints out on my machine with 10.2 installed, generating with Visual Studio 2017 - I'll hopefully see if I can install the other versions shortly and see if I can reproduce this error, although there could be other things going on:

[...]\cmake_build>cmake .. -G "Visual Studio 15 2017 Win64"
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
-- The C compiler identification is MSVC 19.16.27039.0
-- The CXX compiler identification is MSVC 19.16.27039.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is NVIDIA 10.2.89
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/bin/nvcc.exe
-- Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/bin/nvcc.exe -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/techi/Documents/GitHub/gvdb-cmake-test/cmake_build

It's also interesting to note that looking at the CMakeOutput.log generated here, the section where it compiles CUDA code should start just after the end of the text you posted, and should start off like this:

Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" succeeded.
Compiler:  
Build flags: 
Id flags:  -v;--keep;--keep-dir;tmp

The output was:
0
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Hmm, I installed CMake 3.17.2 and all of the listed CUDA versions in order of modification on your system, but it looks like CMake still manages to find CUDA 10.2 on my system on both the test script above and GVDB's top-level CMakeLists. If the CMake script above fails as well, maybe it would make sense to try reinstalling CUDA 10.2 and/or CMake?

Ah, that's fantastic to hear!

For OptiX, we have that documented, although there's probably not enough emphasis on it - you'll need to install OptiX 6.5, as we haven't ported the samples to use OptiX 7 yet (which includes some major API improvements, but is also relatively different from OptiX 6). (FYI, porting the samples to OptiX 7 is a thing I'm actively looking at, but the samples will continue to use OptiX 6 for a while. Luckily, GVDB itself shouldn't depend on the version of OptiX you're using - only the GVDB OptiX samples do.)

In particular, I think OptiX 7 also changed the naming scheme for files, which is why the CMake files for the OptiX samples require version 6.5.

Ah, yep, this is a bug! I should have just fixed it, if you pull the latest version of the repository (or implement the changes in this commit: 40dd71e). This should allow you to specify the OptiX directory by setting OPTIX_ROOT_DIR to the OptiX directory - it'll now determine the version number automatically when you do that. It'll also look for versions < 7.0 (due to sample compatibility) now, so you hopefully won't have to specify OPTIX_ROOT_DIR. Another fix (that you can do without having to pull the repository again) would be to set OPTIX_VERSION to "6.5.0" as well.

Hi inhahe - is it OK if I close this issue if the build works with OptiX 6.5 for you? I should be looking into porting some of the samples to OptiX 7 soon.

Closing, since I think this has been fixed by the commit in the penultimate comment more than a month ago. Please let me know if this is still producing an error, and re-open the issue!