LCG_105a CUDA platform and build
As part of the switch to LCG_104/105/105a, the CUDA build for HLT1 production needs to be sorted out. I've been having a look at it and would like to give a status update and ask for some input.
The main issue is that the most recent version of CUDA (12.3) doesn't support GCC 13. Clang 16 is supported, so I tried that first. Unfortunately clang 16 uses a GCC 13 toolchain behind the scenes, which is also not supported.
The device compilation chain needs a host compiler for some of it's parts. This is typically the same one as the compiler used for "regular" C++ files, but it doesn't need to be.
I see two potential solutions:
- Use C++20 for all "regular" C++ compilation, and C++17 for all CUDA compilation. From the HLT1 side this is acceptable.
- Use GCC 12 as a host-compiler-for-CUDA
Some changes to lcg-toolchains are needed in both cases. I'll open an MR that supports 1) where we can discuss those changes.
A build of 1) succeeds but gives warnings from ROOT that there is a mismatch in the C++ standard, which may cause unexpected issues. I don't really know what they mean with that. Any ideas? I'm now running the tests to see if anything turns up. Staying with C++17 for CUDA files (C++20 everywhere else) is acceptable from the HLT1 side.
For 2) some changes in lcg-toolchains would be needed, e.g. creating an additonal wrapper for gcc-12 and versioning the gcc wrappers into g{cc,++}-13 and g{cc,++}-12.
@sponce, @clemenci, @bcouturi Do you have a preference for one of the solutions? Any other input?