-
Notifications
You must be signed in to change notification settings - Fork 91
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
[EPIC] Move forward to C++20 #3223
Comments
We are mostly ready for this. It's part of the reason why we started compiling with cuda12. The only oustanding issues/questions are:
|
CC @drmichaeltcvx |
Not yet on Pangea 3, I just asked to install cuda12 and gcc12 so we can make the switch. FYI @sframba @herve-gross |
BLT and its ability to set the C++ standard for HIP compilation have been updated to include C++20 support. The HIP/ROCM compilers we use are all clang-based and the intent is that they support the same standards the underlying clang compiler does. Naturally we might encounter issues/failures on that end, but if we do we can report them as bugs to AMD and they should be resolved eventually. |
@untereiner @wrtobin @CusiniM |
sounds like a plan. I think we should do it once #3218 is merged. |
For CPU GEOS, we have been compiling using GCC 13.2.0 and running it w/o any issues on Zen4 and Zen4 AMD platforms. I believe that CUDA 12.4 started supporting GCC 13.X (https://developer.nvidia.com/blog/cuda-toolkit-12-4-enhances-support-for-nvidia-grace-hopper-and-confidential-computing/#:~:text=A100%20performance%20improvements-,Compiler%20updates,objects%20supporting%20multiple%20GPU%20architectures.) I need to report that we have started getting some run-time errors with the CUDA 12.2 builds. I believe that @victorapm will be looking into this issues. |
We received feedback from IBM that Pangea3 current drivers are not compatible with cuda12. They plan to update the driver in January 2025 during a maintenance operation. I'll keep you updated on the progress. FYI @sframba @herve-gross |
If I understand correctly the issue in #3314 gcc 9.4 has a bug when compiling modern C++. I gathered all compiler versions from the CI below:
|
@untereiner @rrsettgast and I had a discussion about dropping 9.X support. The only reason we haven't committed to making the move is the Pangea-3 CI using 9.4 as well. If we need to continue to support that platform+gcc version, we want to discover issues in the cheaper CPU CI prior to the expensive GPU CI whenever possible. |
@untereiner What is the issue with gcc 9.4? Can you point me to the compiler bug? |
Its a bug I fixed yesterday in a branch of lvarray. It only happens when we create an arrayofarrays or arrayofsets with number of arrays and default array sizes known at compile time: https://github.com/GEOS-DEV/LvArray/pull/335/files Basically this valid placement-new:
caused a compiler error:
in the gcc-9.4 CI. changing it to this:
which is just a slight refactoring of the operation, caused the compilation to succeed. |
The code that caused the bug to be found only exists in a new unit test in #3314, so it wouldn't and couldn't have caused actual failures on any platforms geos develop is currently deployed to / used on. |
Thanks for the explanation, so if I understand correctly, a move away from gcc 9.4 is no longer urgent? |
There is no rush. I just wanted to point out that the 9.x branch of gcc is no longer supported. Not sure it is good practice relying on old no longer supported compiler branches. I think as a good practice to periodically update the min versions of the compilers (Currently: gcc >= 11.x) |
The bug has been mitigated, so it isn't critical. It is however very unlikely this will ever be addressed in the gcc-9.X release line, and sunsetting older compiler versions is something we occasionally want to do regardless so legacy bugs like this don't impact developer time and/or require unpleasant workarounds (notwithstanding that this workaround was essentially trivial once identified). If / when we can move pangea 3 to a newer GCC it would be a good idea to sunset support for gcc pre 10.X. generally. |
I have just had a chat with @Bubusch. Moving to a higher version of gcc on Pangea3 should be possible. The only constraint is that it has to be compatible with the current version of the cuda drivers installed on Pangea3. He will ask and let us know as soon as it's done. Moving to cuda12 is a separate issue and there is no guarantee that it will happen quickly. I already have a PR (GEOS-DEV/thirdPartyLibs#282) where I am upgrading some of our CI images. For example, I have removed the ubuntu 20 with gcc 9 one in favor of a later ubuntu version with gcc14. |
What is the requested feature?
I want to open discussions to move forward to c++20
Is your request related to a specific problem?
Below is a list of desirable features that are standardized in C++20.
I also put the min (compiler/stdlib) versions where they are implemented
I would like to discuss the feasibility of this change on the different architectures that geos is compiled on..
Describe the solution you'd like
n.a.
Describe alternatives you've considered
n.a.
Additional context
n.a.
The text was updated successfully, but these errors were encountered: