Description of problem: CUDA programs can't be build on RHEL7 We have a problemwith gcc versions though, using the RHEL7 gcc 4.8 gives: CMake Error at cmake/SetupCompilers.cmake:54 (message): RAJA requires GCC 4.9 or greater! And having CUDA enabled with the SCL latest gcc 7.2.1 gives the same as the cuda samples: /usr/local/cuda/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported! #error -- unsupported GNU version! gcc versions later than 6 are not supported! ^~~~~ Several work arounds exist: 1) they can build their own RHEL6 compiler 2) they can continue to run DTS6 even though we have retired it. 3) You can work around some of those problems by adding -Xcompiler "-std=c++03" to nvcc command line. I thought that -std=c++11 was supposed to work but for some reason it didn’t. It is important to LLNL that the advanced compilers work with CUDA. Yes this primarily nvidia's issue but as we move forward enabling GPUs this is something that needs to work correctly.
(In reply to Ben Woodard from comment #0) > 3) You can work around some of those problems by adding -Xcompiler > "-std=c++03" to nvcc command line. I thought that -std=c++11 was supposed to > work but for some reason it didn’t. In this case it's a preprocessor macro in the CUDA 9.1 headers, so I believe it is just an Nvidia issue: /usr/local/cuda-9.1/targets/x86_64-linux/include/crt/host_config.h 119 #if __GNUC__ > 6 120 121 #error -- unsupported GNU version! gcc versions later than 6 are not supported! 122 123 #endif /* __GNUC__ > 6 */
This is really a problem with the NVidia CUDA headers. There's really nothing we can do here.