Bug 1565375 - Advanced C++ code which requires CUDA can't be built on RHEL7
Summary: Advanced C++ code which requires CUDA can't be built on RHEL7
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: gcc
Version: DTS 7.1 RHEL 7
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: alpha
: 7.1
Assignee: Marek Polacek
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-09 23:54 UTC by Ben Woodard
Modified: 2018-07-12 21:54 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-12 21:54:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ben Woodard 2018-04-09 23:54:26 UTC
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.

Comment 3 Erico Nunes 2018-04-10 12:06:58 UTC
(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 */

Comment 5 Jeff Law 2018-07-12 21:54:11 UTC
This is really a problem with the NVidia CUDA headers.  There's really nothing we can do here.


Note You need to log in before you can comment on or make changes to this bug.