Skip to content

Commit

Permalink
Upgrade Kokkos to version 4.3.00
Browse files Browse the repository at this point in the history
Closes #182

See merge request gysela-developpers/gyselalibxx!450

--------------------------------------------
  • Loading branch information
EmilyBourne committed Apr 8, 2024
1 parent f72de65 commit 8173fc1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
18 changes: 0 additions & 18 deletions src/geometryXYVxVy/poisson/chargedensitycalculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,13 @@ 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<double>(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) {
sum += static_cast<double>(charges(isp)) * coef_view(ivx, ivy)
* allfdistribu_view(isp, ix, iy, ivx, ivy);
},
teamSum);
*/
rho_view(ix, iy) = chargedens_adiabspecies + teamSum;
});
Kokkos::Profiling::popRegion();
Expand Down
2 changes: 1 addition & 1 deletion vendor/kokkos
Submodule kokkos updated 721 files

0 comments on commit 8173fc1

Please sign in to comment.