From 8173fc1ce9ffc718a365c3843148d1e56965cdd4 Mon Sep 17 00:00:00 2001 From: Emily Bourne Date: Mon, 8 Apr 2024 14:09:39 +0000 Subject: [PATCH] Upgrade Kokkos to version 4.3.00 Closes #182 See merge request gysela-developpers/gyselalibxx!450 -------------------------------------------- --- .../poisson/chargedensitycalculator.cpp | 18 ------------------ vendor/kokkos | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/geometryXYVxVy/poisson/chargedensitycalculator.cpp b/src/geometryXYVxVy/poisson/chargedensitycalculator.cpp index 1c6ebcd33..fb75cebf7 100644 --- a/src/geometryXYVxVy/poisson/chargedensitycalculator.cpp +++ b/src/geometryXYVxVy/poisson/chargedensitycalculator.cpp @@ -52,23 +52,6 @@ void ChargeDensityCalculator::operator()(DSpanXY rho, DViewSpXYVxVy allfdistribu const int ix = idx / ny; const int iy = idx % ny; double teamSum = 0; - Kokkos::parallel_reduce( - Kokkos::TeamThreadRange(team, nsp * nvx * nvy), - [&](int thread_idx, double& sum) { - int isp = thread_idx / (nvx * nvy); - thread_idx -= isp * (nvx * nvy); - int ivx = thread_idx / nvy; - int ivy = thread_idx % nvy; - sum += static_cast(charges(isp)) * coef_view(ivx, ivy) - * allfdistribu_view(isp, ix, iy, ivx, ivy); - }, - teamSum); - /* - * The code below is cleaner but currently only works on kokkos's develop branch (as of 15/03/24) - * The associated issue is : https://github.com/kokkos/kokkos/issues/6530 - * After the next release of Kokkos this code should be uncommented to replace the more - * verbose version above. - * Kokkos::parallel_reduce( Kokkos::TeamThreadMDRange(team, nsp, nvx, nvy), [&](int isp, int ivx, int ivy, double& sum) { @@ -76,7 +59,6 @@ void ChargeDensityCalculator::operator()(DSpanXY rho, DViewSpXYVxVy allfdistribu * allfdistribu_view(isp, ix, iy, ivx, ivy); }, teamSum); - */ rho_view(ix, iy) = chargedens_adiabspecies + teamSum; }); Kokkos::Profiling::popRegion(); diff --git a/vendor/kokkos b/vendor/kokkos index 1a3ea28f6..486cc745c 160000 --- a/vendor/kokkos +++ b/vendor/kokkos @@ -1 +1 @@ -Subproject commit 1a3ea28f6e97b4c9dd2c8ceed53ad58ed5f94dfe +Subproject commit 486cc745cb9a287f3915061455105a3ee588c616