From 4152e0a9509161b4509a3014024699d7b516dae7 Mon Sep 17 00:00:00 2001 From: Jonah Miller Date: Thu, 2 Oct 2025 18:35:53 -0400 Subject: [PATCH 1/2] update gpu compatibility patch for inline builds to match the patch in spackage --- utils/gpu_compatibility.patch | 57 ++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/utils/gpu_compatibility.patch b/utils/gpu_compatibility.patch index bae84184fab..6d843d74e7a 100644 --- a/utils/gpu_compatibility.patch +++ b/utils/gpu_compatibility.patch @@ -1,5 +1,5 @@ diff --git a/include/mpark/variant.hpp b/include/mpark/variant.hpp -index 2364c7360..7877e0a30 100644 +index 2fb2ac549..2a4bf016d 100644 --- a/include/mpark/variant.hpp +++ b/include/mpark/variant.hpp @@ -8,6 +8,12 @@ @@ -26,7 +26,7 @@ index 2364c7360..7877e0a30 100644 #include #include #include -@@ -243,9 +253,11 @@ namespace mpark { +@@ -244,9 +254,11 @@ namespace mpark { virtual const char *what() const noexcept override { return "bad_variant_access"; } }; @@ -40,7 +40,7 @@ index 2364c7360..7877e0a30 100644 #else std::terminate(); MPARK_BUILTIN_UNREACHABLE; -@@ -1022,7 +1034,7 @@ namespace mpark { +@@ -1023,7 +1035,7 @@ namespace mpark { MPARK_VARIANT_RECURSIVE_UNION(Trait::TriviallyAvailable, ~recursive_union() = default;); @@ -49,13 +49,16 @@ index 2364c7360..7877e0a30 100644 ~recursive_union() {}); MPARK_VARIANT_RECURSIVE_UNION(Trait::Unavailable, ~recursive_union() = delete;); -@@ -1119,14 +1131,14 @@ namespace mpark { +@@ -1126,16 +1138,16 @@ namespace mpark { + } + MPARK_VARIANT_DESTRUCTOR( - Trait::TriviallyAvailable, +- Trait::TriviallyAvailable, ++ Trait::TriviallyAvailable,V_GPU_FUNCTION ~destructor() = default;, - inline void destroy() noexcept { + inline constexpr void destroy() noexcept { - this->index_ = static_cast(-1); + this->index_ = static_cast>(-1); }); MPARK_VARIANT_DESTRUCTOR( @@ -67,7 +70,7 @@ index 2364c7360..7877e0a30 100644 if (!this->valueless_by_exception()) { visitation::alt::visit_alt(dtor{}, *this); } -@@ -1160,14 +1172,14 @@ namespace mpark { +@@ -1169,14 +1181,14 @@ namespace mpark { #endif template @@ -84,7 +87,7 @@ index 2364c7360..7877e0a30 100644 lhs.destroy(); if (!rhs.valueless_by_exception()) { visitation::alt::visit_alt_at( -@@ -1214,7 +1226,7 @@ namespace mpark { +@@ -1223,7 +1235,7 @@ namespace mpark { MPARK_VARIANT_MOVE_CONSTRUCTOR( Trait::Available, @@ -93,7 +96,7 @@ index 2364c7360..7877e0a30 100644 lib::all::value...>::value) : move_constructor(valueless_t{}) { this->generic_construct(*this, lib::move(that)); -@@ -1252,7 +1264,7 @@ namespace mpark { +@@ -1261,7 +1273,7 @@ namespace mpark { MPARK_VARIANT_COPY_CONSTRUCTOR( Trait::Available, @@ -102,7 +105,7 @@ index 2364c7360..7877e0a30 100644 : copy_constructor(valueless_t{}) { this->generic_construct(*this, that); }); -@@ -1272,7 +1284,7 @@ namespace mpark { +@@ -1281,7 +1293,7 @@ namespace mpark { using super::operator=; template @@ -111,7 +114,7 @@ index 2364c7360..7877e0a30 100644 -> decltype(this->construct_alt(access::base::get_alt(*this), lib::forward(args)...)) { this->destroy(); -@@ -1295,7 +1307,7 @@ namespace mpark { +@@ -1304,7 +1316,7 @@ namespace mpark { #endif template @@ -120,7 +123,7 @@ index 2364c7360..7877e0a30 100644 if (this->index() == I) { #ifdef _MSC_VER #pragma warning(push) -@@ -1307,10 +1319,10 @@ namespace mpark { +@@ -1316,10 +1328,10 @@ namespace mpark { #endif } else { struct { @@ -133,7 +136,7 @@ index 2364c7360..7877e0a30 100644 this_->emplace(T(lib::forward(arg_))); } assignment *this_; -@@ -1323,7 +1335,7 @@ namespace mpark { +@@ -1332,7 +1344,7 @@ namespace mpark { } template @@ -142,7 +145,7 @@ index 2364c7360..7877e0a30 100644 if (this->valueless_by_exception() && that.valueless_by_exception()) { // do nothing. } else if (that.valueless_by_exception()) { -@@ -1372,7 +1384,7 @@ namespace mpark { +@@ -1381,7 +1393,7 @@ namespace mpark { MPARK_VARIANT_MOVE_ASSIGNMENT( Trait::Available, @@ -151,7 +154,7 @@ index 2364c7360..7877e0a30 100644 operator=(move_assignment &&that) noexcept( lib::all<(std::is_nothrow_move_constructible::value && std::is_nothrow_move_assignable::value)...>::value) { -@@ -1412,7 +1424,7 @@ namespace mpark { +@@ -1421,7 +1433,7 @@ namespace mpark { MPARK_VARIANT_COPY_ASSIGNMENT( Trait::Available, @@ -160,8 +163,8 @@ index 2364c7360..7877e0a30 100644 this->generic_assign(that); return *this; }); -@@ -1432,7 +1444,7 @@ namespace mpark { - using super::operator=; +@@ -1447,7 +1459,7 @@ namespace mpark { + impl &operator=(impl &&) = default; template - inline void assign(Arg &&arg) { @@ -169,7 +172,7 @@ index 2364c7360..7877e0a30 100644 this->assign_alt(access::base::get_alt(*this), lib::forward(arg)); } -@@ -1484,7 +1496,7 @@ namespace mpark { +@@ -1499,7 +1511,7 @@ namespace mpark { #ifndef MPARK_GENERIC_LAMBDAS struct swapper { template @@ -178,7 +181,7 @@ index 2364c7360..7877e0a30 100644 using std::swap; swap(this_alt.value, that_alt.value); } -@@ -1640,8 +1652,8 @@ namespace mpark { +@@ -1694,8 +1706,8 @@ namespace mpark { ~variant() = default; @@ -189,7 +192,7 @@ index 2364c7360..7877e0a30 100644 template , variant>::value, -@@ -1651,7 +1663,7 @@ namespace mpark { +@@ -1705,7 +1717,7 @@ namespace mpark { lib::enable_if_t<(std::is_assignable::value && std::is_constructible::value), int> = 0> @@ -198,7 +201,7 @@ index 2364c7360..7877e0a30 100644 (std::is_nothrow_assignable::value && std::is_nothrow_constructible::value)) { impl_.template assign(lib::forward(arg)); -@@ -1663,7 +1675,7 @@ namespace mpark { +@@ -1717,7 +1729,7 @@ namespace mpark { typename... Args, typename T = lib::type_pack_element_t, lib::enable_if_t::value, int> = 0> @@ -207,7 +210,7 @@ index 2364c7360..7877e0a30 100644 return impl_.template emplace(lib::forward(args)...); } -@@ -1676,7 +1688,7 @@ namespace mpark { +@@ -1730,7 +1742,7 @@ namespace mpark { std::initializer_list &, Args...>::value, int> = 0> @@ -216,7 +219,7 @@ index 2364c7360..7877e0a30 100644 return impl_.template emplace(il, lib::forward(args)...); } -@@ -1685,7 +1697,7 @@ namespace mpark { +@@ -1739,7 +1751,7 @@ namespace mpark { typename... Args, std::size_t I = detail::find_index_sfinae::value, lib::enable_if_t::value, int> = 0> @@ -225,7 +228,7 @@ index 2364c7360..7877e0a30 100644 return impl_.template emplace(lib::forward(args)...); } -@@ -1698,7 +1710,7 @@ namespace mpark { +@@ -1752,7 +1764,7 @@ namespace mpark { std::initializer_list &, Args...>::value, int> = 0> @@ -234,7 +237,7 @@ index 2364c7360..7877e0a30 100644 return impl_.template emplace(il, lib::forward(args)...); } -@@ -1718,7 +1730,7 @@ namespace mpark { +@@ -1772,7 +1784,7 @@ namespace mpark { lib::dependent_type, Dummy>::value)...>::value, int> = 0> @@ -243,7 +246,7 @@ index 2364c7360..7877e0a30 100644 lib::all<(std::is_nothrow_move_constructible::value && lib::is_nothrow_swappable::value)...>::value) { impl_.swap(that.impl_); -@@ -2039,7 +2051,7 @@ namespace mpark { +@@ -2093,7 +2105,7 @@ namespace mpark { #endif template @@ -252,7 +255,7 @@ index 2364c7360..7877e0a30 100644 variant &rhs) noexcept(noexcept(lhs.swap(rhs))) -> decltype(lhs.swap(rhs)) { lhs.swap(rhs); -@@ -2143,5 +2155,6 @@ namespace std { +@@ -2197,5 +2209,6 @@ namespace std { }; } // namespace std From 4e0253d43d6b6e60f65034f0d5c6ee92f0b5c382 Mon Sep 17 00:00:00 2001 From: Jonah Miller Date: Thu, 2 Oct 2025 18:45:49 -0400 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b754f8a4e8..cf049b57bfa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - [[PR564]](https://github.com/lanl/singularity-eos/pull/564) Removed Get() function from IndexableTypes since it could have unexpected consequences when a type wasn't present ### Fixed (Repair bugs, etc) +- [[PR574]](https://github.com/lanl/singularity-eos/pull/574) Update gpu compatibility patch for variant for in-tree builds - [[PR567]](https://github.com/lanl/singularity-eos/pull/567) Fixed an OOB array access bug in the Fixed T PTE solver - [[PR561]](https://github.com/lanl/singularity-eos/pull/561) Fix logic for kokkos-kernels in spackage so that it is only required for closure models on GPU - [[PR563]](https://github.com/lanl/singularity-eos/pull/563) Fixed DensityFromPressureTemperature for the Carnahan-Starling EOS.