NVIDIA / cuda-samples

Samples for CUDA Developers which demonstrates features in CUDA Toolkit
Other
6.49k stars 1.84k forks source link

make error with jacobiCudaGraphs on CentOS 7 #239

Closed disjustin closed 12 months ago

disjustin commented 12 months ago

Trying to compile cuda-sample v12.3 and am not sure how to handle.

make[1]: Entering directory `/root/cuda-samples-master/Samples/3_CUDA_Features/immaTensorCoreGemm'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/cuda-samples-master/Samples/3_CUDA_Features/immaTensorCoreGemm'
>>> Waiving build. Minimum GCC version required is  5.1.0<<<
make[1]: Entering directory `/root/cuda-samples-master/Samples/3_CUDA_Features/globalToShmemAsyncCopy'
[@] /usr/local/cuda/bin/nvcc -ccbin g++ -I../../../Common -m64 --std=c++11 --threads 0 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90,code=compute_90 -o globalToShmemAsyncCopy.o -c globalToShmemAsyncCopy.cu
[@] /usr/local/cuda/bin/nvcc -ccbin g++ -m64 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90,code=compute_90 -o globalToShmemAsyncCopy globalToShmemAsyncCopy.o
[@] mkdir -p ../../../bin/x86_64/linux/release
[@] cp globalToShmemAsyncCopy ../../../bin/x86_64/linux/release
make[1]: Leaving directory `/root/cuda-samples-master/Samples/3_CUDA_Features/globalToShmemAsyncCopy'
make[1]: Entering directory `/root/cuda-samples-master/Samples/3_CUDA_Features/cdpSimpleQuicksort'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/cuda-samples-master/Samples/3_CUDA_Features/cdpSimpleQuicksort'
make[1]: Entering directory `/root/cuda-samples-master/Samples/3_CUDA_Features/cdpSimplePrint'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/cuda-samples-master/Samples/3_CUDA_Features/cdpSimplePrint'
make[1]: Entering directory `/root/cuda-samples-master/Samples/3_CUDA_Features/ptxjit'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/cuda-samples-master/Samples/3_CUDA_Features/ptxjit'
make[1]: Entering directory `/root/cuda-samples-master/Samples/3_CUDA_Features/StreamPriorities'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/cuda-samples-master/Samples/3_CUDA_Features/StreamPriorities'
make[1]: Entering directory `/root/cuda-samples-master/Samples/3_CUDA_Features/cdpBezierTessellation'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/cuda-samples-master/Samples/3_CUDA_Features/cdpBezierTessellation'
make[1]: Entering directory `/root/cuda-samples-master/Samples/3_CUDA_Features/jacobiCudaGraphs'
/usr/local/cuda/bin/nvcc -ccbin g++ -I../../../Common  -m64    --threads 0 --std=c++11 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90,code=compute_90 -o jacobi.o -c jacobi.cu
/usr/local/cuda/bin/../targets/x86_64-linux/include/cuda/std/detail/libcxx/include/__type_traits/../__type_traits/../__type_traits/is_trivially_copyable.h(41): error: nontype "cuda::std::__4::remove_all_extents<_Tp>::type::type" is not a type name
      : integral_constant<bool, is_scalar<__remove_all_extents_t<_Tp>::type>::value>
                                          ^

1 error detected in the compilation of "jacobi.cu".
make[1]: *** [jacobi.o] Error 255
make[1]: Leaving directory `/root/cuda-samples-master/Samples/3_CUDA_Features/jacobiCudaGraphs'
make: *** [Samples/3_CUDA_Features/jacobiCudaGraphs/Makefile.ph_build] Error 2

ENV

uname: Linux localhost 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
os: /etc/redhat-release -> centos-release
CentOS Linux release 7.9.2009 (Core)
gcc: gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) 
nvcc: cuda-nvcc-12-3-12.3.103-1.x86_64
disjustin commented 12 months ago

Seems to be an issue with an outdated gcc. Looking into installing updated gcc 11 on centos 7...

disjustin commented 12 months ago

Solved. For those running on CentOS 7, here's my solution:

  1. install and enable devtoolset-11, see here
  2. install cmake3 as cmake, see here
  3. download and make the latest cuda-samples from master (not V12.3) for bug fix: #235