Skip to content

Commit

Permalink
EAMxx: fix usage of code deprecated in Kokkos 4
Browse files Browse the repository at this point in the history
  • Loading branch information
bartgol committed Jun 13, 2024
1 parent d58467b commit 76cbb78
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ do_remap_fwd()

using TeamPolicy = typename KT::TeamTagPolicy<RemapFwdTag>;

const auto concurrency = KT::ExeSpace::concurrency();
const auto concurrency = KT::ExeSpace().concurrency();
#ifdef KOKKOS_ENABLE_CUDA
#ifdef KOKKOS_ENABLE_DEBUG
const int team_size = std::min(256, std::min(128*m_num_phys_cols,32*(concurrency/this->m_num_fields+31)/32));
Expand Down Expand Up @@ -450,7 +450,7 @@ do_remap_bwd()

using TeamPolicy = typename KT::TeamTagPolicy<RemapBwdTag>;

const auto concurrency = KT::ExeSpace::concurrency();
const auto concurrency = KT::ExeSpace().concurrency();
#ifdef KOKKOS_ENABLE_CUDA
const int num_levs = m_phys_grid->get_num_vertical_levels();
const int team_size = std::min(128,32*(int)ceil(((Real)num_levs)/32));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ class PhysicsDynamicsRemapper : public AbstractRemapper
// so we'll just force to call this as pack_view<const T>(v).
template<typename NewValueT, typename OldViewT>
KOKKOS_INLINE_FUNCTION
view_Nd<NewValueT,OldViewT::Rank> pack_view (const OldViewT& v) const {
constexpr int N = OldViewT::Rank;
view_Nd<NewValueT,OldViewT::rank> pack_view (const OldViewT& v) const {
constexpr int N = OldViewT::rank;
Kokkos::LayoutRight kl;
for (int i=0; i<N; ++i) {
kl.dimension[i] = v.extent(i);
Expand Down
2 changes: 1 addition & 1 deletion components/eamxx/src/share/field/field_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Field (const identifier_type& id,
const ViewT& view_d)
: Field(id)
{
constexpr auto N = ViewT::Rank;
constexpr int N = ViewT::rank;
using ScalarT = typename ViewT::traits::value_type;
using ExeSpace = typename ViewT::traits::execution_space;

Expand Down
4 changes: 2 additions & 2 deletions components/eamxx/src/share/tests/column_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ TEST_CASE("column_ops_ps_1") {
constexpr int num_cols = 1;
constexpr int num_levs = 16;

policy_type policy(num_cols,std::min(num_levs,exec_space::concurrency()));
policy_type policy(num_cols,std::min(num_levs,exec_space().concurrency()));

view_2d_type v_int("",num_cols,num_levs+1);
view_2d_type v_mid("",num_cols,num_levs);
Expand Down Expand Up @@ -560,7 +560,7 @@ TEST_CASE("column_ops_ps_N") {
auto dv_mid_h = Kokkos::create_mirror_view(dv_mid);
auto dz_mid_h = Kokkos::create_mirror_view(dz_mid);

policy_type policy(num_cols,std::min(num_mid_packs,exec_space::concurrency()));
policy_type policy(num_cols,std::min(num_mid_packs,exec_space().concurrency()));

SECTION ("int_to_mid") {

Expand Down

0 comments on commit 76cbb78

Please sign in to comment.