Hello, I'm a grad master student trying to compile DEM-E to then use it as 
a library in a C++ project.

After cloning the Github repository I tried generating the build 
environment using the CMake GUI but I get an error during the Configuration 
(I copied the whole thing in the .txt file attached).

It seems there is an incompatibility with my version of Visual Studio 2022 
(19.40.33811) and my version of CUDA (12.0.0) : #error: -- unsupported 
Microsoft Visual Studio version! Only the versions between 2017 and 2022 
(inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can 
be used to override this version check; however, using an unsupported host 
compiler may cause compilation failure or incorrect run time execution. Use 
at your own risk.
I tried adding the suggested flag in the CMakeLists but it didn't change 
anything. 

If someone has a suggestion as to what I can do to solve this issue I would 
be very grateful !

Also it might be worth noting that I'm trying to compile on Windows. I've 
read in past posts here that the compilation wasn't supported on Windows at 
the time, but it also seemed to be indicated in the README file back then, 
and I can't find this indication in the present one, so I assumed that this 
compilation issue on Windows was fixed but maybe I was wrong ?

Thank you for your help !
Victor

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/d9d5b75b-47a6-4f5b-9785-64193b26e9ean%40googlegroups.com.
Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
The CUDA compiler identification is NVIDIA 12.0.76
Detecting CUDA compiler ABI info
Detecting CUDA compiler ABI info - failed
Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing 
Toolkit/CUDA/v12.0/bin/nvcc.exe
Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing 
Toolkit/CUDA/v12.0/bin/nvcc.exe - broken
CMake Error at C:/Program 
Files/CMake/share/cmake-3.29/Modules/CMakeTestCUDACompiler.cmake:59 (message):
  The CUDA compiler

    "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.0/bin/nvcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: 
'C:/Users/vwelt/Desktop/DEM-Engine/build/CMakeFiles/CMakeScratch/TryCompile-0pdd4j'
    
    Run Build Command(s): "C:/Program Files/Microsoft Visual 
Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe" cmTC_a5db3.vcxproj 
/p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n
    Version MSBuild 17.10.4+10fbfbf2e pour .NET Framework

    La génération a démarré 27/06/2024 14:32:49.

    

    Projet 
"C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\cmTC_a5db3.vcxproj"
 sur le nœud 1 (cibles par défaut).

    PrepareForBuild:

      Création du répertoire "cmTC_a5db3.dir\Debug\".

      La sortie structurée est activée. La mise en forme du compilateur 
diagnostics reflète la hiérarchie des erreurs. Pour plus d’informations, 
consultez https://aka.ms/cpp/structured-output.

      Création du répertoire 
"C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\Debug\".

      Création du répertoire "cmTC_a5db3.dir\Debug\cmTC_a5db3.tlog\".

    InitializeBuildStatus:

      Création de "cmTC_a5db3.dir\Debug\cmTC_a5db3.tlog\unsuccessfulbuild", 
car "AlwaysCreate" a été spécifié.

      Mise à jour de l'horodatage 
"cmTC_a5db3.dir\Debug\cmTC_a5db3.tlog\unsuccessfulbuild".

    AddCudaCompileDeps:

      C:\Program Files\Microsoft Visual 
Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe /E 
/nologo /showIncludes /TP /D__CUDACC__ /D__CUDACC_VER_MAJOR__=12 
/D__CUDACC_VER_MINOR__=0 /D_WINDOWS /DCMAKE_INTDIR="Debug" /D_MBCS 
/DCMAKE_INTDIR="Debug" /I"C:\Program Files\NVIDIA GPU Computing 
Toolkit\CUDA\v12.0\bin" /I"C:\Program Files\NVIDIA GPU Computing 
Toolkit\CUDA\v12.0\include" /I. /FIcuda_runtime.h /c 
C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\main.cu
 

    Le projet 
"C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\cmTC_a5db3.vcxproj"
 (1) génère 
"C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\cmTC_a5db3.vcxproj"
 (1:2) sur le nœud 1 (CudaBuildCore cible(s)).

    CudaBuildCore:

      Compiling CUDA source file main.cu...

      cmd.exe /C 
"C:\Users\vwelt\AppData\Local\Temp\tmp2fa32165ece847ba8de8ce7545f2b211.cmd"

      "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\bin\nvcc.exe"  
--use-local-env -ccbin "C:\Program Files\Microsoft Visual 
Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64" -x cu    
-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\include"     
--keep-dir cmTC_a5db3\x64\Debug  -maxrregcount=0  --machine 64 --compile 
-cudart static --generate-code=arch=compute_52,code=[compute_52,sm_52] 
-Xcompiler="/EHsc -Zi -Ob0" -g  -D_WINDOWS -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS 
-D"CMAKE_INTDIR=\"Debug\"" -Xcompiler "/EHsc /W1 /nologo /Od 
/FdcmTC_a5db3.dir\Debug\vc143.pdb /FS /Zi /RTC1 /MDd /GR" -o 
cmTC_a5db3.dir\Debug\main.obj 
"C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\main.cu"

      

      
C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j>"C:\Program
 Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\bin\nvcc.exe"  --use-local-env 
-ccbin "C:\Program Files\Microsoft Visual 
Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64" -x cu    
-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\include"     
--keep-dir cmTC_a5db3\x64\Debug  -maxrregcount=0  --machine 64 --compile 
-cudart static --generate-code=arch=compute_52,code=[compute_52,sm_52] 
-Xcompiler="/EHsc -Zi -Ob0" -g  -D_WINDOWS -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS 
-D"CMAKE_INTDIR=\"Debug\"" -Xcompiler "/EHsc /W1 /nologo /Od 
/FdcmTC_a5db3.dir\Debug\vc143.pdb /FS /Zi /RTC1 /MDd /GR" -o 
cmTC_a5db3.dir\Debug\main.obj 
"C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\main.cu"
 

    C:\Program Files\NVIDIA GPU Computing 
Toolkit\CUDA\v12.0\include\crt/host_config.h(153): fatal error C1189: #error:  
-- unsupported Microsoft Visual Studio version! Only the versions between 2017 
and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' 
can be used to override this version check; however, using an unsupported host 
compiler may cause compilation failure or incorrect run time execution. Use at 
your own risk. 
[C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\cmTC_a5db3.vcxproj]

      main.cu

    C:\Program Files\Microsoft Visual 
Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 
12.0.targets(794,9): error MSB3721: La commande ""C:\Program Files\NVIDIA GPU 
Computing Toolkit\CUDA\v12.0\bin\nvcc.exe"  --use-local-env -ccbin "C:\Program 
Files\Microsoft Visual 
Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64" -x cu    
-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\include"     
--keep-dir cmTC_a5db3\x64\Debug  -maxrregcount=0  --machine 64 --compile 
-cudart static --generate-code=arch=compute_52,code=[compute_52,sm_52] 
-Xcompiler="/EHsc -Zi -Ob0" -g  -D_WINDOWS -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS 
-D"CMAKE_INTDIR=\"Debug\"" -Xcompiler "/EHsc /W1 /nologo /Od 
/FdcmTC_a5db3.dir\Debug\vc143.pdb /FS /Zi /RTC1 /MDd /GR" -o 
cmTC_a5db3.dir\Debug\main.obj 
"C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\main.cu""
 s'est arrêtée avec le code 2. 
[C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\cmTC_a5db3.vcxproj]

    Génération du projet 
"C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\cmTC_a5db3.vcxproj"
 terminée (CudaBuildCore cible(s)) -- ÉCHEC.

    Génération du projet 
"C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\cmTC_a5db3.vcxproj"
 terminée (cibles par défaut) -- ÉCHEC.

    

    ÉCHEC de la build.

    

    
"C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\cmTC_a5db3.vcxproj"
 (cible par défaut) (1) ->

    
"C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\cmTC_a5db3.vcxproj"
 (CudaBuildCore cible) (1:2) ->

    (CudaBuildCore cible) -> 

      C:\Program Files\NVIDIA GPU Computing 
Toolkit\CUDA\v12.0\include\crt/host_config.h(153): fatal error C1189: #error:  
-- unsupported Microsoft Visual Studio version! Only the versions between 2017 
and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' 
can be used to override this version check; however, using an unsupported host 
compiler may cause compilation failure or incorrect run time execution. Use at 
your own risk. 
[C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\cmTC_a5db3.vcxproj]

      C:\Program Files\Microsoft Visual 
Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations\CUDA 
12.0.targets(794,9): error MSB3721: La commande ""C:\Program Files\NVIDIA GPU 
Computing Toolkit\CUDA\v12.0\bin\nvcc.exe"  --use-local-env -ccbin "C:\Program 
Files\Microsoft Visual 
Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64" -x cu    
-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.0\include"     
--keep-dir cmTC_a5db3\x64\Debug  -maxrregcount=0  --machine 64 --compile 
-cudart static --generate-code=arch=compute_52,code=[compute_52,sm_52] 
-Xcompiler="/EHsc -Zi -Ob0" -g  -D_WINDOWS -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS 
-D"CMAKE_INTDIR=\"Debug\"" -Xcompiler "/EHsc /W1 /nologo /Od 
/FdcmTC_a5db3.dir\Debug\vc143.pdb /FS /Zi /RTC1 /MDd /GR" -o 
cmTC_a5db3.dir\Debug\main.obj 
"C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\main.cu""
 s'est arrêtée avec le code 2. 
[C:\Users\vwelt\Desktop\DEM-Engine\build\CMakeFiles\CMakeScratch\TryCompile-0pdd4j\cmTC_a5db3.vcxproj]

    

        0 Avertissement(s)

        2 Erreur(s)

    

    Temps écoulé 00:00:01.49

    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:17 (project)


Configuring incomplete, errors occurred!

Reply via email to