Skip to content

Commit 6d64d43

Browse files
committed
Fix: MemoryTraits<> default not in Kokkos 4.5
1 parent 8a50206 commit 6d64d43

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

components/eamxx/src/share/field/field.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,21 @@ class Field {
5353
using data_nd_t = typename ekat::DataND<T,N>::type;
5454

5555
// Types of device and host views given data type and memory traits
56-
template<typename DT, typename MT = Kokkos::MemoryTraits<>>
56+
template<typename DT, typename MT = Kokkos::MemoryTraits<0>>
5757
using view_dev_t = typename kt_dev::template view<DT,MT>;
58-
template<typename DT, typename MT = Kokkos::MemoryTraits<>>
58+
template<typename DT, typename MT = Kokkos::MemoryTraits<0>>
5959
using view_host_t = typename kt_host::template view<DT,MT>;
6060

6161
// Analogue of the above, but with LayoutStride
62-
template<typename DT, typename MT = Kokkos::MemoryTraits<>>
62+
template<typename DT, typename MT = Kokkos::MemoryTraits<0>>
6363
using strided_view_dev_t = typename kt_dev::template sview<DT,MT>;
64-
template<typename DT, typename MT = Kokkos::MemoryTraits<>>
64+
template<typename DT, typename MT = Kokkos::MemoryTraits<0>>
6565
using strided_view_host_t = typename kt_host::template sview<DT,MT>;
6666

6767
private:
6868
// A bare DualView-like struct. This is an impl detail, so don't expose it.
6969
// NOTE: we could use DualView, but all we need is a container-like struct.
70-
template<typename DT, typename MT = Kokkos::MemoryTraits<>>
70+
template<typename DT, typename MT = Kokkos::MemoryTraits<0>>
7171
struct dual_view_t {
7272
view_dev_t<DT,MT> d_view;
7373
view_host_t<DT,MT> h_view;
@@ -84,10 +84,10 @@ class Field {
8484
public:
8585

8686
// Type of a view given data type, HostOrDevice enum, and memory traits
87-
template<typename DT, HostOrDevice HD, typename MT = Kokkos::MemoryTraits<>>
87+
template<typename DT, HostOrDevice HD, typename MT = Kokkos::MemoryTraits<0>>
8888
using get_view_type = cond_t<HD==Device,view_dev_t<DT,MT>,view_host_t<DT,MT>>;
8989

90-
template<typename DT, HostOrDevice HD, typename MT = Kokkos::MemoryTraits<>>
90+
template<typename DT, HostOrDevice HD, typename MT = Kokkos::MemoryTraits<0>>
9191
using get_strided_view_type = cond_t<HD==Device,strided_view_dev_t<DT,MT>,strided_view_host_t<DT,MT>>;
9292

9393
// Field stack classes types

components/eamxx/src/share/util/eamxx_column_ops.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class ColumnOps {
8888

8989
using TeamMember = typename KT::MemberType;
9090

91-
template<typename ScalarT,typename MT = Kokkos::MemoryTraits<>>
91+
template<typename ScalarT,typename MT = Kokkos::MemoryTraits<0>>
9292
using view_1d = typename KT::template view_1d<ScalarT,MT>;
9393

9494
KOKKOS_INLINE_FUNCTION

components/eamxx/src/share/util/eamxx_common_physics_functions.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ struct PhysicsFunctions
101101
// theta is the potential temperature, [K]
102102
// temperature is the temperature, [K]
103103
// qc is the cloud liquid mixing ratio, [kg/kg]
104-
// and the others are constants
104+
// and the others are constants
105105
//-----------------------------------------------------------------------------------------------//
106106
template<typename ScalarT>
107107
KOKKOS_INLINE_FUNCTION
@@ -375,7 +375,7 @@ struct PhysicsFunctions
375375
using KT = KokkosTypes<Device>;
376376
using MemberType = typename KT::MemberType;
377377

378-
template<typename ScalarT, typename MT = Kokkos::MemoryTraits<>>
378+
template<typename ScalarT, typename MT = Kokkos::MemoryTraits<0>>
379379
using view_1d = typename KT::template view_1d<ScalarT, MT>;
380380

381381
template<typename ScalarT, typename InputProviderP, typename InputProviderZ>
@@ -411,7 +411,7 @@ struct PhysicsFunctions
411411
const InputProviderTheta& theta,
412412
const InputProviderT& temperature,
413413
const InputProviderQ& qc,
414-
const view_1d<ScalarT>& thetal);
414+
const view_1d<ScalarT>& thetal);
415415
template<typename ScalarT, typename InputProviderT, typename InputProviderP>
416416
KOKKOS_INLINE_FUNCTION
417417
static void calculate_T_from_theta (const MemberType& team,
@@ -483,7 +483,7 @@ struct PhysicsFunctions
483483
template<typename ScalarT,
484484
typename InputProviderPD, typename InputProviderP,
485485
typename InputProviderT, typename InputProviderQ,
486-
typename MT = Kokkos::MemoryTraits<>>
486+
typename MT = Kokkos::MemoryTraits<0>>
487487
KOKKOS_INLINE_FUNCTION
488488
static void calculate_dz (const MemberType& team,
489489
const InputProviderPD& pseudo_density,
@@ -508,7 +508,7 @@ struct PhysicsFunctions
508508
const InputProviderX& vmr,
509509
const view_1d<ScalarT>& mmr);
510510

511-
template<typename ScalarT, typename InputProviderOtau, typename MT = Kokkos::MemoryTraits<>>
511+
template<typename ScalarT, typename InputProviderOtau, typename MT = Kokkos::MemoryTraits<0>>
512512
KOKKOS_INLINE_FUNCTION
513513
static void apply_rayleigh_friction (const MemberType& team,
514514
const Real dt,
@@ -525,7 +525,7 @@ struct PhysicsFunctions
525525
// Note: because this function does an integral it cannot be run just on a single level. It requires
526526
// the full column wise integration.
527527
//-----------------------------------------------------------------------------------------------//
528-
template<typename ScalarT, typename InputProviderZ, typename MT = Kokkos::MemoryTraits<>>
528+
template<typename ScalarT, typename InputProviderZ, typename MT = Kokkos::MemoryTraits<0>>
529529
KOKKOS_INLINE_FUNCTION
530530
static void calculate_z_int (const MemberType& team,
531531
const int num_levs,
@@ -539,7 +539,7 @@ struct PhysicsFunctions
539539
// where
540540
// z_int is the vertical layer interface height, [m]
541541
//-----------------------------------------------------------------------------------------------//
542-
template<typename ScalarT, typename InputProviderZ, typename MT = Kokkos::MemoryTraits<>>
542+
template<typename ScalarT, typename InputProviderZ, typename MT = Kokkos::MemoryTraits<0>>
543543
KOKKOS_INLINE_FUNCTION
544544
static void calculate_z_mid (const MemberType& team,
545545
const int num_levs,

0 commit comments

Comments
 (0)