Skip to content

fix: build with GCC 15 / CUDA >= 13#83

Merged
RaulPPelaez merged 3 commits into
stochasticHydroTools:mainfrom
GaetanLepage:fix/gcc15-span-iter-tag
Jul 10, 2026
Merged

fix: build with GCC 15 / CUDA >= 13#83
RaulPPelaez merged 3 commits into
stochasticHydroTools:mainfrom
GaetanLepage:fix/gcc15-span-iter-tag

Conversation

@GaetanLepage

Copy link
Copy Markdown
Contributor

libstdc++ 15 makes the tag type of std::span's iterator (std::span::__iter_tag) a private member.
When a span iterator is passed to a thrust/CUB device algorithm (e.g. thrust::transform in MobilityInterface::sqrtMdotW), nvcc emits host stub code that names that private type, which GCC 15 rejects (__iter_tag is private within this context).
This breaks builds with CUDA >= 13 against GCC 15.

Give device_span raw-pointer begin()/end() so the private tag is never instantiated.
device_span remains a valid contiguous range and every solver funnels through it, so this fixes all of them at once.

Gaetan Lepage and others added 3 commits July 10, 2026 14:02
libstdc++ 15 makes the tag type of std::span's iterator
(std::span<T>::__iter_tag) a private member. When a span iterator is
passed to a thrust/CUB device algorithm (e.g. thrust::transform in
MobilityInterface::sqrtMdotW), nvcc emits host stub code that names that
private type, which GCC 15 rejects ("__iter_tag is private within this
context"). This breaks builds with CUDA >= 13 against GCC 15.

Give device_span raw-pointer begin()/end() so the private tag is never
instantiated. device_span remains a valid contiguous range and every
solver funnels through it, so this fixes all of them at once.
@RaulPPelaez
RaulPPelaez merged commit 9415014 into stochasticHydroTools:main Jul 10, 2026
@RaulPPelaez

Copy link
Copy Markdown
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants