From 49353ace90fb68b92e773b65b760be4eef75aef1 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 00:24:42 -0700 Subject: [PATCH 01/31] index range can be reversed now --- include/boost/multi/detail/index_range.hpp | 2 +- test/index_range.cpp | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/include/boost/multi/detail/index_range.hpp b/include/boost/multi/detail/index_range.hpp index efc52c0f0..d94be6e82 100644 --- a/include/boost/multi/detail/index_range.hpp +++ b/include/boost/multi/detail/index_range.hpp @@ -178,7 +178,7 @@ class range { ++curr_; return *this; } - constexpr auto operator--() -> const_iterator& { + constexpr auto operator--() noexcept(noexcept(--curr_)) -> const_iterator& { --curr_; return *this; } diff --git a/test/index_range.cpp b/test/index_range.cpp index 7ba4a57bf..e4488b5bd 100644 --- a/test/index_range.cpp +++ b/test/index_range.cpp @@ -13,6 +13,10 @@ // IWYU pragma: no_include // for tuple_element<>::type #include +#if defined(__cplusplus) && (__cplusplus >= 202002L) +#include // IWYU pragma: keep // NOLINT(misc-include-cleaner) +#endif + namespace multi = boost::multi; auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugprone-exception-escape) @@ -258,6 +262,23 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro auto sum = std::accumulate(irng.begin(), irng.end(), 0); BOOST_TEST( sum == 5 + 6 + 7 + 8 + 9 + 10 + 11 ); } + { + multi::extension_t const ext(5); + + BOOST_TEST( *ext.begin() == 0 ); + BOOST_TEST( *(ext.end() - 1) == 4 ); + +#if defined(__cpp_lib_ranges) && (__cpp_lib_ranges >= 201911L) && !defined(_MSC_VER) + BOOST_TEST( *std::ranges::begin(ext) == 0 ); + BOOST_TEST( *(std::ranges::end(ext)-1) == 4 ); + + BOOST_TEST( ext[1] == 1 ); + + auto rext = ext | std::views::reverse; + + BOOST_TEST( rext[1] == 3 ); +#endif + } return boost::report_errors(); } From c2d937e5cc816b0c7062619fe0a41d2958610a49 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 01:28:57 -0700 Subject: [PATCH 02/31] fix error in clang 15 --- include/boost/multi/detail/index_range.hpp | 4 ++-- test/index_range.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/multi/detail/index_range.hpp b/include/boost/multi/detail/index_range.hpp index d94be6e82..230b28ae2 100644 --- a/include/boost/multi/detail/index_range.hpp +++ b/include/boost/multi/detail/index_range.hpp @@ -129,8 +129,8 @@ class range { using pointer = value_type; range() = default; - - // range(range const&) = default; + range(range const&) = default; + auto operator=(range const&) -> range& = default; template>, int> = 0, // NOLINT(modernize-type-traits) for C++20 diff --git a/test/index_range.cpp b/test/index_range.cpp index e4488b5bd..3d42de9a7 100644 --- a/test/index_range.cpp +++ b/test/index_range.cpp @@ -13,7 +13,7 @@ // IWYU pragma: no_include // for tuple_element<>::type #include -#if defined(__cplusplus) && (__cplusplus >= 202002L) +#if defined(__cplusplus) && (__cplusplus >= 202002L) && __has_include() #include // IWYU pragma: keep // NOLINT(misc-include-cleaner) #endif @@ -205,7 +205,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro multi::range, int> const irng({}, 12); // && !defined(__PGI) && (__cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)) -#if (__cplusplus >= 202002L) && (__has_cpp_attribute(no_unique_address) >= 201803L) && !defined(__NVCC__) && !defined(__NVCOMPILER) +#if(__cplusplus >= 202002L) && (__has_cpp_attribute(no_unique_address) >= 201803L) && !defined(__NVCC__) && !defined(__NVCOMPILER) static_assert(sizeof(irng) == sizeof(int)); #endif From 391681ce5012dc12a6c3527a067d15053ae0f0d0 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 01:48:04 -0700 Subject: [PATCH 03/31] rule of 5 --- include/boost/multi/detail/index_range.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/boost/multi/detail/index_range.hpp b/include/boost/multi/detail/index_range.hpp index 230b28ae2..8e2464075 100644 --- a/include/boost/multi/detail/index_range.hpp +++ b/include/boost/multi/detail/index_range.hpp @@ -130,7 +130,10 @@ class range { range() = default; range(range const&) = default; + range(range&&) = default; auto operator=(range const&) -> range& = default; + auto operator=(range&&) -> range& = default; + ~range() = default; template>, int> = 0, // NOLINT(modernize-type-traits) for C++20 From eea1c9ef9c4ae64a4907319598cac1edabcde1d4 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 02:16:25 -0700 Subject: [PATCH 04/31] use is same --- include/boost/multi/detail/index_range.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/multi/detail/index_range.hpp b/include/boost/multi/detail/index_range.hpp index 8e2464075..3df24b6f4 100644 --- a/include/boost/multi/detail/index_range.hpp +++ b/include/boost/multi/detail/index_range.hpp @@ -136,7 +136,7 @@ class range { ~range() = default; template>, int> = 0, // NOLINT(modernize-type-traits) for C++20 + std::enable_if_t>, int> = 0, // NOLINT(modernize-type-traits) for C++20 decltype(detail::implicit_cast(std::declval().first()), detail::implicit_cast(std::declval().last()) )* = nullptr> @@ -146,7 +146,7 @@ class range { template< class Range, - std::enable_if_t>, unsigned> = 0, + std::enable_if_t>, unsigned> = 0, // NOLINT(modernize-type-traits) for C++20 decltype(detail::explicit_cast(std::declval().first()), detail::explicit_cast(std::declval().last()) )* = nullptr> From decc5e6b39dfc6bc7d73e977be2c81834d3da151 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 03:04:33 -0700 Subject: [PATCH 05/31] rule of 4 --- include/boost/multi/detail/index_range.hpp | 8 ++++++++ test/index_range.cpp | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/include/boost/multi/detail/index_range.hpp b/include/boost/multi/detail/index_range.hpp index 3df24b6f4..a33d84620 100644 --- a/include/boost/multi/detail/index_range.hpp +++ b/include/boost/multi/detail/index_range.hpp @@ -347,8 +347,16 @@ struct extension_t : public range { BOOST_MULTI_HD constexpr extension_t(IndexTypeLast last) noexcept // NOLINT(google-explicit-constructor,hicpp-explicit-conversions) // NOSONAR(cpp:S1709) allow terse syntax : range(IndexType{}, IndexType{} + last) {} + // extension_t() = default; + extension_t(extension_t const&) = default; + extension_t(extension_t&&) = default; + auto operator=(extension_t const&) -> extension_t& = default; + auto operator=(extension_t&&) -> extension_t& = default; + ~extension_t() = default; + template< class OtherExtension, + std::enable_if_t>, int> = 0, decltype( detail::implicit_cast(std::declval().first()), detail::implicit_cast(std::declval().last()) diff --git a/test/index_range.cpp b/test/index_range.cpp index 3d42de9a7..8458ca369 100644 --- a/test/index_range.cpp +++ b/test/index_range.cpp @@ -263,7 +263,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro BOOST_TEST( sum == 5 + 6 + 7 + 8 + 9 + 10 + 11 ); } { - multi::extension_t const ext(5); + multi::extension_t ext(5); BOOST_TEST( *ext.begin() == 0 ); BOOST_TEST( *(ext.end() - 1) == 4 ); @@ -274,9 +274,13 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro BOOST_TEST( ext[1] == 1 ); - auto rext = ext | std::views::reverse; + static_assert(std::ranges::range>); + static_assert(std::ranges::range>>); - BOOST_TEST( rext[1] == 3 ); + // std::ranges::ref_view> + // auto rext = ext | std::views::reverse; + + // BOOST_TEST( rext[1] == 3 ); #endif } From ad71c7fe16da13a093e521843c100ecb04a253ed Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 03:07:51 -0700 Subject: [PATCH 06/31] sfinae universal op= --- include/boost/multi/detail/index_range.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/multi/detail/index_range.hpp b/include/boost/multi/detail/index_range.hpp index a33d84620..abeb9ada9 100644 --- a/include/boost/multi/detail/index_range.hpp +++ b/include/boost/multi/detail/index_range.hpp @@ -376,7 +376,9 @@ struct extension_t : public range { // BOOST_MULTI_HD constexpr explicit extension_t(OtherExtension const& other) noexcept // : extension_t{other.first(), other.last()} {} - template + template, int> =0 // NOLINT(modernize-use-constraints,modernize-type-traits) + > BOOST_MULTI_HD constexpr auto operator=(OtherExtension const& other) -> extension_t& { (*this) = extension_t{other}; return *this; From daf67de53814ff4488727ecda716e350abefda27 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 09:01:27 -0700 Subject: [PATCH 07/31] tidy fixes --- include/boost/multi/detail/index_range.hpp | 14 ++++++++++++++ test/index_range.cpp | 10 +++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/include/boost/multi/detail/index_range.hpp b/include/boost/multi/detail/index_range.hpp index abeb9ada9..b378f7702 100644 --- a/include/boost/multi/detail/index_range.hpp +++ b/include/boost/multi/detail/index_range.hpp @@ -22,6 +22,10 @@ #include // for declval, true_type, decay_t, enable_if_t #include // for forward +// #if defined(__cplusplus) && (__cplusplus >= 202002L) && __has_include() +#include // IWYU pragma: keep // NOLINT(misc-include-cleaner) +// #endif + #ifdef __NVCC__ #define BOOST_MULTI_HD __host__ __device__ #else @@ -457,6 +461,16 @@ constexpr auto contains(index_extensions const& iex, Tuple const& tup) { } // end namespace boost::multi +#if defined(__cpp_lib_ranges) && (__cpp_lib_ranges >= 201911L) && !defined(_MSC_VER) +namespace std { + template< class> + constexpr bool enable_borrowed_range = true; + + template< class IndexType, class IndexTypeLast > + constexpr bool enable_borrowed_range<::boost::multi::extension_t> = true; +} +#endif + #undef BOOST_MULTI_HD #endif // BOOST_MULTI_DETAIL_INDEX_RANGE_HPP diff --git a/test/index_range.cpp b/test/index_range.cpp index 8458ca369..dd41e16ba 100644 --- a/test/index_range.cpp +++ b/test/index_range.cpp @@ -263,7 +263,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro BOOST_TEST( sum == 5 + 6 + 7 + 8 + 9 + 10 + 11 ); } { - multi::extension_t ext(5); + multi::extension_t const ext(5); BOOST_TEST( *ext.begin() == 0 ); BOOST_TEST( *(ext.end() - 1) == 4 ); @@ -274,13 +274,13 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro BOOST_TEST( ext[1] == 1 ); - static_assert(std::ranges::range>); - static_assert(std::ranges::range>>); + // static_assert(std::ranges::range>); + // static_assert(std::ranges::range>>); // std::ranges::ref_view> - // auto rext = ext | std::views::reverse; + auto rext = ext | std::views::reverse; - // BOOST_TEST( rext[1] == 3 ); + BOOST_TEST( rext[1] == 3 ); #endif } From f519c0d3e658c8ee73cf8298242aa5397f18aa8a Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 09:17:16 -0700 Subject: [PATCH 08/31] add assert --- test/index_range.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/index_range.cpp b/test/index_range.cpp index dd41e16ba..3f1b07b68 100644 --- a/test/index_range.cpp +++ b/test/index_range.cpp @@ -274,8 +274,8 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro BOOST_TEST( ext[1] == 1 ); - // static_assert(std::ranges::range>); - // static_assert(std::ranges::range>>); + static_assert(std::ranges::range>); + static_assert(std::ranges::range>>); // std::ranges::ref_view> auto rext = ext | std::views::reverse; From 56e553d141cfb3e61a62d12b69901e17e4358462 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 11:23:47 -0700 Subject: [PATCH 09/31] add enable_view --- include/boost/multi/detail/index_range.hpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/include/boost/multi/detail/index_range.hpp b/include/boost/multi/detail/index_range.hpp index b378f7702..b1d940c60 100644 --- a/include/boost/multi/detail/index_range.hpp +++ b/include/boost/multi/detail/index_range.hpp @@ -22,9 +22,9 @@ #include // for declval, true_type, decay_t, enable_if_t #include // for forward -// #if defined(__cplusplus) && (__cplusplus >= 202002L) && __has_include() +#if defined(__cplusplus) && (__cplusplus >= 202002L) && __has_include() #include // IWYU pragma: keep // NOLINT(misc-include-cleaner) -// #endif +#endif #ifdef __NVCC__ #define BOOST_MULTI_HD __host__ __device__ @@ -462,12 +462,9 @@ constexpr auto contains(index_extensions const& iex, Tuple const& tup) { } // end namespace boost::multi #if defined(__cpp_lib_ranges) && (__cpp_lib_ranges >= 201911L) && !defined(_MSC_VER) -namespace std { - template< class> - constexpr bool enable_borrowed_range = true; - +namespace std::ranges { // NOLINT(cert-dcl58-cpp) to implement ranges template< class IndexType, class IndexTypeLast > - constexpr bool enable_borrowed_range<::boost::multi::extension_t> = true; + constexpr bool enable_view<::boost::multi::extension_t> = true; } #endif From 6d25e582ff9223926e89af420a9e04f407d3e5d3 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 11:41:57 -0700 Subject: [PATCH 10/31] arthur feedback --- include/boost/multi/detail/index_range.hpp | 16 ++++++++-------- test/index_range.cpp | 4 +++- test/layout.cpp | 1 + 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/include/boost/multi/detail/index_range.hpp b/include/boost/multi/detail/index_range.hpp index b1d940c60..983eb5bc4 100644 --- a/include/boost/multi/detail/index_range.hpp +++ b/include/boost/multi/detail/index_range.hpp @@ -220,8 +220,8 @@ class range { constexpr auto operator[](difference_type n) const -> const_reference { return first() + n; } - [[nodiscard]] BOOST_MULTI_HD constexpr auto front() const -> const_reference { return first(); } - [[nodiscard]] BOOST_MULTI_HD constexpr auto back() const -> const_reference { return last() - 1; } + [[nodiscard]] BOOST_MULTI_HD constexpr auto front() const -> value_type { return first(); } + [[nodiscard]] BOOST_MULTI_HD constexpr auto back() const -> value_type { return last() - 1; } [[nodiscard]] constexpr auto cbegin() const { return const_iterator{first_}; } [[nodiscard]] constexpr auto cend() const { return const_iterator{last_}; } @@ -232,11 +232,11 @@ class range { [[nodiscard]] constexpr auto begin() const -> const_iterator { return cbegin(); } [[nodiscard]] constexpr auto end() const -> const_iterator { return cend(); } - BOOST_MULTI_HD constexpr auto is_empty() const& noexcept { return first_ == last_; } - friend BOOST_MULTI_HD constexpr auto is_empty(range const& self) noexcept { return self.is_empty(); } + BOOST_MULTI_HD constexpr auto is_empty() const noexcept { return first_ == last_; } + // friend BOOST_MULTI_HD constexpr auto is_empty(range const& self) noexcept { return self.is_empty(); } [[nodiscard]] BOOST_MULTI_HD constexpr auto empty() const& noexcept { return is_empty(); } - friend BOOST_MULTI_HD constexpr auto empty(range const& self) noexcept { return self.empty(); } + // friend BOOST_MULTI_HD constexpr auto empty(range const& self) noexcept { return self.empty(); } #ifdef __NVCC__ #pragma nv_diagnostic push @@ -249,10 +249,10 @@ class range { #pragma nv_diagnostic pop #endif - friend BOOST_MULTI_HD constexpr auto size(range const& self) noexcept -> size_type { return self.size(); } + // friend BOOST_MULTI_HD constexpr auto size(range const& self) noexcept -> size_type { return self.size(); } - friend constexpr auto begin(range const& self) { return self.begin(); } - friend constexpr auto end(range const& self) { return self.end(); } + // friend constexpr auto begin(range const& self) { return self.begin(); } + // friend constexpr auto end(range const& self) { return self.end(); } friend BOOST_MULTI_HD constexpr auto operator==(range const& self, range const& other) { return (self.empty() && other.empty()) || (self.first_ == other.first_ && self.last_ == other.last_); diff --git a/test/index_range.cpp b/test/index_range.cpp index 3f1b07b68..ae75947fa 100644 --- a/test/index_range.cpp +++ b/test/index_range.cpp @@ -76,6 +76,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro { multi::index_extension const iex(10); + using std::size; BOOST_TEST( *begin(iex) == 0 ); BOOST_TEST( size(iex) == 10 ); BOOST_TEST( iex[0] == 0 ); @@ -205,7 +206,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro multi::range, int> const irng({}, 12); // && !defined(__PGI) && (__cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)) -#if(__cplusplus >= 202002L) && (__has_cpp_attribute(no_unique_address) >= 201803L) && !defined(__NVCC__) && !defined(__NVCOMPILER) +#if (__cplusplus >= 202002L) && (__has_cpp_attribute(no_unique_address) >= 201803L) && !defined(__NVCC__) && !defined(__NVCOMPILER) static_assert(sizeof(irng) == sizeof(int)); #endif @@ -275,6 +276,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro BOOST_TEST( ext[1] == 1 ); static_assert(std::ranges::range>); + static_assert(std::ranges::range const>); static_assert(std::ranges::range>>); // std::ranges::ref_view> diff --git a/test/layout.cpp b/test/layout.cpp index c88b8d0ad..672a18150 100644 --- a/test/layout.cpp +++ b/test/layout.cpp @@ -528,6 +528,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro auto xA = extensions(arr); using std::get; // needed for C++17 + using std::size; BOOST_TEST( size(get<0>(xA)) == 3 ); BOOST_TEST( size(get<1>(xA)) == 4 ); BOOST_TEST( size(get<2>(xA)) == 5 ); From dee32a8724e7bc050bda8957e67d87999ba3b22c Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 13:56:51 -0700 Subject: [PATCH 11/31] exclude clang 15 libc++ for some range tests --- test/index_range.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/index_range.cpp b/test/index_range.cpp index ae75947fa..cf7f48bc1 100644 --- a/test/index_range.cpp +++ b/test/index_range.cpp @@ -269,6 +269,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro BOOST_TEST( *ext.begin() == 0 ); BOOST_TEST( *(ext.end() - 1) == 4 ); +#if !defined(__clang_major__) || (__clang_major__ != 15) || !defined(_LIBCPP_VERSION) #if defined(__cpp_lib_ranges) && (__cpp_lib_ranges >= 201911L) && !defined(_MSC_VER) BOOST_TEST( *std::ranges::begin(ext) == 0 ); BOOST_TEST( *(std::ranges::end(ext)-1) == 4 ); @@ -283,6 +284,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro auto rext = ext | std::views::reverse; BOOST_TEST( rext[1] == 3 ); +#endif #endif } From 26d3a2d922de69ee2b4bd91a2b48df18199e165d Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 14:25:00 -0700 Subject: [PATCH 12/31] template --- test/index_range.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/index_range.cpp b/test/index_range.cpp index cf7f48bc1..fd415a4ca 100644 --- a/test/index_range.cpp +++ b/test/index_range.cpp @@ -269,7 +269,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro BOOST_TEST( *ext.begin() == 0 ); BOOST_TEST( *(ext.end() - 1) == 4 ); -#if !defined(__clang_major__) || (__clang_major__ != 15) || !defined(_LIBCPP_VERSION) +#if !defined(__clang_major__) || (__clang_major__ != 15) #if defined(__cpp_lib_ranges) && (__cpp_lib_ranges >= 201911L) && !defined(_MSC_VER) BOOST_TEST( *std::ranges::begin(ext) == 0 ); BOOST_TEST( *(std::ranges::end(ext)-1) == 4 ); From a94f790e6c4c4747037489663c7aeb4adf6d4826 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 16:55:12 -0700 Subject: [PATCH 13/31] remove wa ranges views --- include/boost/multi/detail/index_range.hpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/include/boost/multi/detail/index_range.hpp b/include/boost/multi/detail/index_range.hpp index 983eb5bc4..b2a3c6b2d 100644 --- a/include/boost/multi/detail/index_range.hpp +++ b/include/boost/multi/detail/index_range.hpp @@ -461,13 +461,6 @@ constexpr auto contains(index_extensions const& iex, Tuple const& tup) { } // end namespace boost::multi -#if defined(__cpp_lib_ranges) && (__cpp_lib_ranges >= 201911L) && !defined(_MSC_VER) -namespace std::ranges { // NOLINT(cert-dcl58-cpp) to implement ranges - template< class IndexType, class IndexTypeLast > - constexpr bool enable_view<::boost::multi::extension_t> = true; -} -#endif - #undef BOOST_MULTI_HD #endif // BOOST_MULTI_DETAIL_INDEX_RANGE_HPP From da9c9eb5af047586f862692950c83824d95ce747 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 23:06:38 -0700 Subject: [PATCH 14/31] more headers --- test/index_range.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/index_range.cpp b/test/index_range.cpp index fd415a4ca..23d990600 100644 --- a/test/index_range.cpp +++ b/test/index_range.cpp @@ -8,6 +8,7 @@ #include #include // for equal +#include // for size #include // for accumulate #include // for vector // IWYU pragma: no_include // for tuple_element<>::type @@ -206,7 +207,7 @@ auto main() -> int { // NOLINT(readability-function-cognitive-complexity,bugpro multi::range, int> const irng({}, 12); // && !defined(__PGI) && (__cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)) -#if (__cplusplus >= 202002L) && (__has_cpp_attribute(no_unique_address) >= 201803L) && !defined(__NVCC__) && !defined(__NVCOMPILER) +#if(__cplusplus >= 202002L) && (__has_cpp_attribute(no_unique_address) >= 201803L) && !defined(__NVCC__) && !defined(__NVCOMPILER) static_assert(sizeof(irng) == sizeof(int)); #endif From 92ed631cc25c47dc0d2fa424e8fc0a7b42d87539 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 23:43:07 -0700 Subject: [PATCH 15/31] more tidy --- include/boost/multi/detail/index_range.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/boost/multi/detail/index_range.hpp b/include/boost/multi/detail/index_range.hpp index b2a3c6b2d..e9c4813e3 100644 --- a/include/boost/multi/detail/index_range.hpp +++ b/include/boost/multi/detail/index_range.hpp @@ -352,15 +352,15 @@ struct extension_t : public range { : range(IndexType{}, IndexType{} + last) {} // extension_t() = default; - extension_t(extension_t const&) = default; - extension_t(extension_t&&) = default; - auto operator=(extension_t const&) -> extension_t& = default; - auto operator=(extension_t&&) -> extension_t& = default; - ~extension_t() = default; + // extension_t(extension_t const&) = default; + // extension_t(extension_t&&) = default; + // auto operator=(extension_t const&) -> extension_t& = default; + // auto operator=(extension_t&&) -> extension_t& = default; + // ~extension_t() = default; template< class OtherExtension, - std::enable_if_t>, int> = 0, + // std::enable_if_t>, int> = 0, // NOLINT(modernize-type-traits) bug in clang-tidy decltype( detail::implicit_cast(std::declval().first()), detail::implicit_cast(std::declval().last()) @@ -380,8 +380,8 @@ struct extension_t : public range { // BOOST_MULTI_HD constexpr explicit extension_t(OtherExtension const& other) noexcept // : extension_t{other.first(), other.last()} {} - template, int> =0 // NOLINT(modernize-use-constraints,modernize-type-traits) + template, int> =0 // NOLINT(modernize-use-constraints,modernize-type-traits) > BOOST_MULTI_HD constexpr auto operator=(OtherExtension const& other) -> extension_t& { (*this) = extension_t{other}; From d5b834fcb89201384e1935eea119111033c1e46b Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Sat, 25 Oct 2025 00:51:37 -0700 Subject: [PATCH 16/31] simplify special members --- include/boost/multi/detail/index_range.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/boost/multi/detail/index_range.hpp b/include/boost/multi/detail/index_range.hpp index e9c4813e3..36d9b03a1 100644 --- a/include/boost/multi/detail/index_range.hpp +++ b/include/boost/multi/detail/index_range.hpp @@ -133,11 +133,11 @@ class range { using pointer = value_type; range() = default; - range(range const&) = default; - range(range&&) = default; - auto operator=(range const&) -> range& = default; - auto operator=(range&&) -> range& = default; - ~range() = default; + // range(range const&) = default; + // range(range&&) = default; + // auto operator=(range const&) -> range& = default; + // auto operator=(range&&) -> range& = default; + // ~range() = default; template>, int> = 0, // NOLINT(modernize-type-traits) for C++20 @@ -388,7 +388,8 @@ struct extension_t : public range { return *this; } - BOOST_MULTI_HD constexpr extension_t() noexcept : range() {} + extension_t() = default; + // BOOST_MULTI_HD constexpr extension_t() noexcept : range() {} // friend constexpr auto size(extension_t const& self) -> typename extension_t::size_type { return self.size(); } From fb67a81a63570cd3754d936a1d9e9e496b0c2c9a Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 07:36:38 +0000 Subject: [PATCH 17/31] ci use native --- .gitlab-ci-correaa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci-correaa.yml b/.gitlab-ci-correaa.yml index ccd51f0ac..a095831d5 100644 --- a/.gitlab-ci-correaa.yml +++ b/.gitlab-ci-correaa.yml @@ -814,7 +814,7 @@ cuda-12.6.3: - mkdir build && cd build - g++ --version - /usr/local/cuda/bin/nvcc --version - - CUDACXX=/usr/local/cuda/bin/nvcc cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=1 -DCMAKE_CXX_STANDARD=20 -DCMAKE_CUDA_STANDARD=20 -DCMAKE_CUDA_ARCHITECTURES=75 -DCMAKE_CUDA_HOST_COMPILER=g++ + - CUDACXX=/usr/local/cuda/bin/nvcc cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=1 -DCMAKE_CXX_STANDARD=20 -DCMAKE_CUDA_STANDARD=20 -DCMAKE_CUDA_ARCHITECTURES=native -DCMAKE_CUDA_HOST_COMPILER=g++ - cmake --build . --parallel 2 || cmake --build . --verbose - ctest || ctest --rerun-failed --output-on-failure needs: ["cuda"] From a8d5c3e2cd1c01fbae83b22b701f1fc90d3923a0 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 10:42:32 +0000 Subject: [PATCH 18/31] use native in culang + cuda 12.6 --- .gitlab-ci-correaa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci-correaa.yml b/.gitlab-ci-correaa.yml index a095831d5..98f88527c 100644 --- a/.gitlab-ci-correaa.yml +++ b/.gitlab-ci-correaa.yml @@ -882,7 +882,7 @@ culang++-19 cuda-12.6.3 tidy: # https://catalog.ngc.nvidia.com/orgs/nvidia/cont - mkdir build && cd build - clang++-19 --version - clang-tidy-19 --version - - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_FLAGS="-Wno-unknown-cuda-version" -DCMAKE_CXX_CLANG_TIDY=clang-tidy-19 -DENABLE_CUDA=1 -DCMAKE_CUDA_COMPILER=clang++-19 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CUDA_ARCHITECTURES=75 + - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_FLAGS="-Wno-unknown-cuda-version" -DCMAKE_CXX_CLANG_TIDY=clang-tidy-19 -DENABLE_CUDA=1 -DCMAKE_CUDA_COMPILER=clang++-19 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_CUDA_ARCHITECTURES=native - cmake --build . --parallel 2 || cmake --build . --verbose - ctest -j 2 --output-on-failure needs: ["cuda", "clang++"] From 896835e283bcce646a149cc2d8ba7fd6f2f67477 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 16:38:26 +0000 Subject: [PATCH 19/31] Edit .gitlab-ci-correaa.yml --- .gitlab-ci-correaa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci-correaa.yml b/.gitlab-ci-correaa.yml index 98f88527c..afe716207 100644 --- a/.gitlab-ci-correaa.yml +++ b/.gitlab-ci-correaa.yml @@ -1163,7 +1163,7 @@ qmcpack cuda-12.3.1: - cd build - nvcc --version - __nvcc_device_query - - CUDACXX=/usr/local/cuda/bin/nvcc cmake .. -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DBUILD_AFQMC=1 -DQMC_CXX_STANDARD=17 -DQMC_GPU=cuda -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCMAKE_CUDA_HOST_COMPILER=g++ -DCMAKE_CXX_FLAGS="-Wno-deprecated -Wno-deprecated-declarations" -DCMAKE_CUDA_ARCHITECTURES=75 # =80 + - CUDACXX=/usr/local/cuda/bin/nvcc cmake .. -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DBUILD_AFQMC=1 -DQMC_CXX_STANDARD=17 -DQMC_GPU=cuda -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCMAKE_CUDA_HOST_COMPILER=g++ -DCMAKE_CXX_FLAGS="-Wno-deprecated -Wno-deprecated-declarations" -DCMAKE_CUDA_ARCHITECTURES=`__nvcc_device_query` # =80 - make -j 4 ppconvert afqmc test_afqmc_matrix test_afqmc_numerics test_afqmc_slaterdeterminantoperations test_afqmc_walkers test_afqmc_hamiltonians test_afqmc_hamiltonian_operations test_afqmc_phmsd test_afqmc_wfn_factory test_afqmc_prop_factory test_afqmc_estimators qmc-afqmc-performance - OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 ctest -R ppconvert --output-on-failure - OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 ctest -R afqmc --output-on-failure From bd50d4b8d7418957e6c24f7d9028280e23682d2d Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 23:51:37 +0000 Subject: [PATCH 20/31] more native --- .gitlab-ci-correaa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci-correaa.yml b/.gitlab-ci-correaa.yml index afe716207..7d94b6a74 100644 --- a/.gitlab-ci-correaa.yml +++ b/.gitlab-ci-correaa.yml @@ -835,7 +835,7 @@ cuda-12.9.0: - mkdir build && cd build - g++ --version - /usr/local/cuda/bin/nvcc --version - - CUDACXX=/usr/local/cuda/bin/nvcc cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=1 -DCMAKE_CXX_STANDARD=20 -DCMAKE_CUDA_STANDARD=20 -DCMAKE_CUDA_ARCHITECTURES=75 -DCMAKE_CUDA_HOST_COMPILER=g++ + - CUDACXX=/usr/local/cuda/bin/nvcc cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=1 -DCMAKE_CXX_STANDARD=20 -DCMAKE_CUDA_STANDARD=20 -DCMAKE_CUDA_ARCHITECTURES=native -DCMAKE_CUDA_HOST_COMPILER=g++ - cmake --build . --verbose --parallel 2 || cmake --build . --verbose - ctest || ctest --rerun-failed --output-on-failure needs: ["g++", "clang++", "cuda"] From 7a134a5b460a0314077837ac33122ce4864ac3f7 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Fri, 24 Oct 2025 22:27:07 -0700 Subject: [PATCH 21/31] more native --- .gitlab-ci-correaa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci-correaa.yml b/.gitlab-ci-correaa.yml index 7d94b6a74..1eaccda9f 100644 --- a/.gitlab-ci-correaa.yml +++ b/.gitlab-ci-correaa.yml @@ -856,7 +856,7 @@ cuda-13.0.1: - mkdir build && cd build - g++ --version - /usr/local/cuda/bin/nvcc --version - - CUDACXX=/usr/local/cuda/bin/nvcc cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_FLAGS="-ftemplate-backtrace-limit=0" -DENABLE_CUDA=1 -DCMAKE_CXX_STANDARD=20 -DCMAKE_CUDA_STANDARD=20 -DCMAKE_CUDA_ARCHITECTURES=75 -DCMAKE_CUDA_HOST_COMPILER=g++ + - CUDACXX=/usr/local/cuda/bin/nvcc cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_FLAGS="-ftemplate-backtrace-limit=0" -DENABLE_CUDA=1 -DCMAKE_CXX_STANDARD=20 -DCMAKE_CUDA_STANDARD=20 -DCMAKE_CUDA_ARCHITECTURES=native -DCMAKE_CUDA_HOST_COMPILER=g++ - cmake --build . --verbose --parallel 2 || cmake --build . --verbose - ctest || ctest --rerun-failed --output-on-failure needs: ["g++", "clang++", "cuda"] From 5a221651d2b26d0a27ee756462db78a4cb9e2b91 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Sat, 25 Oct 2025 17:52:22 -0700 Subject: [PATCH 22/31] wa mull bug --- include/boost/multi/detail/layout.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/multi/detail/layout.hpp b/include/boost/multi/detail/layout.hpp index b1e7cd972..507aa7ab6 100644 --- a/include/boost/multi/detail/layout.hpp +++ b/include/boost/multi/detail/layout.hpp @@ -502,7 +502,7 @@ struct extensions_t : boost::multi::detail::tuple_prepend_t 0) { // mull-ignore: cxx_gt_to_ge curr_ += (rest_it_ - rest_begin_ + n) / (rest_end_ - rest_begin_); rest_it_ = rest_begin_ + ((rest_it_ - rest_begin_ + n) % (rest_end_ - rest_begin_)); - } else if(n < 0) { // mull-ignore: cxx_lt_to_ge, cxx_lt_to_le + } else if(n < 0) { // mull-ignore curr_ -= (rest_end_ - rest_it_ - n) / (rest_end_ - rest_begin_); rest_it_ = rest_end_ - ((rest_end_ - rest_it_ - n) % (rest_end_ - rest_begin_)); if(rest_it_ == rest_end_) { From 3bad6312ce570f22744fbb70ffa22cacb5b01e83 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Sat, 25 Oct 2025 01:09:51 -0700 Subject: [PATCH 23/31] more general prepush --- pre-push | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pre-push b/pre-push index 097ed47c8..b3a2a4603 100755 --- a/pre-push +++ b/pre-push @@ -8,7 +8,7 @@ # curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg # echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list # sudo apt-get update -y -# sudo apt-get install -y nvhpc-24-7 +# sudo apt-get install -y nvhpc # on Fedora: # sudo yum-config-manager --add-repo https://developer.download.nvidia.com/hpc-sdk/rhel/nvhpc.repo && sudo yum install -y nvhpc-cuda-multi-24.5 # install oneAPI @@ -47,11 +47,11 @@ export UBSAN_OPTIONS=print_stacktrack=1 if [[ $(uname -m) != 'aarch64' ]]; then clang-format-19 --dry-run -Werror include/**/*.hpp test/*.cpp - (CXX="$HOME/bin/circle" cmake -S . -B .build.circle -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=20 -DDISABLE_MPI=1 -DCMAKE_CXX_EXTENSIONS=OFF -DENABLE_CIRCLE=1 -DCMAKE_THREAD_LIBS_INIT="-lpthread" && cmake --build .build.circle $CMT && (ctest --test-dir .build.circle --parallel 8 $CTR || ctest --test-dir .build.circle --rerun-failed --output-on-failure $CTR)) || exit 666 - ( cmake -S . -B .build.nvcc.relax -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=20 -DENABLE_CUDA=1 -DCMAKE_CUDA_COMPILER=nvcc -DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr --threads 2" -DCMAKE_CUDA_HOST_COMPILER=g++ -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CUDA_ARCHITECTURES=75 && cmake --build .build.nvcc.relax $CMT && (ctest --test-dir .build.nvcc.relax `#--parallel 8` $CTR || ctest --test-dir .build.nvcc.relax --rerun-failed --output-on-failure $CTR)) || exit 666 - ( cmake -S . -B .build.nvcc -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 -DENABLE_CUDA=1 -DCMAKE_CUDA_COMPILER=nvcc -DCMAKE_CUDA_FLAGS="--threads 2" -DCMAKE_CUDA_HOST_COMPILER=g++ -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CUDA_ARCHITECTURES=75 && cmake --build .build.nvcc $CMT && (ctest --test-dir .build.nvcc --parallel 8 $CTR || ctest --test-dir .build.nvcc --rerun-failed --output-on-failure $CTR)) || exit 666 +#(CXX="$HOME/bin/circle" cmake -S . -B .build.circle -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=20 -DDISABLE_MPI=1 -DCMAKE_CXX_EXTENSIONS=OFF -DENABLE_CIRCLE=1 -DCMAKE_THREAD_LIBS_INIT="-lpthread" && cmake --build .build.circle $CMT && (ctest --test-dir .build.circle --parallel 8 $CTR || ctest --test-dir .build.circle --rerun-failed --output-on-failure $CTR)) || exit 666 + ( cmake -S . -B .build.nvcc.relax -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=20 -DENABLE_CUDA=1 -DCMAKE_CUDA_COMPILER=nvcc -DCMAKE_CUDA_FLAGS="--expt-relaxed-constexpr --threads 2" -DCMAKE_CUDA_HOST_COMPILER=g++ -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CUDA_ARCHITECTURE=native && cmake --build .build.nvcc.relax $CMT && (ctest --test-dir .build.nvcc.relax `#--parallel 8` $CTR || ctest --test-dir .build.nvcc.relax --rerun-failed --output-on-failure $CTR)) || exit 666 + ( cmake -S . -B .build.nvcc -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 -DENABLE_CUDA=1 -DCMAKE_CUDA_COMPILER=nvcc -DCMAKE_CUDA_FLAGS="--threads 2" -DCMAKE_CUDA_HOST_COMPILER=g++ -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CUDA_ARCHITECTURES=native && cmake --build .build.nvcc $CMT && (ctest --test-dir .build.nvcc --parallel 8 $CTR || ctest --test-dir .build.nvcc --rerun-failed --output-on-failure $CTR)) || exit 666 #(source /opt/intel/oneapi/setvars.sh && CXX=/opt/intel/oneapi/compiler/latest/bin/icpx cmake -S . -B .build.icpx -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20 && cmake --build .build.icpx $CMT && (ctest --test-dir .build.icpx --parallel 8 $CTR || ctest --test-dir .build.icpx --rerun-failed --output-on-failure $CTR)) || exit 666 - (CXX=/opt/nvidia/hpc_sdk/Linux_x86_64/2024/compilers/bin/nvc++ cmake -S . -B .build.nvc++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 -DBLA_PREFER_PKGCONFIG=ON -DCMAKE_CXX_COMPILER=/opt/nvidia/hpc_sdk/Linux_x86_64/2024/compilers/bin/nvc++ && cmake --build .build.nvc++ $CMT && (ctest --test-dir .build.nvc++ --parallel 8 $CTR || ctest --test-dir .build.nvc++ --rerun-failed --output-on-failure $CTR)) || exit 666 + (CXX=/opt/nvidia/hpc_sdk/Linux_x86_64/2025/compilers/bin/nvc++ cmake -S . -B .build.nvc++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 -DBLA_PREFER_PKGCONFIG=ON -DCMAKE_CXX_COMPILER=/opt/nvidia/hpc_sdk/Linux_x86_64/2025/compilers/bin/nvc++ && cmake --build .build.nvc++ $CMT && (ctest --test-dir .build.nvc++ --parallel 8 $CTR || ctest --test-dir .build.nvc++ --rerun-failed --output-on-failure $CTR)) || exit 666 ( cmake -S . -B .build.culang -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=1 -DCMAKE_CUDA_COMPILER=clang++-19 -DCMAKE_CUDA_HOST_COMPILER=clang++-19 -DCMAKE_CXX_COMPILER=clang++-19 && cmake --build .build.culang $CMT && (ctest --test-dir .build.culang --parallel 8 $CTR || ctest --test-dir .build.culang --rerun-failed --output-on-failure $CTR)) || exit 666 fi From 448cd793381d9534bccc2952c587ad019b8ed6a7 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Sat, 25 Oct 2025 18:30:47 -0700 Subject: [PATCH 24/31] more mull --- include/boost/multi/detail/layout.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/multi/detail/layout.hpp b/include/boost/multi/detail/layout.hpp index 507aa7ab6..f5199dc16 100644 --- a/include/boost/multi/detail/layout.hpp +++ b/include/boost/multi/detail/layout.hpp @@ -521,7 +521,7 @@ struct extensions_t : boost::multi::detail::tuple_prepend_t Date: Sat, 25 Oct 2025 20:46:44 -0700 Subject: [PATCH 25/31] native for qmc --- .gitlab-ci-correaa.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci-correaa.yml b/.gitlab-ci-correaa.yml index 1eaccda9f..6166edb3c 100644 --- a/.gitlab-ci-correaa.yml +++ b/.gitlab-ci-correaa.yml @@ -1144,7 +1144,7 @@ qmcpack: qmcpack cuda-12.3.1: stage: test - image: nvcr.io/nvidia/cuda:12.3.1-devel-ubuntu22.04 + image: nvcr.io/nvidia/cuda:12.3.1-devel-ubuntu24.04 tags: - non-shared - nvidia-gpu @@ -1163,7 +1163,7 @@ qmcpack cuda-12.3.1: - cd build - nvcc --version - __nvcc_device_query - - CUDACXX=/usr/local/cuda/bin/nvcc cmake .. -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DBUILD_AFQMC=1 -DQMC_CXX_STANDARD=17 -DQMC_GPU=cuda -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCMAKE_CUDA_HOST_COMPILER=g++ -DCMAKE_CXX_FLAGS="-Wno-deprecated -Wno-deprecated-declarations" -DCMAKE_CUDA_ARCHITECTURES=`__nvcc_device_query` # =80 + - CUDACXX=/usr/local/cuda/bin/nvcc cmake .. -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DBUILD_AFQMC=1 -DQMC_CXX_STANDARD=17 -DQMC_GPU=cuda -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCMAKE_CUDA_HOST_COMPILER=g++ -DCMAKE_CXX_FLAGS="-Wno-deprecated -Wno-deprecated-declarations" -DCMAKE_CUDA_ARCHITECTURES=native # =80 - make -j 4 ppconvert afqmc test_afqmc_matrix test_afqmc_numerics test_afqmc_slaterdeterminantoperations test_afqmc_walkers test_afqmc_hamiltonians test_afqmc_hamiltonian_operations test_afqmc_phmsd test_afqmc_wfn_factory test_afqmc_prop_factory test_afqmc_estimators qmc-afqmc-performance - OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 ctest -R ppconvert --output-on-failure - OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 ctest -R afqmc --output-on-failure From 58bb12d6ea757e30a5e90bc25519c39cec957823 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Sat, 25 Oct 2025 21:29:42 -0700 Subject: [PATCH 26/31] if not present policy --- .gitlab-ci-correaa.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci-correaa.yml b/.gitlab-ci-correaa.yml index 6166edb3c..bee79ae15 100644 --- a/.gitlab-ci-correaa.yml +++ b/.gitlab-ci-correaa.yml @@ -1145,6 +1145,7 @@ qmcpack: qmcpack cuda-12.3.1: stage: test image: nvcr.io/nvidia/cuda:12.3.1-devel-ubuntu24.04 + pull_policy: [always, if-not-present] tags: - non-shared - nvidia-gpu From 185d4e1528932433820eed62f43ac6213d230d8d Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Sat, 25 Oct 2025 21:32:58 -0700 Subject: [PATCH 27/31] fix typo --- .gitlab-ci-correaa.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci-correaa.yml b/.gitlab-ci-correaa.yml index bee79ae15..3f1d93bc0 100644 --- a/.gitlab-ci-correaa.yml +++ b/.gitlab-ci-correaa.yml @@ -1144,7 +1144,8 @@ qmcpack: qmcpack cuda-12.3.1: stage: test - image: nvcr.io/nvidia/cuda:12.3.1-devel-ubuntu24.04 + image: + name: nvcr.io/nvidia/cuda:12.3.1-devel-ubuntu24.04 pull_policy: [always, if-not-present] tags: - non-shared From 8fc6952dd2b0d49d1b50c9aeb9294efeb767ed39 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Sat, 25 Oct 2025 22:36:13 -0700 Subject: [PATCH 28/31] cuda arch req --- .gitlab-ci-correaa.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci-correaa.yml b/.gitlab-ci-correaa.yml index 3f1d93bc0..e168b092d 100644 --- a/.gitlab-ci-correaa.yml +++ b/.gitlab-ci-correaa.yml @@ -847,6 +847,7 @@ cuda-13.0.1: tags: - non-shared - nvidia-gpu + - cuda-arch-75-plus interruptible: true script: - nvidia-smi From f0e7c2e2494034c54718f6b0c670ba65859f19da Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Sat, 25 Oct 2025 22:38:32 -0700 Subject: [PATCH 29/31] demand arch75 --- .gitlab-ci-correaa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci-correaa.yml b/.gitlab-ci-correaa.yml index e168b092d..4d3799775 100644 --- a/.gitlab-ci-correaa.yml +++ b/.gitlab-ci-correaa.yml @@ -847,7 +847,7 @@ cuda-13.0.1: tags: - non-shared - nvidia-gpu - - cuda-arch-75-plus + - arch75 interruptible: true script: - nvidia-smi From a74dfc8e30b0f809443d6028fa879a5ba70d1563 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Sun, 26 Oct 2025 00:42:14 -0700 Subject: [PATCH 30/31] qmc cuda 12.9 --- .gitlab-ci-correaa.yml | 43 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/.gitlab-ci-correaa.yml b/.gitlab-ci-correaa.yml index 4d3799775..6e3e92a8d 100644 --- a/.gitlab-ci-correaa.yml +++ b/.gitlab-ci-correaa.yml @@ -819,26 +819,26 @@ cuda-12.6.3: - ctest || ctest --rerun-failed --output-on-failure needs: ["cuda"] -cuda-12.9.0: - stage: build - allow_failure: false - image: nvcr.io/nvidia/cuda:12.9.0-devel-ubuntu24.04 # https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuda/tags - tags: - - non-shared - - nvidia-gpu - interruptible: true - script: - - nvidia-smi - - apt-get -qq update - - apt-get install --no-install-recommends -y cmake g++ wget pkg-config make libboost-serialization-dev libboost-timer-dev libblas-dev libfftw3-dev - - cmake --version - - mkdir build && cd build - - g++ --version - - /usr/local/cuda/bin/nvcc --version - - CUDACXX=/usr/local/cuda/bin/nvcc cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=1 -DCMAKE_CXX_STANDARD=20 -DCMAKE_CUDA_STANDARD=20 -DCMAKE_CUDA_ARCHITECTURES=native -DCMAKE_CUDA_HOST_COMPILER=g++ - - cmake --build . --verbose --parallel 2 || cmake --build . --verbose - - ctest || ctest --rerun-failed --output-on-failure - needs: ["g++", "clang++", "cuda"] +# cuda-12.9.0: +# stage: build +# allow_failure: false +# image: nvcr.io/nvidia/cuda:12.9.0-devel-ubuntu24.04 # https://catalog.ngc.nvidia.com/orgs/nvidia/containers/cuda/tags +# tags: +# - non-shared +# - nvidia-gpu +# interruptible: true +# script: +# - nvidia-smi +# - apt-get -qq update +# - apt-get install --no-install-recommends -y cmake g++ wget pkg-config make libboost-serialization-dev libboost-timer-dev libblas-dev libfftw3-dev +# - cmake --version +# - mkdir build && cd build +# - g++ --version +# - /usr/local/cuda/bin/nvcc --version +# - CUDACXX=/usr/local/cuda/bin/nvcc cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=1 -DCMAKE_CXX_STANDARD=20 -DCMAKE_CUDA_STANDARD=20 -DCMAKE_CUDA_ARCHITECTURES=native -DCMAKE_CUDA_HOST_COMPILER=g++ +# - cmake --build . --verbose --parallel 2 || cmake --build . --verbose +# - ctest || ctest --rerun-failed --output-on-failure +# needs: ["g++", "clang++", "cuda"] cuda-13.0.1: stage: build @@ -1146,8 +1146,7 @@ qmcpack: qmcpack cuda-12.3.1: stage: test image: - name: nvcr.io/nvidia/cuda:12.3.1-devel-ubuntu24.04 - pull_policy: [always, if-not-present] + name: nvcr.io/nvidia/cuda:12.9.0-devel-ubuntu24.04 # nvcr.io/nvidia/cuda:12.3.1-devel-ubuntu24.04 tags: - non-shared - nvidia-gpu From f405066a676091bf2bc40e4713b3209fd5ec6cd5 Mon Sep 17 00:00:00 2001 From: Alfredo Correa Date: Sun, 26 Oct 2025 04:00:32 -0700 Subject: [PATCH 31/31] allow fail cuda qmc --- .gitlab-ci-correaa.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci-correaa.yml b/.gitlab-ci-correaa.yml index 6e3e92a8d..1246f958d 100644 --- a/.gitlab-ci-correaa.yml +++ b/.gitlab-ci-correaa.yml @@ -1152,6 +1152,7 @@ qmcpack cuda-12.3.1: - nvidia-gpu - high-bandwidth interruptible: true + allow_failure: true before_script: - apt-get -qq update && apt-get -qq install --no-install-recommends -y ca-certificates cmake git libopenmpi-dev cmake g++ git gfortran libblas-dev libboost-serialization-dev libfftw3-dev libhdf5-dev liblapack-dev libopenmpi-dev make numdiff pkg-config python3 python3-h5py python3-numpy python3-mpi4py python3-scipy libxml2-dev script: