Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
57 changes: 30 additions & 27 deletions utils/gpu_compatibility.patch
Original file line number Diff line number Diff line change
@@ -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 @@
Expand All @@ -26,7 +26,7 @@ index 2364c7360..7877e0a30 100644
#include <cstddef>
#include <exception>
#include <functional>
@@ -243,9 +253,11 @@ namespace mpark {
@@ -244,9 +254,11 @@ namespace mpark {
virtual const char *what() const noexcept override { return "bad_variant_access"; }
};

Expand All @@ -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;);
Expand All @@ -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<index_t>(-1);
this->index_ = static_cast<index_t<Ts...>>(-1);
});

MPARK_VARIANT_DESTRUCTOR(
Expand All @@ -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 <std::size_t I, typename T, typename... Args>
Expand All @@ -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,
Expand All @@ -93,7 +96,7 @@ index 2364c7360..7877e0a30 100644
lib::all<std::is_nothrow_move_constructible<Ts>::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,
Expand All @@ -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 <std::size_t I, typename... Args>
Expand All @@ -111,7 +114,7 @@ index 2364c7360..7877e0a30 100644
-> decltype(this->construct_alt(access::base::get_alt<I>(*this),
lib::forward<Args>(args)...)) {
this->destroy();
@@ -1295,7 +1307,7 @@ namespace mpark {
@@ -1304,7 +1316,7 @@ namespace mpark {
#endif

template <std::size_t I, typename T, typename Arg>
Expand All @@ -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 {
Expand All @@ -133,7 +136,7 @@ index 2364c7360..7877e0a30 100644
this_->emplace<I>(T(lib::forward<Arg>(arg_)));
}
assignment *this_;
@@ -1323,7 +1335,7 @@ namespace mpark {
@@ -1332,7 +1344,7 @@ namespace mpark {
}

template <typename That>
Expand All @@ -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,
Expand All @@ -151,7 +154,7 @@ index 2364c7360..7877e0a30 100644
operator=(move_assignment &&that) noexcept(
lib::all<(std::is_nothrow_move_constructible<Ts>::value &&
std::is_nothrow_move_assignable<Ts>::value)...>::value) {
@@ -1412,7 +1424,7 @@ namespace mpark {
@@ -1421,7 +1433,7 @@ namespace mpark {

MPARK_VARIANT_COPY_ASSIGNMENT(
Trait::Available,
Expand All @@ -160,16 +163,16 @@ 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 <std::size_t I, typename Arg>
- inline void assign(Arg &&arg) {
+ inline constexpr void assign(Arg &&arg) {
this->assign_alt(access::base::get_alt<I>(*this),
lib::forward<Arg>(arg));
}
@@ -1484,7 +1496,7 @@ namespace mpark {
@@ -1499,7 +1511,7 @@ namespace mpark {
#ifndef MPARK_GENERIC_LAMBDAS
struct swapper {
template <typename ThisAlt, typename ThatAlt>
Expand All @@ -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;

Expand All @@ -189,7 +192,7 @@ index 2364c7360..7877e0a30 100644

template <typename Arg,
lib::enable_if_t<!std::is_same<lib::decay_t<Arg>, variant>::value,
@@ -1651,7 +1663,7 @@ namespace mpark {
@@ -1705,7 +1717,7 @@ namespace mpark {
lib::enable_if_t<(std::is_assignable<T &, Arg>::value &&
std::is_constructible<T, Arg>::value),
int> = 0>
Expand All @@ -198,7 +201,7 @@ index 2364c7360..7877e0a30 100644
(std::is_nothrow_assignable<T &, Arg>::value &&
std::is_nothrow_constructible<T, Arg>::value)) {
impl_.template assign<I>(lib::forward<Arg>(arg));
@@ -1663,7 +1675,7 @@ namespace mpark {
@@ -1717,7 +1729,7 @@ namespace mpark {
typename... Args,
typename T = lib::type_pack_element_t<I, Ts...>,
lib::enable_if_t<std::is_constructible<T, Args...>::value, int> = 0>
Expand All @@ -207,7 +210,7 @@ index 2364c7360..7877e0a30 100644
return impl_.template emplace<I>(lib::forward<Args>(args)...);
}

@@ -1676,7 +1688,7 @@ namespace mpark {
@@ -1730,7 +1742,7 @@ namespace mpark {
std::initializer_list<Up> &,
Args...>::value,
int> = 0>
Expand All @@ -216,7 +219,7 @@ index 2364c7360..7877e0a30 100644
return impl_.template emplace<I>(il, lib::forward<Args>(args)...);
}

@@ -1685,7 +1697,7 @@ namespace mpark {
@@ -1739,7 +1751,7 @@ namespace mpark {
typename... Args,
std::size_t I = detail::find_index_sfinae<T, Ts...>::value,
lib::enable_if_t<std::is_constructible<T, Args...>::value, int> = 0>
Expand All @@ -225,7 +228,7 @@ index 2364c7360..7877e0a30 100644
return impl_.template emplace<I>(lib::forward<Args>(args)...);
}

@@ -1698,7 +1710,7 @@ namespace mpark {
@@ -1752,7 +1764,7 @@ namespace mpark {
std::initializer_list<Up> &,
Args...>::value,
int> = 0>
Expand All @@ -234,7 +237,7 @@ index 2364c7360..7877e0a30 100644
return impl_.template emplace<I>(il, lib::forward<Args>(args)...);
}

@@ -1718,7 +1730,7 @@ namespace mpark {
@@ -1772,7 +1784,7 @@ namespace mpark {
lib::dependent_type<lib::is_swappable<Ts>,
Dummy>::value)...>::value,
int> = 0>
Expand All @@ -243,7 +246,7 @@ index 2364c7360..7877e0a30 100644
lib::all<(std::is_nothrow_move_constructible<Ts>::value &&
lib::is_nothrow_swappable<Ts>::value)...>::value) {
impl_.swap(that.impl_);
@@ -2039,7 +2051,7 @@ namespace mpark {
@@ -2093,7 +2105,7 @@ namespace mpark {
#endif

template <typename... Ts>
Expand All @@ -252,7 +255,7 @@ index 2364c7360..7877e0a30 100644
variant<Ts...> &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
Expand Down