Please read tips for efficient and successful posting and posting code
ROOT Version: 6.27.01
Platform: linuxx8664gcc
Compiler: gcc11.2.0
CUDA Version: 11.7
I am trying to compile the aforementioned ROOT version on my rig that has the following specs:
CPU: 12th Gen Intel i9-12900F (24) @ 5.100GHz
GPU: NVIDIA GeForce RTX 3090 (24GB)
The nvidia-smi
output is:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 515.48.07 Driver Version: 515.48.07 CUDA Version: 11.7 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| 30% 28C P8 13W / 350W | 181MiB / 24576MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
My cmake flags are:
CC=/usr/bin/gcc-11 CXX=/usr/bin/g++-11 CUDACXX=/usr/local/cuda-11/bin/nvcc cmake -DCMAKE_CXX_STANDARD=17 -DPython3_EXECUTABLE=/usr/bin/python3 -Dimt=ON -Dcuda=ON -Droofit=ON -Dminuit2=ON -Dgvis=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda-11.7/bin/nvcc DCMAKE_CUDA_RUNTIME_LIBRARY=/usr/local/cuda-11/lib64 -DCMAKE_CUDA_STANDARD=14 -Dtmva-pymva=On -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/root ..
However, I am facing an error that I am unable to resolve in the make step make -j$(nproc)
:
In file included from /usr/local/root/tmva/tmva/src/DNN/Architectures/Cuda.cu:19:
/usr/local/root/compile/ginclude/RConfigure.h:30:4: warning: #warning "The C++ standard in this build does not match ROOT configuration (201703L); this might cause unexpected issues" [-Wcpp]
30 | # warning "The C++ standard in this build does not match ROOT configuration (201703L); this might cause unexpected issues"
| ^~~~~~~
[ 95%] Building CXX object tmva/tmva/CMakeFiles/TMVA.dir/src/DNN/Architectures/Cuda/CudaBuffers.cxx.o
In file included from /usr/local/root/tmva/tmva/src/DNN/Architectures/Cuda.cu:27:
/usr/local/root/tmva/tmva/inc/TMVA/DNN/Architectures/Cuda.h:28:10: fatal error: /usr/local/cuda-11.7/bin/../targets/x86_64-linux/include/cuda.h: Too many levels of symbolic links
28 | #include "cuda.h"
I had to enable c++ std-17 as root7 complains otherwise and doesn’t accept std-11 or std-14. I tried a few other cmake flag variations, but they don’t seem to work as well. I have all the primarily recommended Ubuntu packages installed for root installation.
Here’s the cmake log:
sammy@gpurig2:/usr/local/root/compile$ CC=/usr/bin/gcc-11 CXX=/usr/bin/g++-11 CUDACXX=/usr/local/cuda-11/bin/nvcc cmake -DCMAKE_CXX_STANDARD=17 -DPython3_EXECUTABLE=/usr/bin/python3 -Dimt=ON -Dcuda=ON -Droofit=ON -Dminuit2=ON -Dgvis=ON -DCMAKE_CUDA_COMPILER=/usr/local/cuda-11.7/bin/nvcc DCMAKE_CUDA_RUNTIME_LIBRARY=/usr/local/cuda-11/lib64 -DCMAKE_CUDA_STANDARD=14 -Dtmva-pymva=On -DCMAKE_INSTALL_PREFIX:PATH=/usr/local/root ..
-- Detected ROOT_VERSION 6.27.01
-- Checking internet connectivity...
-- Yes
-- Looking for Python
-- Could NOT find Python2 (missing: Python2_EXECUTABLE Python2_INCLUDE_DIRS Python2_LIBRARIES Python2_NumPy_INCLUDE_DIRS Interpreter Development NumPy Development.Module Development.Embed)
-- Found GCC. Major version 11, minor version 2
-- ROOT Platform: linux
-- ROOT Compiler: GNU 11.2.0
-- ROOT Processor: x86_64
-- ROOT Architecture: linuxx8664gcc
-- Build Type: 'Release' (flags = '-O3 -DNDEBUG')
-- Compiler Flags: -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG
-- ROOT default compression algorithm: zlib
-- PyROOT will be built for version 3.10.4
-- Looking for ZLib
-- Looking for Freetype
-- Looking for PCRE
-- Building LZMA version 5.2.4 included in ROOT itself
-- Looking for ZSTD
-- 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 OpenGL
-- Looking for LibXml2
-- Looking for MySQL
-- Looking for FFTW3
-- Downloading and building XROOTD version 5.4.3
-- Looking for TBB
-- Looking for BLAS for optional parts of TMVA
-- Building LLVM in 'Release' mode.
-- Could NOT find Z3: Found unsuitable version "0.0.0", but required is at least "4.7.1" (found Z3_LIBRARIES-NOTFOUND)
-- Native target architecture is X86
-- Threads disabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-unknown-linux-gnu
-- LLVM default target triple: x86_64-unknown-linux-gnu
-- Building with -fPIC
-- Constructing LLVMBuild project information
-- Linker detection: GNU ld
-- Targeting X86
-- Targeting NVPTX
-- Clang version: 9.0.1
-- Cling version (from VERSION file): ROOT_1.0~dev
-- Cling will look for C++ headers in '/usr/include/c++/11:/usr/include/x86_64-linux-gnu/c++/11:/usr/include/c++/11/backward' at runtime.
-- And then fallback to: 'x86_64-linux-gnu-g++-11'
-- Use SSL API VERSION 3.0 for civetweb
-- cuDNN not found or disabled - use only Cuda+Cublas for TMVA Deep Learning on GPU
-- Performing Test found_stdstringview
-- Performing Test found_stdstringview - Success
/tmp/tmpxft_000808b1_00000000-1_stdin: In function 'int main()':
/tmp/tmpxft_000808b1_00000000-1_stdin:2:50: error: 'string_view' is not a member of 'std'
2 | int main() { char arr[3] = {'B', 'a', 'r'}; std::string_view strv(arr, sizeof(arr)); return 0;}
| ^~~~~~~~~~~
/tmp/tmpxft_000808b1_00000000-1_stdin:2:50: note: 'std::string_view' is only available from C++17 onwards
-- Performing Test found_stod_stringview
-- Performing Test found_stod_stringview - Failed
-- Performing Test found_stdapply
-- Performing Test found_stdapply - Success
-- Performing Test found_stdinvoke
-- Performing Test found_stdinvoke - Success
-- Performing Test found_stdindexsequence
-- Performing Test found_stdindexsequence - Success
-- ROOT Configuration
System Linux-5.17.5-76051705-generic
Processor 16 core 12th Gen Intel(R) Core(TM) i9-12900F (x86_64)
Build type Release
Install path /usr/local/root
Compiler GNU 11.2.0
Compiler flags:
C -Wno-implicit-fallthrough -pipe -Wall -W -pthread -O3 -DNDEBUG
C++ -std=c++17 -Wno-implicit-fallthrough -Wno-noexcept-type -pipe -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG
Linker flags:
Executable -rdynamic
Module
Shared -Wl,--no-undefined -Wl,--hash-style="both"
-- Enabled support for: asimage builtin_afterimage builtin_clang builtin_cling builtin_gl2ps builtin_glew builtin_llvm builtin_lz4 builtin_lzma builtin_nlohmannjson builtin_openui5 builtin_vdt builtin_xrootd builtin_xxhash clad cuda dataframe exceptions fftw3 gdml http imt mathmore mlp minuit2 mysql opengl pyroot roofit webgui root7 rpath runtime_cxxmodules shared ssl tmva tmva-cpu tmva-gpu tmva-pymva spectrum vdt x11 xml xrootd
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/root/compile
Any leads on resolving this error is appreciated.
Thanks!