getkeops / keops

KErnel OPerationS, on CPUs and GPUs, with autodiff and without memory overflows
https://www.kernel-operations.io
MIT License
1.04k stars 64 forks source link

cmake/configuration errors #198

Closed CharlesJQuarra closed 2 years ago

CharlesJQuarra commented 2 years ago

hello, I'm getting this error while running cmake command:

keops/keops/build$ CC=/usr/bin/gcc-9 CXX=/usr/bin/g++-9 cmake ..
-- Lock building directory: /home/charlesq/Projects/keops/keops/build
-- The CUDA Host CXX Compiler: /usr/bin/c++
CMake Error at /usr/share/cmake-3.20/Modules/CMakeDetermineCompilerId.cmake:676 (message):
  Compiling the CUDA compiler identification source file
  "CMakeCUDACompilerId.cu" failed.

  Compiler: /usr/bin/nvcc

  Build flags:

  Id flags: --keep;--keep-dir;tmp;-ccbin=/usr/bin/c++ -v

  The output was:

  1

  #$ _SPACE_=

  #$ _CUDART_=cudart

  #$ _HERE_=/usr/lib/nvidia-cuda-toolkit/bin

  #$ _THERE_=/usr/lib/nvidia-cuda-toolkit/bin

  #$ _TARGET_SIZE_=

  #$ _TARGET_DIR_=

  #$ _TARGET_SIZE_=64

  #$ NVVMIR_LIBRARY_DIR=/usr/lib/nvidia-cuda-toolkit/libdevice

  #$
  PATH=/usr/lib/nvidia-cuda-toolkit/bin:/home/charlesq/.poetry/bin:/usr/lib/jvm/java-8-openjdk-amd64/bin:/home/charlesq/Android/Sdk/emulator:/home/charlesq/Android/Sdk/tools:/home/charlesq/Android/Sdk/platform-tools:/home/charlesq/.nvm/versions/node/v10.23.1/bin:/home/charlesq/anaconda3/bin:/home/charlesq/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/cuda/bin:/usr/lib/cuda/bin

  #$ LIBRARIES= -L/usr/lib/x86_64-linux-gnu/stubs -L/usr/lib/x86_64-linux-gnu

  #$ rm tmp/a_dlink.reg.c

  #$ "/usr/bin"/c++ -D__CUDA_ARCH__=300 -E -x c++
  -DCUDA_DOUBLE_MATH_FUNCTIONS -D__CUDACC__ -D__NVCC__
  -D__CUDACC_VER_MAJOR__=10 -D__CUDACC_VER_MINOR__=1
  -D__CUDACC_VER_BUILD__=243 -include "cuda_runtime.h" -m64
  "CMakeCUDACompilerId.cu" > "tmp/CMakeCUDACompilerId.cpp1.ii"

  In file included from /usr/include/cuda_runtime.h:83,

                   from <command-line>:

  /usr/include/crt/host_config.h:138:2: error: #error -- unsupported GNU
  version! gcc versions later than 8 are not supported!

    138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
        |  ^~~~~

  # --error 0x1 --

Can you provide some build instructions? I am only interested in using through the c++ API

build environment: Ubuntu 20-04, CUDA-10.2

joanglaunes commented 2 years ago

Hello @CharlesJQuarra , The error message comes from Cuda : version 10.2 of Cuda accepts only gcc version up to 8, not later versions. I think you need to use gcc 8 or update Cuda.

jeanfeydy commented 2 years ago

I close this configuration issue for inactivity, please feel free to re-open it if needed :-)