Update Kokkos library in LAMMPS to v4.2.1

This commit is contained in:
Stan Gerald Moore
2024-03-06 14:58:06 -07:00
parent 9d9dbc1fa8
commit 6cc9a4c7b7
32 changed files with 121 additions and 64 deletions

View File

@ -198,8 +198,9 @@ auto create_deep_copyable_compatible_view_with_same_extent(ViewType view) {
// this is needed for intel to avoid
// error #1011: missing return statement at end of non-void function
#if defined KOKKOS_COMPILER_INTEL || \
(defined(KOKKOS_COMPILER_NVCC) && KOKKOS_COMPILER_NVCC >= 1130)
#if defined KOKKOS_COMPILER_INTEL || \
(defined(KOKKOS_COMPILER_NVCC) && KOKKOS_COMPILER_NVCC >= 1130 && \
!defined(KOKKOS_COMPILER_MSVC))
__builtin_unreachable();
#endif
}

View File

@ -139,7 +139,7 @@ void test_A(std::size_t numTeams, std::size_t numCols, int apiId) {
auto intraTeamSentinelView_h = create_host_space_copy(intraTeamSentinelView);
Kokkos::View<ValueType**, Kokkos::HostSpace> stdDestView("stdDestView",
numTeams, numCols);
GreaterThanValueFunctor predicate(threshold);
GreaterThanValueFunctor<ValueType> predicate(threshold);
for (std::size_t i = 0; i < sourceView.extent(0); ++i) {
auto rowFrom = Kokkos::subview(sourceViewBeforeOp_h, i, Kokkos::ALL());
auto rowDest = Kokkos::subview(stdDestView, i, Kokkos::ALL());

View File

@ -191,7 +191,7 @@ void test_A(std::size_t numTeams, std::size_t numCols, int apiId,
// -----------------------------------------------
auto returnView_h = create_host_space_copy(returnView);
auto intraTeamSentinelView_h = create_host_space_copy(intraTeamSentinelView);
GreaterThanValueFunctor predicate(threshold);
GreaterThanValueFunctor<ValueType> predicate(threshold);
for (std::size_t i = 0; i < dataView_dc_h.extent(0); ++i) {
auto myRow = Kokkos::subview(dataView_dc_h, i, Kokkos::ALL());

View File

@ -240,7 +240,7 @@ void test_A(std::size_t numTeams, std::size_t numCols, int apiId,
"stdDestTrueView", numTeams, numCols);
Kokkos::View<ValueType**, Kokkos::HostSpace> stdDestFalseView(
"stdDestFalseView", numTeams, numCols);
GreaterThanValueFunctor predicate(threshold);
GreaterThanValueFunctor<ValueType> predicate(threshold);
for (std::size_t i = 0; i < sourceView_dc_h.extent(0); ++i) {
auto myRowSource = Kokkos::subview(sourceView_dc_h, i, Kokkos::ALL());

View File

@ -197,7 +197,7 @@ void test_A(std::size_t numTeams, std::size_t numCols, int apiId,
auto distancesView_h = create_host_space_copy(distancesView);
auto dataViewAfterOp_h = create_host_space_copy(dataView);
auto intraTeamSentinelView_h = create_host_space_copy(intraTeamSentinelView);
GreaterThanValueFunctor predicate(threshold);
GreaterThanValueFunctor<ValueType> predicate(threshold);
for (std::size_t i = 0; i < dataView_dc_h.extent(0); ++i) {
auto myRow = Kokkos::subview(dataView_dc_h, i, Kokkos::ALL());

View File

@ -138,7 +138,7 @@ void test_A(std::size_t numTeams, std::size_t numCols, int apiId) {
auto intraTeamSentinelView_h = create_host_space_copy(intraTeamSentinelView);
Kokkos::View<ValueType**, Kokkos::HostSpace> stdDestView("stdDestView",
numTeams, numCols);
GreaterThanValueFunctor predicate(threshold);
GreaterThanValueFunctor<ValueType> predicate(threshold);
for (std::size_t i = 0; i < destViewAfterOp_h.extent(0); ++i) {
auto rowFrom =
Kokkos::subview(cloneOfSourceViewBeforeOp_h, i, Kokkos::ALL());

View File

@ -127,7 +127,7 @@ void test_A(std::size_t numTeams, std::size_t numCols, int apiId) {
// -----------------------------------------------
// check against std
// -----------------------------------------------
GreaterThanValueFunctor predicate(threshold);
GreaterThanValueFunctor<ValueType> predicate(threshold);
auto dataViewAfterOp_h = create_host_space_copy(dataView);
auto distancesView_h = create_host_space_copy(distancesView);
auto intraTeamSentinelView_h = create_host_space_copy(intraTeamSentinelView);

View File

@ -145,7 +145,7 @@ void test_A(std::size_t numTeams, std::size_t numCols, int apiId) {
auto intraTeamSentinelView_h = create_host_space_copy(intraTeamSentinelView);
Kokkos::View<ValueType**, Kokkos::HostSpace> stdDestView("stdDestView",
numTeams, numCols);
GreaterThanValueFunctor predicate(threshold);
GreaterThanValueFunctor<ValueType> predicate(threshold);
for (std::size_t i = 0; i < sourceView.extent(0); ++i) {
auto rowFrom =
Kokkos::subview(cloneOfSourceViewBeforeOp_h, i, Kokkos::ALL());

View File

@ -103,7 +103,7 @@ void test_A(std::size_t numTeams, std::size_t numCols, int apiId) {
stdDataView(i, j) = cloneOfDataViewBeforeOp_h(i, j);
}
}
GreaterThanValueFunctor predicate(threshold);
GreaterThanValueFunctor<ValueType> predicate(threshold);
for (std::size_t i = 0; i < dataView.extent(0); ++i) {
auto thisRow = Kokkos::subview(stdDataView, i, Kokkos::ALL());
std::replace_if(KE::begin(thisRow), KE::end(thisRow), predicate, newVal);