Skip to content

Commit 9c77714

Browse files
committed
fixes for new ekat
1 parent 0cbd887 commit 9c77714

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

components/eamxx/src/share/property_checks/mass_and_energy_conservation_check.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ PropertyCheck::ResultAndMsg MassAndEnergyConservationCheck::check() const
296296

297297
void MassAndEnergyConservationCheck::global_fixer(const bool & print_debug_info)
298298
{
299+
using TPF = ekat::TeamPolicyFactory<DefaultDevice::execution_space>;
299300
const auto ncols = m_num_cols;
300301
const auto nlevs = m_num_levs;
301302

@@ -320,7 +321,7 @@ void MassAndEnergyConservationCheck::global_fixer(const bool & print_debug_info)
320321
const auto ice_flux = m_fields.at("ice_flux" ).get_view<const Real*>();
321322
const auto heat_flux = m_fields.at("heat_flux" ).get_view<const Real*>();
322323

323-
const auto policy = ExeSpaceUtils::get_default_team_policy(ncols, nlevs);
324+
const auto policy = TPF::get_default_team_policy(ncols, nlevs);
324325

325326
using namespace ekat::units;
326327
using namespace ShortFieldTagsNames;
@@ -476,10 +477,11 @@ compute_gas_mass_on_column (const KT::MemberType& team,
476477
const int nlevs,
477478
const uview_1d<const Real>& pseudo_density)
478479
{
480+
using RU = ekat::ReductionUtils<DefaultDevice::execution_space>;
479481
using PC = scream::physics::Constants<Real>;
480482
const Real gravit = PC::gravit;
481483

482-
return ExeSpaceUtils::parallel_reduce<Real>(team, 0, nlevs,
484+
return RU::parallel_reduce<Real>(team, 0, nlevs,
483485
[&] (const int lev, Real& local_mass) {
484486
local_mass += pseudo_density(lev)/gravit;
485487
});

components/eamxx/src/share/property_checks/mass_and_energy_conservation_check.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
#include "share/field/field.hpp"
77
#include "share/field/field_utils.hpp"
88

9-
#include "ekat/kokkos/ekat_kokkos_utils.hpp"
10-
11-
#include "ekat/mpi/ekat_comm.hpp"
9+
#include <ekat_team_policy_utils.hpp>
10+
#include "ekat_comm.hpp"
1211

1312
namespace scream {
1413

0 commit comments

Comments
 (0)