diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0a49aaba22..a35dfba278 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -241,9 +241,9 @@ jobs: install_extra: intel-oneapi-compiler-dpcpp-cpp g++-12 # for libstdc++ cxx_flags: --gcc-install-dir=/usr/lib/gcc/x86_64-linux-gnu/12 - name: build-ubuntu-nvc++ - cxx: /opt/nvidia/hpc_sdk/Linux_x86_64/22.9/compilers/bin/nvc++ + cxx: /opt/nvidia/hpc_sdk/Linux_x86_64/23.5/compilers/bin/nvc++ add_nvcpp_repo: true - install_extra: nvhpc-22-9 + install_extra: nvhpc-23-5 steps: - uses: actions/checkout@v3 diff --git a/tests/recordref.cpp b/tests/recordref.cpp index 185ed6f860..50aed5427b 100644 --- a/tests/recordref.cpp +++ b/tests/recordref.cpp @@ -4,6 +4,7 @@ #include "common.hpp" #include +#include #include #include @@ -29,6 +30,13 @@ namespace record(tag::Vel{}, tag::Y{}) = 4; record(tag::Vel{}, tag::Z{}) = 5; record(tag::Mass{}) = 6; + +#if defined(__NVCOMPILER) && __NVCOMPILER_MAJOR__ >= 23 + // nvc++ somehow optimizes out the return of record but corrupts the value, so we make it escape to prevent + // compiler optimizations + printf("", &record); +#endif + return record; } } // namespace @@ -1198,7 +1206,7 @@ TEST_CASE("decayCopy") STATIC_REQUIRE(std::is_same_v); const int i = 42; STATIC_REQUIRE(std::is_same_v); - const int& ir = i; + [[maybe_unused]] const int& ir = i; STATIC_REQUIRE(std::is_same_v); auto mapping = llama::mapping::BitPackedIntSoA, Vec3I>{{}, 17};