You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There are lots of changes in the GCC 14 C++ headers that break HIP builds. These are usually debugging functions in math functions, but there are some other examples, such as in operator* for std::optional objects. Since the debugging functions are host-only, whenever one of these function is called from device code, the compiler aborts with an error.
To Reproduce
Steps to reproduce the behavior:
Use std::clamp or operator* for an std::optional object in device code and compile for AMDGPU on a system that bundles GCC 14 as the system compiler.
See error below.
2025-01-21T00:28:55.8893422Z /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/optional:482:2: error: reference to __host__ function '__glibcxx_assert_fail' in __host__ __device__ function
2025-01-21T00:28:55.8894500Z 482 | __glibcxx_assert(this->_M_is_engaged());
2025-01-21T00:28:55.8895148Z | ^
2025-01-21T00:28:55.8895962Z /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/x86_64-linux-gnu/c++/14/bits/c++config.h:612:7: note: expanded from macro '__glibcxx_assert'
2025-01-21T00:28:55.8897145Z 612 | std::__glibcxx_assert_fail(); \
2025-01-21T00:28:55.8897673Z | ^
2025-01-21T00:28:55.8898316Z /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/optional:968:22: note: called by 'operator*'
2025-01-21T00:28:55.8899038Z 968 | { return this->_M_get(); }
2025-01-21T00:28:55.8899565Z | ^
2025-01-21T00:28:55.8900235Z /home/runner/work/quokka/quokka/src/hydro/EOS.hpp:327:27: note: called by 'ComputePressure'
2025-01-21T00:28:55.8901001Z 327 | const auto &massArray = *massScalars;
2025-01-21T00:28:55.8901445Z | ^
The text was updated successfully, but these errors were encountered:
)
### Description
Temporarily workaround incompatibilities between the C++ standard
library headers shipped with GCC 14 and HIP by switching to using the
C++ standard library headers shipped with Clang (an independent
implementation).
This may not be viable in production, since (in principle) any
third-party libraries that use C++ should be complied against the same
C++ standard library in order to ensure compatibility, but it will at
least allow the CI to pass again and unblock several PRs. Currently, the
only C++ library dependency that is not built simultaneously alongside
Quokka is ADIOS2, which is optional.
### Related issues
Fixes#856.
### Checklist
_Before this pull request can be reviewed, all of these tasks should be
completed. Denote completed tasks with an `x` inside the square brackets
`[ ]` in the Markdown source below:_
- [x] I have added a description (see above).
- [x] I have added a link to any related issues (if applicable; see
above).
- [x] I have read the [Contributing
Guide](https://github.com/quokka-astro/quokka/blob/development/CONTRIBUTING.md).
- [ ] I have added tests for any new physics that this PR adds to the
code.
- [ ] *(For quokka-astro org members)* I have manually triggered the GPU
tests with the magic comment `/azp run`.
Describe the bug
There are lots of changes in the GCC 14 C++ headers that break HIP builds. These are usually debugging functions in math functions, but there are some other examples, such as in
operator*
forstd::optional
objects. Since the debugging functions are host-only, whenever one of these function is called from device code, the compiler aborts with an error.To Reproduce
Steps to reproduce the behavior:
std::clamp
oroperator*
for anstd::optional
object in device code and compile for AMDGPU on a system that bundles GCC 14 as the system compiler.The text was updated successfully, but these errors were encountered: