Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC and CUDA versions mentioned in INSTALL.md #82

Open
rileyjmurray opened this issue Sep 10, 2024 · 0 comments
Open

GCC and CUDA versions mentioned in INSTALL.md #82

rileyjmurray opened this issue Sep 10, 2024 · 0 comments

Comments

@rileyjmurray
Copy link
Contributor

Installation docs say that to build with GPU support we should use CUDA 12.4.1 and GCC 13.1.0.

https://github.com/BallisticLA/RandLAPACK/blob/adea3e6e1c0be31b50f2cf44fa5c850b3df58311/INSTALL.md?plain=1#L17–19

My machine has CUDA 12.2.1 and GCC 13.2.0. This combination raised an error.

(base) [rjmurr@hopper2 RandLAPACK-build]$ cmake -DCMAKE_BUILD_TYPE=Release -Dlapackpp_DIR=`pwd`/../lapackpp-install/lib64/cmake/lapackpp -Dblaspp_DIR=`pwd`/../blaspp-install/lib64/cmake/blaspp -DRandom123_DIR=`pwd`/../Random123-install/include -DCMAKE_BINARY_DIR=`pwd` -DCMAKE_INSTALL_PREFIX=`pwd`/../RandLAPACK-install -DRequireCUDA=ON ../RandLAPACK
-- The CXX compiler identification is GNU 13.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/gcc-13.2.0-mivndfyemp5ot6e5pbzheruhd2fodkhn/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CUDAToolkit: /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/include (found version "12.2.128") 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- CUDA found! Enabling CUDA support.
CMake Error at /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cmake-3.27.7-oneigrlumyhz7ic3fjrfmw7dho2rja6j/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:753 (message):
  Compiling the CUDA compiler identification source file
  "CMakeCUDACompilerId.cu" failed.

  Compiler:
  /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin/nvcc


  Build flags:

  Id flags: --keep;--keep-dir;tmp -v



  The output was:

  1

  #$ _NVVM_BRANCH_=nvvm

  #$ _SPACE_=

  #$ _CUDART_=cudart

  #$
  _HERE_=/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin


  #$
  _THERE_=/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin


  #$ _TARGET_SIZE_=

  #$ _TARGET_DIR_=

  #$ _TARGET_DIR_=targets/x86_64-linux

  #$
  TOP=/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin/..


  #$
  NVVMIR_LIBRARY_DIR=/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin/../nvvm/libdevice


  #$
  LD_LIBRARY_PATH=/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin/../lib:/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/intel-oneapi-mkl-2023.2.0-egymswy777yycnfsult6ama6d52sau47/mkl/2023.2.0/lib/intel64:/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/intel-oneapi-tbb-2021.10.0-xjzbxhg337haq775ff7rxcg63ns7j37o/tbb/2021.10.0/env/../lib/intel64/gcc4.8


  #$
  PATH=/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin/../nvvm/bin:/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin:/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cmake-3.27.7-oneigrlumyhz7ic3fjrfmw7dho2rja6j/bin:/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/gcc-13.2.0-mivndfyemp5ot6e5pbzheruhd2fodkhn/bin:/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/intel-oneapi-mkl-2023.2.0-egymswy777yycnfsult6ama6d52sau47/mkl/2023.2.0/bin/intel64:/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin:/opt/spack/rhel8_x86/stack-2023-12/extras/miniconda3/bin:/opt/spack/rhel8_x86/stack-2023-12/extras/miniconda3/condabin:/opt/spack/rhel8_x86/stack-2023-12/extras/matlab-r2023b/bin:/opt/spack/rhel8_x86/stack-2023-12/venvs/venv-jupyter/bin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/home/rjmurr/.local/bin:/home/rjmurr/bin


  #$
  INCLUDES="-I/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin/../targets/x86_64-linux/include"


  #$ LIBRARIES=
  "-L/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin/../targets/x86_64-linux/lib/stubs"
  "-L/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin/../targets/x86_64-linux/lib"


  #$ CUDAFE_FLAGS=

  #$ PTXAS_FLAGS=

  #$ rm tmp/a_dlink.reg.c

  #$ gcc -D__CUDA_ARCH_LIST__=520 -E -x c++ -D__CUDACC__ -D__NVCC__
  "-I/opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin/../targets/x86_64-linux/include"
  -D__CUDACC_VER_MAJOR__=12 -D__CUDACC_VER_MINOR__=2
  -D__CUDACC_VER_BUILD__=128 -D__CUDA_API_VER_MAJOR__=12
  -D__CUDA_API_VER_MINOR__=2 -D__NVCC_DIAG_PRAGMA_SUPPORT__=1 -include
  "cuda_runtime.h" -m64 "CMakeCUDACompilerId.cu" -o
  "tmp/CMakeCUDACompilerId.cpp4.ii"

  In file included from
  /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin/../targets/x86_64-linux/include/cuda_runtime.h:82,


                   from <command-line>:

  
  /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin/../targets/x86_64-linux/include/crt/host_config.h:143:2:
  error: #error -- unsupported GNU version! gcc versions later than 12 are
  not 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.

    143 | #error -- unsupported GNU version! gcc versions later than 12 are not 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.
        |  ^~~~~

  # --error 0x1 --





Call Stack (most recent call first):
  /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cmake-3.27.7-oneigrlumyhz7ic3fjrfmw7dho2rja6j/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cmake-3.27.7-oneigrlumyhz7ic3fjrfmw7dho2rja6j/share/cmake-3.27/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
  /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cmake-3.27.7-oneigrlumyhz7ic3fjrfmw7dho2rja6j/share/cmake-3.27/Modules/CMakeDetermineCUDACompiler.cmake:307 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:13 (enable_language)

Everything worked great if I used GCC 12.3.0 and CUDA 12.2.1:

(base) [rjmurr@hopper2 RandLAPACK-build]$ cmake -DCMAKE_BUILD_TYPE=Release -Dlapackpp_DIR=`pwd`/../lapackpp-install/lib64/cmake/lapackpp -Dblaspp_DIR=`pwd`/../blaspp-install/lib64/cmake/blaspp -DRandom123_DIR=`pwd`/../Random123-install/include -DCMAKE_BINARY_DIR=`pwd` -DCMAKE_INSTALL_PREFIX=`pwd`/../RandLAPACK-install -DRequireCUDA=ON ../RandLAPACK
-- The CXX compiler identification is GNU 12.3.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/gcc-12.3.0-rgcx2l7elultowyr2ovn6uxcco43kppq/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CUDAToolkit: /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/include (found version "12.2.128") 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- CUDA found! Enabling CUDA support.
-- The CUDA compiler identification is NVIDIA 12.2.128
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Check for working CUDA compiler: /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/cuda-12.2.1-w5zet7xgvl253vulethxspfpbkwfzgwq/bin/nvcc - skipped
-- Detecting CUDA compile features
-- Detecting CUDA compile features - done
-- CUDA features -- enabled
-- Checking for OpenMP ... 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5") found components: CXX 
-- Checking for OpenMP ... 
-- RandLAPACK_VERSION_MAJOR=0
-- RandLAPACK_VERSION_MINOR=1
-- RandLAPACK_VERSION_PATCH=0
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- The C compiler identification is GNU 12.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/spack/rhel8_x86/stack-2023-12/spack/opt/spack/linux-rhel8-x86_64/gcc-8.5.0/gcc-12.3.0-rgcx2l7elultowyr2ovn6uxcco43kppq/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- RandBLAS_VERSION_MAJOR=0
-- RandBLAS_VERSION_MINOR=1
-- RandBLAS_VERSION_PATCH=0
-- Found Random123: /home/rjmurr/maxgpu/Random123-install/include  
-- Checking for OpenMP ... 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5") found components: CXX 
-- Checking for OpenMP ... TRUE
-- Checking for regression tests ...
-- Found GTest: /opt/spack/rhel8_x86/stack-2023-12/extras/miniconda3/lib/cmake/GTest/GTestConfig.cmake (found version "1.11.0")  
-- Checking for regression tests ... TRUE
-- Checking for regression tests ...
-- Checking for regression tests ... TRUE
-- Configuring done (4.8s)
-- Generating done (0.3s)
-- Build files have been written to: /home/rjmurr/maxgpu/RandLAPACK-build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant