Skip to content

NVCC fixes#3441

Open
bendudson wants to merge 4 commits into
nextfrom
next-nvcc
Open

NVCC fixes#3441
bendudson wants to merge 4 commits into
nextfrom
next-nvcc

Conversation

@bendudson

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.

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
#include "bout/boutexception.hxx"

#include <string_view>

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.

warning: included header string_view is not used directly [misc-include-cleaner]

Suggested change

Comment thread include/bout/fieldops.hxx
#include "bout/bout_types.hxx"
#include "bout/build_config.hxx"
#include "bout/build_defines.hxx"
#include "bout/build_config.hxx"

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.

warning: duplicate include [readability-duplicate-include]

include/bout/fieldops.hxx:8:

- #include "bout/build_defines.hxx"
- #include "bout/build_config.hxx"
+ #include "bout/build_defines.hxx"

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.

1 participant