Skip to content

NVCC fixes - #3441

Merged
ZedThree merged 7 commits into
nextfrom
next-nvcc
Aug 5, 2026
Merged

NVCC fixes#3441
ZedThree merged 7 commits into
nextfrom
next-nvcc

Conversation

@bendudson

@bendudson bendudson commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

The NVidia C++ compiler is quite picky compared to LLVM and GCC.

These fixes enable compilation with nvcc V12.9.41 on Perlmutter.

Ready for merging.

bendudson and others added 4 commits July 17, 2026 17:11
NVCC doesn't accept `Array<int, ArrayData<int>>` as `C<scalar>`
so treats ConvertContainer<Array...> as partially specialized.

This explicitly writes convertors for Array, Matrix and Tensor
containers.
fmt uses `begin` rather than `std::begin` so that NVCC
fails to find an overload for `char[]` literals.
Calls `Array::size()` that accesses a shared pointer to `ArrayData`.
Doesn't need to be a device function since called outside kernel.
- Remove default arguments for fv_ops specializations
- Use base class functions rather than partial overload

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Comment thread include/bout/assert.hxx
Comment thread include/bout/fieldops.hxx Outdated

@ZedThree ZedThree left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, we can fix the clang-tidy warnings though

Comment thread include/bout/assert.hxx Outdated
Comment thread include/bout/region.hxx Outdated
Comment thread src/sys/options.cxx
Comment thread include/bout/fieldops.hxx Outdated
bendudson and others added 3 commits August 4, 2026 06:34
Co-authored-by: Peter Hill <zed.three@gmail.com>
Rather than returning incorrect values, mark code as unreachable.
When C++23 is used, this can be replaced with std::unreachable.
@ZedThree
ZedThree merged commit 7018170 into next Aug 5, 2026
23 checks passed
@ZedThree
ZedThree deleted the next-nvcc branch August 5, 2026 16:54
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