I have been trying to install ROOT with CUDA support. I have also looked at some similar issues in the forum where I tried upgrading cmake to a newer version.
Here is the error I get:
[xola@wolf root-6.18.04-build]$ sudo cmake ../root-6.18.04/ -Dmathore=ON -Dcuda=ON -DCMAKE_INSTALL_PREFIX=/opt/root/root-6.18.04-install/ -DCMAKE_CUDA_HOST_COMPILER=/usr/local/cuda-10.0/bin/nvcc
[sudo] password for xola:
-- ROOT default compression algorithm: zlib
-- Found GCC. Major version 4, minor version 8
-- Found a 64bit system
-- Found GNU compiler collection
-- ROOT Platform: linux
-- ROOT Architecture: linuxx8664gcc
-- Build Type: RelWithDebInfo
-- Compiler Flags: -std=c++11 -pipe -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread
-- Looking for ZLib
-- Looking for Freetype
-- Looking for PCRE
-- Building LZMA version 5.2.4 included in ROOT itself
-- Looking for X11
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Looking for python
-- Looking for OpenGL
-- The CUDA compiler identification is unknown
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:1335 (enable_language):
No CMAKE_CUDA_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CUDACXX" or the CMake cache entry CMAKE_CUDA_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
CMakeLists.txt:159 (include)
-- Configuring incomplete, errors occurred!
See also "/opt/root/root-6.18.04-build/CMakeFiles/CMakeOutput.log".
See also "/opt/root/root-6.18.04-build/CMakeFiles/CMakeError.log".
Let me just put this here incase I get asked about it:
When i do mvcc --version I get:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130
Are you sure the compiler, nvcc is in your path ?
Have you tried doing what make suggested ? Defining for example CUDACXX ?
I would need to se you cmake output log and error to understand it better what is happening
Looking at the error log seems that the CUDA compiler is not found. Something wring with the PATH definition when running CMake,
you see this line in CMakeError.txt
Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" failed.
Compiler: CMAKE_CUDA_COMPILER-NOTFOUND
Build flags:
Id flags: -v;--keep;--keep-dir;tmp
and it should be something like:
Compiling the CUDA compiler identification source file "CMakeCUDACompilerId.cu" succeeded.
Compiler: /usr/local/cuda/bin/nvcc
Build flags:
Id flags: -v;--keep;--keep-dir;tmp
Have you tried to run a simple program with nvcc ? Is the Cuda installation correct and working ?