Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix usage of code deprecated Kokkos code, and updates ekat #2867

Merged
merged 2 commits into from
Jun 17, 2024
Merged
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
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