From 0252d8c21073512b6dd8b85d8c21cef8eeabd175 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Wed, 11 Mar 2020 12:17:53 -0600 Subject: [PATCH] Fix compile for UVM --- src/KOKKOS/angle_charmm_kokkos.h | 6 ++-- src/KOKKOS/angle_class2_kokkos.cpp | 6 ++-- src/KOKKOS/angle_cosine_kokkos.cpp | 6 ++-- src/KOKKOS/angle_harmonic_kokkos.cpp | 6 ++-- src/KOKKOS/bond_class2_kokkos.h | 6 ++-- src/KOKKOS/bond_fene_kokkos.cpp | 6 ++-- src/KOKKOS/bond_harmonic_kokkos.h | 6 ++-- src/KOKKOS/dihedral_charmm_kokkos.cpp | 2 +- src/KOKKOS/dihedral_charmm_kokkos.h | 8 ++--- src/KOKKOS/dihedral_class2_kokkos.cpp | 6 ++-- src/KOKKOS/dihedral_harmonic_kokkos.cpp | 6 ++-- src/KOKKOS/dihedral_opls_kokkos.cpp | 6 ++-- src/KOKKOS/fix_qeq_reax_kokkos.h | 4 +-- src/KOKKOS/fix_rx_kokkos.cpp | 6 ++-- src/KOKKOS/improper_class2_kokkos.cpp | 8 ++--- src/KOKKOS/improper_class2_kokkos.h | 2 +- src/KOKKOS/improper_harmonic_kokkos.h | 6 ++-- src/KOKKOS/kokkos_type.h | 14 ++++++++ src/KOKKOS/pair_coul_dsf_kokkos.cpp | 8 ++--- src/KOKKOS/pair_coul_wolf_kokkos.cpp | 8 ++--- src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp | 12 +++---- src/KOKKOS/pair_eam_alloy_kokkos.h | 16 ++++----- src/KOKKOS/pair_eam_fs_kokkos.h | 16 ++++----- src/KOKKOS/pair_eam_kokkos.h | 16 ++++----- src/KOKKOS/pair_exp6_rx_kokkos.cpp | 16 ++++----- src/KOKKOS/pair_gran_hooke_history_kokkos.cpp | 6 ++-- src/KOKKOS/pair_kokkos.h | 12 +++---- src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp | 8 ++--- src/KOKKOS/pair_reaxc_kokkos.cpp | 10 +++--- src/KOKKOS/pair_reaxc_kokkos.h | 36 +++++++++---------- src/KOKKOS/pair_snap_kokkos.h | 8 ++--- src/KOKKOS/pair_sw_kokkos.h | 12 +++---- src/KOKKOS/pair_table_rx_kokkos.cpp | 26 +++++++------- src/KOKKOS/pair_tersoff_kokkos.h | 12 +++---- src/KOKKOS/pair_tersoff_mod_kokkos.h | 12 +++---- src/KOKKOS/pair_tersoff_zbl_kokkos.h | 12 +++---- src/KOKKOS/pair_vashishta_kokkos.cpp | 10 +++--- src/KOKKOS/pppm_kokkos.cpp | 2 +- src/KOKKOS/sna_kokkos.h | 4 +-- 39 files changed, 194 insertions(+), 178 deletions(-) diff --git a/src/KOKKOS/angle_charmm_kokkos.h b/src/KOKKOS/angle_charmm_kokkos.h index e168160562..865439b83a 100644 --- a/src/KOKKOS/angle_charmm_kokkos.h +++ b/src/KOKKOS/angle_charmm_kokkos.h @@ -63,13 +63,13 @@ class AngleCharmmKokkos : public AngleCharmm { typedef ArrayTypes AT; typename AT::t_x_array_randomread x; - typename Kokkos::View > f; + typename Kokkos::View::value,Kokkos::MemoryTraits > f; typename AT::t_int_2d anglelist; Kokkos::DualView k_eatom; Kokkos::DualView k_vatom; - Kokkos::View > d_eatom; - Kokkos::View > d_vatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_eatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_vatom; int nlocal,newton_bond; int eflag,vflag; diff --git a/src/KOKKOS/angle_class2_kokkos.cpp b/src/KOKKOS/angle_class2_kokkos.cpp index 809ce7e7dd..57563b959f 100644 --- a/src/KOKKOS/angle_class2_kokkos.cpp +++ b/src/KOKKOS/angle_class2_kokkos.cpp @@ -158,7 +158,7 @@ KOKKOS_INLINE_FUNCTION void AngleClass2Kokkos::operator()(TagAngleClass2Compute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = anglelist(n,0); const int i2 = anglelist(n,1); @@ -495,8 +495,8 @@ void AngleClass2Kokkos::ev_tally(EV_FLOAT &ev, const int i, const in F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.template view(); - Kokkos::View > v_vatom = k_vatom.template view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.template view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.template view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/angle_cosine_kokkos.cpp b/src/KOKKOS/angle_cosine_kokkos.cpp index da0ff398f1..65c4c1475a 100644 --- a/src/KOKKOS/angle_cosine_kokkos.cpp +++ b/src/KOKKOS/angle_cosine_kokkos.cpp @@ -141,7 +141,7 @@ KOKKOS_INLINE_FUNCTION void AngleCosineKokkos::operator()(TagAngleCosineCompute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = anglelist(n,0); const int i2 = anglelist(n,1); @@ -284,8 +284,8 @@ void AngleCosineKokkos::ev_tally(EV_FLOAT &ev, const int i, const in F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.template view(); - Kokkos::View > v_vatom = k_vatom.template view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.template view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.template view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/angle_harmonic_kokkos.cpp b/src/KOKKOS/angle_harmonic_kokkos.cpp index fc274bb894..4b8a87ece7 100644 --- a/src/KOKKOS/angle_harmonic_kokkos.cpp +++ b/src/KOKKOS/angle_harmonic_kokkos.cpp @@ -142,7 +142,7 @@ KOKKOS_INLINE_FUNCTION void AngleHarmonicKokkos::operator()(TagAngleHarmonicCompute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = anglelist(n,0); const int i2 = anglelist(n,1); @@ -302,8 +302,8 @@ void AngleHarmonicKokkos::ev_tally(EV_FLOAT &ev, const int i, const F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.template view(); - Kokkos::View > v_vatom = k_vatom.template view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.template view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.template view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/bond_class2_kokkos.h b/src/KOKKOS/bond_class2_kokkos.h index a31ae4b8ae..b3c1d5f682 100644 --- a/src/KOKKOS/bond_class2_kokkos.h +++ b/src/KOKKOS/bond_class2_kokkos.h @@ -63,13 +63,13 @@ class BondClass2Kokkos : public BondClass2 { class NeighborKokkos *neighborKK; typename AT::t_x_array_randomread x; - typename Kokkos::View > f; + typename Kokkos::View::value,Kokkos::MemoryTraits > f; typename AT::t_int_2d bondlist; Kokkos::DualView k_eatom; Kokkos::DualView k_vatom; - Kokkos::View > d_eatom; - Kokkos::View > d_vatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_eatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_vatom; int nlocal,newton_bond; int eflag,vflag; diff --git a/src/KOKKOS/bond_fene_kokkos.cpp b/src/KOKKOS/bond_fene_kokkos.cpp index 361bb61f7e..5f1e9d3ddc 100644 --- a/src/KOKKOS/bond_fene_kokkos.cpp +++ b/src/KOKKOS/bond_fene_kokkos.cpp @@ -166,7 +166,7 @@ void BondFENEKokkos::operator()(TagBondFENECompute > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = bondlist(n,0); const int i2 = bondlist(n,1); @@ -320,8 +320,8 @@ void BondFENEKokkos::ev_tally(EV_FLOAT &ev, const int &i, const int F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.view(); - Kokkos::View > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/bond_harmonic_kokkos.h b/src/KOKKOS/bond_harmonic_kokkos.h index 2bf12f3766..b5bee7e909 100644 --- a/src/KOKKOS/bond_harmonic_kokkos.h +++ b/src/KOKKOS/bond_harmonic_kokkos.h @@ -63,13 +63,13 @@ class BondHarmonicKokkos : public BondHarmonic { typedef ArrayTypes AT; typename AT::t_x_array_randomread x; - typename Kokkos::View > f; + typename Kokkos::View::value,Kokkos::MemoryTraits > f; typename AT::t_int_2d bondlist; Kokkos::DualView k_eatom; Kokkos::DualView k_vatom; - Kokkos::View > d_eatom; - Kokkos::View > d_vatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_eatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_vatom; int nlocal,newton_bond; int eflag,vflag; diff --git a/src/KOKKOS/dihedral_charmm_kokkos.cpp b/src/KOKKOS/dihedral_charmm_kokkos.cpp index 94fd0b9bb7..939834d096 100644 --- a/src/KOKKOS/dihedral_charmm_kokkos.cpp +++ b/src/KOKKOS/dihedral_charmm_kokkos.cpp @@ -201,7 +201,7 @@ KOKKOS_INLINE_FUNCTION void DihedralCharmmKokkos::operator()(TagDihedralCharmmCompute, const int &n, EVM_FLOAT& evm) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = dihedrallist(n,0); const int i2 = dihedrallist(n,1); diff --git a/src/KOKKOS/dihedral_charmm_kokkos.h b/src/KOKKOS/dihedral_charmm_kokkos.h index 449f934533..21bb6fd2e1 100644 --- a/src/KOKKOS/dihedral_charmm_kokkos.h +++ b/src/KOKKOS/dihedral_charmm_kokkos.h @@ -134,13 +134,13 @@ class DihedralCharmmKokkos : public DihedralCharmm { Kokkos::DualView k_eatom; Kokkos::DualView k_vatom; - Kokkos::View > d_eatom; - Kokkos::View > d_vatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_eatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_vatom; Kokkos::DualView k_eatom_pair; Kokkos::DualView k_vatom_pair; - Kokkos::View > d_eatom_pair; - Kokkos::View > d_vatom_pair; + Kokkos::View::value,Kokkos::MemoryTraits > d_eatom_pair; + Kokkos::View::value,Kokkos::MemoryTraits > d_vatom_pair; int nlocal,newton_bond; int eflag,vflag; diff --git a/src/KOKKOS/dihedral_class2_kokkos.cpp b/src/KOKKOS/dihedral_class2_kokkos.cpp index 0310053b5e..60daca3137 100644 --- a/src/KOKKOS/dihedral_class2_kokkos.cpp +++ b/src/KOKKOS/dihedral_class2_kokkos.cpp @@ -197,7 +197,7 @@ KOKKOS_INLINE_FUNCTION void DihedralClass2Kokkos::operator()(TagDihedralClass2Compute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = dihedrallist(n,0); const int i2 = dihedrallist(n,1); @@ -1015,8 +1015,8 @@ void DihedralClass2Kokkos::ev_tally(EV_FLOAT &ev, const int i1, cons F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.view(); - Kokkos::View > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/dihedral_harmonic_kokkos.cpp b/src/KOKKOS/dihedral_harmonic_kokkos.cpp index dd77bc605b..0ed739ef38 100644 --- a/src/KOKKOS/dihedral_harmonic_kokkos.cpp +++ b/src/KOKKOS/dihedral_harmonic_kokkos.cpp @@ -158,7 +158,7 @@ KOKKOS_INLINE_FUNCTION void DihedralHarmonicKokkos::operator()(TagDihedralHarmonicCompute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = dihedrallist(n,0); const int i2 = dihedrallist(n,1); @@ -414,8 +414,8 @@ void DihedralHarmonicKokkos::ev_tally(EV_FLOAT &ev, const int i1, co F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.view(); - Kokkos::View > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/dihedral_opls_kokkos.cpp b/src/KOKKOS/dihedral_opls_kokkos.cpp index 825d106e04..0f510e01ad 100644 --- a/src/KOKKOS/dihedral_opls_kokkos.cpp +++ b/src/KOKKOS/dihedral_opls_kokkos.cpp @@ -157,7 +157,7 @@ KOKKOS_INLINE_FUNCTION void DihedralOPLSKokkos::operator()(TagDihedralOPLSCompute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; const int i1 = dihedrallist(n,0); const int i2 = dihedrallist(n,1); @@ -419,8 +419,8 @@ void DihedralOPLSKokkos::ev_tally(EV_FLOAT &ev, const int i1, const F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.view(); - Kokkos::View > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/fix_qeq_reax_kokkos.h b/src/KOKKOS/fix_qeq_reax_kokkos.h index cd69aa9283..55dec64d33 100644 --- a/src/KOKKOS/fix_qeq_reax_kokkos.h +++ b/src/KOKKOS/fix_qeq_reax_kokkos.h @@ -200,8 +200,8 @@ class FixQEqReaxKokkos : public FixQEqReax { HAT::t_ffloat_2d h_s_hist, h_t_hist; typename AT::t_ffloat_2d_randomread r_s_hist, r_t_hist; - Kokkos::Experimental::ScatterView dup_o; - Kokkos::Experimental::ScatterView ndup_o; + Kokkos::Experimental::ScatterView::value, Kokkos::Experimental::ScatterSum, Kokkos::Experimental::ScatterDuplicated> dup_o; + Kokkos::Experimental::ScatterView::value, Kokkos::Experimental::ScatterSum, Kokkos::Experimental::ScatterNonDuplicated> ndup_o; void init_shielding_k(); void init_hist(); diff --git a/src/KOKKOS/fix_rx_kokkos.cpp b/src/KOKKOS/fix_rx_kokkos.cpp index dcb1ac0b71..9271cf1b88 100644 --- a/src/KOKKOS/fix_rx_kokkos.cpp +++ b/src/KOKKOS/fix_rx_kokkos.cpp @@ -1908,7 +1908,7 @@ void FixRxKokkos::operator()(Tag_FixRxKokkos_firstPairOperator::value> > AtomicViewType; + typedef Kokkos::View< E_FLOAT*, typename DAT::t_efloat_1d::array_layout, typename KKDevice::value, Kokkos::MemoryTraits< AtomicF< NEIGHFLAG >::value> > AtomicViewType; AtomicViewType a_dpdThetaLocal = d_dpdThetaLocal; AtomicViewType a_sumWeights = d_sumWeights; @@ -2083,8 +2083,8 @@ void FixRxKokkos::computeLocalTemperature() { // Create an atomic view of sumWeights and dpdThetaLocal. Only needed // for Half/thread scenarios. - //typedef Kokkos::View< E_FLOAT*, typename DAT::t_efloat_1d::array_layout, DeviceType, Kokkos::MemoryTraits< AtomicF< NEIGHFLAG >::value> > AtomicViewType; - typedef Kokkos::View< E_FLOAT*, typename DAT::t_efloat_1d::array_layout, DeviceType, Kokkos::MemoryTraits< AtomicF< NEIGHFLAG >::value> > AtomicViewType; + //typedef Kokkos::View< E_FLOAT*, typename DAT::t_efloat_1d::array_layout, typename KKDevice::value, Kokkos::MemoryTraits< AtomicF< NEIGHFLAG >::value> > AtomicViewType; + typedef Kokkos::View< E_FLOAT*, typename DAT::t_efloat_1d::array_layout, typename KKDevice::value, Kokkos::MemoryTraits< AtomicF< NEIGHFLAG >::value> > AtomicViewType; AtomicViewType a_dpdThetaLocal = d_dpdThetaLocal; AtomicViewType a_sumWeights = d_sumWeights; diff --git a/src/KOKKOS/improper_class2_kokkos.cpp b/src/KOKKOS/improper_class2_kokkos.cpp index defd5e16f5..888f526c76 100644 --- a/src/KOKKOS/improper_class2_kokkos.cpp +++ b/src/KOKKOS/improper_class2_kokkos.cpp @@ -188,7 +188,7 @@ KOKKOS_INLINE_FUNCTION void ImproperClass2Kokkos::operator()(TagImproperClass2Compute, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; int i, j, k; F_FLOAT delr[3][3],rmag[3],rinvmag[3],rmag2[3]; @@ -660,7 +660,7 @@ KOKKOS_INLINE_FUNCTION void ImproperClass2Kokkos::operator()(TagImproperClass2AngleAngle, const int &n, EV_FLOAT& ev) const { // The f array is atomic - Kokkos::View > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits > a_f = f; int i,j,k; F_FLOAT eimproper; @@ -1010,8 +1010,8 @@ void ImproperClass2Kokkos::ev_tally(EV_FLOAT &ev, const int i1, cons F_FLOAT v[6]; // The eatom and vatom arrays are atomic - Kokkos::View > v_eatom = k_eatom.view(); - Kokkos::View > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits > v_vatom = k_vatom.view(); if (eflag_either) { if (eflag_global) { diff --git a/src/KOKKOS/improper_class2_kokkos.h b/src/KOKKOS/improper_class2_kokkos.h index 0fbfab2beb..11212249e7 100644 --- a/src/KOKKOS/improper_class2_kokkos.h +++ b/src/KOKKOS/improper_class2_kokkos.h @@ -75,7 +75,7 @@ class ImproperClass2Kokkos : public ImproperClass2 { class NeighborKokkos *neighborKK; typename AT::t_x_array_randomread x; - typename Kokkos::View > f; + typename Kokkos::View::value,Kokkos::MemoryTraits > f; typename AT::t_int_2d improperlist; DAT::tdual_efloat_1d k_eatom; diff --git a/src/KOKKOS/improper_harmonic_kokkos.h b/src/KOKKOS/improper_harmonic_kokkos.h index 23ae0c7110..fb44081928 100644 --- a/src/KOKKOS/improper_harmonic_kokkos.h +++ b/src/KOKKOS/improper_harmonic_kokkos.h @@ -64,13 +64,13 @@ class ImproperHarmonicKokkos : public ImproperHarmonic { class NeighborKokkos *neighborKK; typename AT::t_x_array_randomread x; - typename Kokkos::View > f; + typename Kokkos::View::value,Kokkos::MemoryTraits > f; typename AT::t_int_2d improperlist; Kokkos::DualView k_eatom; Kokkos::DualView k_vatom; - Kokkos::View > d_eatom; - Kokkos::View > d_vatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_eatom; + Kokkos::View::value,Kokkos::MemoryTraits > d_vatom; int nlocal,newton_bond; int eflag,vflag; diff --git a/src/KOKKOS/kokkos_type.h b/src/KOKKOS/kokkos_type.h index 3ba6318d41..b1d17b45c3 100644 --- a/src/KOKKOS/kokkos_type.h +++ b/src/KOKKOS/kokkos_type.h @@ -163,6 +163,20 @@ t_scalar3 operator * typedef Kokkos::DefaultExecutionSpace LMPDeviceType; typedef Kokkos::HostSpace::execution_space LMPHostType; + +// Need to use Cuda UVM memory space for Host execution space + +template +class KKDevice { +public: +#if defined(KOKKOS_ENABLE_CUDA) && defined(KOKKOS_ENABLE_CUDA_UVM) + typedef Kokkos::Device value; +#else + typedef Kokkos::Device value; +#endif +}; + + // set ExecutionSpace stuct with variable "space" template diff --git a/src/KOKKOS/pair_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_coul_dsf_kokkos.cpp index f7bf8fb5d1..cabdcfd455 100644 --- a/src/KOKKOS/pair_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_dsf_kokkos.cpp @@ -227,8 +227,8 @@ KOKKOS_INLINE_FUNCTION void PairCoulDSFKokkos::operator()(TagPairCoulDSFKernelA, const int &ii, EV_FLOAT& ev) const { // The f array is atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; - Kokkos::View::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); const int i = d_ilist[ii]; const X_FLOAT xtmp = x(i,0); @@ -323,8 +323,8 @@ void PairCoulDSFKokkos::ev_tally(EV_FLOAT &ev, const int &i, const i const int VFLAG = vflag_either; // The eatom and vatom arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (EFLAG) { if (eflag_atom) { diff --git a/src/KOKKOS/pair_coul_wolf_kokkos.cpp b/src/KOKKOS/pair_coul_wolf_kokkos.cpp index f3ffdc6069..45c4ec3f22 100644 --- a/src/KOKKOS/pair_coul_wolf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_wolf_kokkos.cpp @@ -228,8 +228,8 @@ KOKKOS_INLINE_FUNCTION void PairCoulWolfKokkos::operator()(TagPairCoulWolfKernelA, const int &ii, EV_FLOAT& ev) const { // The f array is atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; - Kokkos::View::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); const int i = d_ilist[ii]; const X_FLOAT xtmp = x(i,0); @@ -325,8 +325,8 @@ void PairCoulWolfKokkos::ev_tally(EV_FLOAT &ev, const int &i, const const int VFLAG = vflag_either; // The eatom and vatom arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (EFLAG) { if (eflag_atom) { diff --git a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp index 1ddf950fd7..3a1e02037a 100644 --- a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp @@ -389,7 +389,7 @@ KOKKOS_INLINE_FUNCTION void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyComputeSplit, const int &ii, EV_FLOAT& ev) const { // The f array is atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; int i,j,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; @@ -473,9 +473,9 @@ KOKKOS_INLINE_FUNCTION void PairDPDfdtEnergyKokkos::operator()(TagPairDPDfdtEnergyComputeNoSplit, const int &ii, EV_FLOAT& ev) const { // These array are atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; - Kokkos::View::value> > a_duCond = d_duCond; - Kokkos::View::value> > a_duMech = d_duMech; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_duCond = d_duCond; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_duMech = d_duMech; int i,j,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; @@ -697,8 +697,8 @@ void PairDPDfdtEnergyKokkos::ev_tally(EV_FLOAT &ev, const int &i, co const int VFLAG = vflag_either; // The eatom and vatom arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (EFLAG) { if (eflag_atom) { diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.h b/src/KOKKOS/pair_eam_alloy_kokkos.h index e1dd9ab47d..5796bdd1d4 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.h +++ b/src/KOKKOS/pair_eam_alloy_kokkos.h @@ -129,14 +129,14 @@ class PairEAMAlloyKokkos : public PairEAM, public KokkosBase { typename ArrayTypes::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_rho; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_rho; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_rho; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_rho; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; DAT::tdual_ffloat_1d k_rho; DAT::tdual_ffloat_1d k_fp; diff --git a/src/KOKKOS/pair_eam_fs_kokkos.h b/src/KOKKOS/pair_eam_fs_kokkos.h index e93977869e..64e1c78d56 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.h +++ b/src/KOKKOS/pair_eam_fs_kokkos.h @@ -129,14 +129,14 @@ class PairEAMFSKokkos : public PairEAM, public KokkosBase { typename ArrayTypes::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_rho; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_rho; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_rho; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_rho; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; DAT::tdual_ffloat_1d k_rho; DAT::tdual_ffloat_1d k_fp; diff --git a/src/KOKKOS/pair_eam_kokkos.h b/src/KOKKOS/pair_eam_kokkos.h index 3bf89c549a..20bac4ed16 100644 --- a/src/KOKKOS/pair_eam_kokkos.h +++ b/src/KOKKOS/pair_eam_kokkos.h @@ -126,14 +126,14 @@ class PairEAMKokkos : public PairEAM, public KokkosBase { typename ArrayTypes::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_rho; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_rho; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_rho; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_rho; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; DAT::tdual_ffloat_1d k_rho; DAT::tdual_ffloat_1d k_fp; diff --git a/src/KOKKOS/pair_exp6_rx_kokkos.cpp b/src/KOKKOS/pair_exp6_rx_kokkos.cpp index 4d72c85029..800ea81fa5 100644 --- a/src/KOKKOS/pair_exp6_rx_kokkos.cpp +++ b/src/KOKKOS/pair_exp6_rx_kokkos.cpp @@ -442,9 +442,9 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxCompute::value> > a_f = f; - Kokkos::View::value> > a_uCG = uCG; - Kokkos::View::value> > a_uCGnew = uCGnew; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_uCG = uCG; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_uCGnew = uCGnew; int i,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,evdwlOld,fpair; @@ -1183,9 +1183,9 @@ KOKKOS_INLINE_FUNCTION void PairExp6rxKokkos::vectorized_operator(const int &ii, EV_FLOAT& ev) const { // These arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; - Kokkos::View::value> > a_uCG = uCG; - Kokkos::View::value> > a_uCGnew = uCGnew; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_uCG = uCG; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_uCGnew = uCGnew; int tid = 0; #ifndef KOKKOS_ENABLE_CUDA @@ -2562,8 +2562,8 @@ void PairExp6rxKokkos::ev_tally(EV_FLOAT &ev, const int &i, const in const int VFLAG = vflag_either; // The eatom and vatom arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (EFLAG) { if (eflag_atom) { diff --git a/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp b/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp index 9e65c0589e..8797aab71e 100644 --- a/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp +++ b/src/KOKKOS/pair_gran_hooke_history_kokkos.cpp @@ -320,8 +320,8 @@ KOKKOS_INLINE_FUNCTION void PairGranHookeHistoryKokkos::operator()(TagPairGranHookeHistoryCompute, const int ii, EV_FLOAT &ev) const { // The f and torque arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; - Kokkos::View::value> > a_torque = torque; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_torque = torque; const int i = d_ilist[ii]; const X_FLOAT xtmp = x(i,0); @@ -549,7 +549,7 @@ void PairGranHookeHistoryKokkos::ev_tally_xyz_atom(EV_FLOAT &ev, int F_FLOAT fx, F_FLOAT fy, F_FLOAT fz, X_FLOAT delx, X_FLOAT dely, X_FLOAT delz) const { - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); F_FLOAT v[6]; diff --git a/src/KOKKOS/pair_kokkos.h b/src/KOKKOS/pair_kokkos.h index 41922b7349..54035c54eb 100644 --- a/src/KOKKOS/pair_kokkos.h +++ b/src/KOKKOS/pair_kokkos.h @@ -66,17 +66,17 @@ struct PairComputeFunctor { // The force array is atomic for Half/Thread neighbor style //Kokkos::View::value> > f; - Kokkos::Experimental::ScatterView::value > dup_f; + // typename KKDevice::value,Kokkos::MemoryTraits::value> > f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,NeedDup::value > dup_f; // The eatom and vatom arrays are atomic for Half/Thread neighbor style //Kokkos::View::value> > eatom; - Kokkos::Experimental::ScatterView::value > dup_eatom; + // typename KKDevice::value,Kokkos::MemoryTraits::value> > eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,NeedDup::value > dup_eatom; //Kokkos::View::value> > vatom; - Kokkos::Experimental::ScatterView::value > dup_vatom; + // typename KKDevice::value,Kokkos::MemoryTraits::value> > vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,NeedDup::value > dup_vatom; diff --git a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp index 3b7a738026..1c125b4dc0 100644 --- a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp +++ b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp @@ -270,7 +270,7 @@ KOKKOS_INLINE_FUNCTION void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXCompute, const int &ii, EV_FLOAT& ev) const { // The f array is atomic for Half/Thread neighbor style - Kokkos::View::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; int i,jj,jnum,itype,jtype,itable; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,evdwlOld,fpair; @@ -532,7 +532,7 @@ void PairMultiLucyRXKokkos::operator()(TagPairMultiLucyRXComputeLoca // The rho array is atomic for Half/Thread neighbor style - Kokkos::View::value> > a_rho = rho; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_rho = rho; const int i = d_ilist[ii]; @@ -771,8 +771,8 @@ void PairMultiLucyRXKokkos::ev_tally(EV_FLOAT &ev, const int &i, con const int VFLAG = vflag_either; // The eatom and vatom arrays are atomic for Half/Thread neighbor style - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (EFLAG) { if (eflag_atom) { diff --git a/src/KOKKOS/pair_reaxc_kokkos.cpp b/src/KOKKOS/pair_reaxc_kokkos.cpp index 18144bb653..302ecbafd9 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.cpp +++ b/src/KOKKOS/pair_reaxc_kokkos.cpp @@ -2477,7 +2477,7 @@ void PairReaxCKokkos::operator()(PairReaxComputeAngular::value,decltype(dup_f),decltype(ndup_f)>::get(dup_f,ndup_f); auto a_f = v_f.template access::value>(); - Kokkos::View::value> > a_Cdbo = d_Cdbo; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_Cdbo = d_Cdbo; auto v_CdDelta = ScatterViewHelper::value,decltype(dup_CdDelta),decltype(ndup_CdDelta)>::get(dup_CdDelta,ndup_CdDelta); auto a_CdDelta = v_CdDelta.template access::value>(); @@ -2792,7 +2792,7 @@ void PairReaxCKokkos::operator()(PairReaxComputeTorsion::value,decltype(dup_CdDelta),decltype(ndup_CdDelta)>::get(dup_CdDelta,ndup_CdDelta); auto a_CdDelta = v_CdDelta.template access::value>(); - Kokkos::View::value> > a_Cdbo = d_Cdbo; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_Cdbo = d_Cdbo; //auto a_Cdbo = dup_Cdbo.template access::value>(); // in reaxc_torsion_angles: j = i, k = j, i = k; @@ -3311,9 +3311,9 @@ template KOKKOS_INLINE_FUNCTION void PairReaxCKokkos::operator()(PairReaxUpdateBond, const int &ii) const { - Kokkos::View::value> > a_Cdbo = d_Cdbo; - Kokkos::View::value> > a_Cdbopi = d_Cdbopi; - Kokkos::View::value> > a_Cdbopi2 = d_Cdbopi2; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_Cdbo = d_Cdbo; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_Cdbopi = d_Cdbopi; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_Cdbopi2 = d_Cdbopi2; //auto a_Cdbo = dup_Cdbo.template access::value>(); //auto a_Cdbopi = dup_Cdbopi.template access::value>(); //auto a_Cdbopi2 = dup_Cdbopi2.template access::value>(); diff --git a/src/KOKKOS/pair_reaxc_kokkos.h b/src/KOKKOS/pair_reaxc_kokkos.h index 783ea33c4e..93ca4468ec 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.h +++ b/src/KOKKOS/pair_reaxc_kokkos.h @@ -399,25 +399,25 @@ class PairReaxCKokkos : public PairReaxC { typename AT::t_ffloat_2d_dl d_C1dbopi2, d_C2dbopi2, d_C3dbopi2, d_C4dbopi2; typename AT::t_ffloat_2d_dl d_Cdbo, d_Cdbopi, d_Cdbopi2, d_dDeltap_self; - Kokkos::Experimental::ScatterView dup_total_bo; - Kokkos::Experimental::ScatterView dup_CdDelta; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView dup_dDeltap_self; - Kokkos::Experimental::ScatterView dup_Cdbo; - Kokkos::Experimental::ScatterView dup_Cdbopi; - Kokkos::Experimental::ScatterView dup_Cdbopi2; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_total_bo; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_CdDelta; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_dDeltap_self; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_Cdbo; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_Cdbopi; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_Cdbopi2; - Kokkos::Experimental::ScatterView ndup_total_bo; - Kokkos::Experimental::ScatterView ndup_CdDelta; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_vatom; - Kokkos::Experimental::ScatterView ndup_dDeltap_self; - Kokkos::Experimental::ScatterView ndup_Cdbo; - Kokkos::Experimental::ScatterView ndup_Cdbopi; - Kokkos::Experimental::ScatterView ndup_Cdbopi2; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_total_bo; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_CdDelta; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_dDeltap_self; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_Cdbo; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_Cdbopi; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_Cdbopi2; int need_dup; diff --git a/src/KOKKOS/pair_snap_kokkos.h b/src/KOKKOS/pair_snap_kokkos.h index b57ef2d9e5..1fbb537f35 100644 --- a/src/KOKKOS/pair_snap_kokkos.h +++ b/src/KOKKOS/pair_snap_kokkos.h @@ -181,10 +181,10 @@ inline double dist2(double* x,double* y); typename AT::t_int_1d_randomread type; int need_dup; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; friend void pair_virial_fdotr_compute(PairSNAPKokkos*); diff --git a/src/KOKKOS/pair_sw_kokkos.h b/src/KOKKOS/pair_sw_kokkos.h index 1a3f0b862f..2fc7f93c12 100644 --- a/src/KOKKOS/pair_sw_kokkos.h +++ b/src/KOKKOS/pair_sw_kokkos.h @@ -135,12 +135,12 @@ class PairSWKokkos : public PairSW { typename AT::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; typename AT::t_int_1d_randomread d_type2frho; typename AT::t_int_2d_randomread d_type2rhor; diff --git a/src/KOKKOS/pair_table_rx_kokkos.cpp b/src/KOKKOS/pair_table_rx_kokkos.cpp index cd7aa373ed..687489791e 100644 --- a/src/KOKKOS/pair_table_rx_kokkos.cpp +++ b/src/KOKKOS/pair_table_rx_kokkos.cpp @@ -284,11 +284,11 @@ ev_tally( F_FLOAT delx, F_FLOAT dely, F_FLOAT delz, Kokkos::View::t_virial_array::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& v_vatom, Kokkos::View::t_efloat_1d::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& v_eatom) { if (eflag) { @@ -399,15 +399,15 @@ compute_item( typename ArrayTypes::t_ffloat_2d const& d_cutsq, Kokkos::View::t_f_array::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& f, Kokkos::View::t_efloat_1d::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& uCG, Kokkos::View::t_efloat_1d::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& uCGnew, int isite1, int isite2, typename PairTableRXKokkos::TableDeviceConst const& d_table_const, @@ -418,11 +418,11 @@ compute_item( int vflag_atom, Kokkos::View::t_virial_array::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& v_vatom, Kokkos::View::t_efloat_1d::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > const& v_eatom) { EV_FLOAT ev; auto i = d_ilist(ii); @@ -544,14 +544,16 @@ static void compute_all_items( typename ArrayTypes::t_ffloat_2d d_cutsq, Kokkos::View::t_f_array::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > f, Kokkos::View::t_efloat_1d::array_layout, - DeviceType,Kokkos::MemoryTraits::value> > uCG, + typename KKDevice::value, + Kokkos::MemoryTraits::value> > uCG, Kokkos::View::t_efloat_1d::array_layout, - DeviceType,Kokkos::MemoryTraits::value> > uCGnew, + typename KKDevice::value, + Kokkos::MemoryTraits::value> > uCGnew, int isite1, int isite2, typename PairTableRXKokkos::TableDeviceConst d_table_const, int eflag, @@ -561,11 +563,11 @@ static void compute_all_items( int vflag_atom, Kokkos::View::t_virial_array::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > v_vatom, Kokkos::View::t_efloat_1d::array_layout, - DeviceType, + typename KKDevice::value, Kokkos::MemoryTraits::value> > v_eatom) { if (eflag || vflag) { Kokkos::parallel_reduce(inum, diff --git a/src/KOKKOS/pair_tersoff_kokkos.h b/src/KOKKOS/pair_tersoff_kokkos.h index 7d41fe2346..0c57e21a6c 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.h +++ b/src/KOKKOS/pair_tersoff_kokkos.h @@ -202,12 +202,12 @@ class PairTersoffKokkos : public PairTersoff { typename ArrayTypes::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; typedef Kokkos::DualView tdual_ffloat_2d_n7; typedef typename tdual_ffloat_2d_n7::t_dev_const_randomread t_ffloat_2d_n7_randomread; diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.h b/src/KOKKOS/pair_tersoff_mod_kokkos.h index 889e1eadfa..b47f11e029 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.h +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.h @@ -202,12 +202,12 @@ class PairTersoffMODKokkos : public PairTersoffMOD { typename ArrayTypes::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; typedef Kokkos::DualView tdual_ffloat_2d_n7; typedef typename tdual_ffloat_2d_n7::t_dev_const_randomread t_ffloat_2d_n7_randomread; diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.h b/src/KOKKOS/pair_tersoff_zbl_kokkos.h index 0c7fa2e963..bed2564da5 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.h +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.h @@ -207,12 +207,12 @@ class PairTersoffZBLKokkos : public PairTersoffZBL { typename ArrayTypes::t_virial_array d_vatom; int need_dup; - Kokkos::Experimental::ScatterView dup_f; - Kokkos::Experimental::ScatterView dup_eatom; - Kokkos::Experimental::ScatterView dup_vatom; - Kokkos::Experimental::ScatterView ndup_f; - Kokkos::Experimental::ScatterView ndup_eatom; - Kokkos::Experimental::ScatterView ndup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterDuplicated> dup_vatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_f; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_eatom; + Kokkos::Experimental::ScatterView::value,Kokkos::Experimental::ScatterSum,Kokkos::Experimental::ScatterNonDuplicated> ndup_vatom; typedef Kokkos::DualView tdual_ffloat_2d_n7; typedef typename tdual_ffloat_2d_n7::t_dev_const_randomread t_ffloat_2d_n7_randomread; diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index ddb0688e03..84887fa1f0 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -234,7 +234,7 @@ void PairVashishtaKokkos::operator()(TagPairVashishtaComputeHalf::value> > a_f = f; + Kokkos::View::value,Kokkos::MemoryTraits::value> > a_f = f; F_FLOAT delr1[3],delr2[3],fj[3],fk[3]; F_FLOAT evdwl = 0.0; @@ -780,8 +780,8 @@ void PairVashishtaKokkos::ev_tally(EV_FLOAT &ev, const int &i, const // The eatom and vatom arrays are atomic for half/thread neighbor list - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (eflag_atom) { @@ -856,8 +856,8 @@ void PairVashishtaKokkos::ev_tally3(EV_FLOAT &ev, const int &i, cons // The eatom and vatom arrays are atomic for half/thread neighbor list - Kokkos::View::value> > v_eatom = k_eatom.view(); - Kokkos::View::value> > v_vatom = k_vatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_eatom = k_eatom.view(); + Kokkos::View::value,Kokkos::MemoryTraits::value> > v_vatom = k_vatom.view(); if (eflag_atom) { epairthird = THIRD * (evdwl + ecoul); diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 08a0c18f9c..b0f6f393cf 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -1670,7 +1670,7 @@ KOKKOS_INLINE_FUNCTION void PPPMKokkos::operator()(TagPPPM_make_rho_atomic, const int &i) const { // The density_brick array is atomic for Half/Thread neighbor style - Kokkos::View > a_density_brick = d_density_brick; + Kokkos::View::value,Kokkos::MemoryTraits > a_density_brick = d_density_brick; int nx = d_part2grid(i,0); int ny = d_part2grid(i,1); diff --git a/src/KOKKOS/sna_kokkos.h b/src/KOKKOS/sna_kokkos.h index a6d9db3218..b7162cf8d6 100644 --- a/src/KOKKOS/sna_kokkos.h +++ b/src/KOKKOS/sna_kokkos.h @@ -89,7 +89,7 @@ class SNAKokkos { public: typedef Kokkos::View t_sna_1i; typedef Kokkos::View t_sna_1d; - typedef Kokkos::View > t_sna_1d_atomic; + typedef Kokkos::View::value, Kokkos::MemoryTraits > t_sna_1d_atomic; typedef Kokkos::View t_sna_2i; typedef Kokkos::View t_sna_2d; typedef Kokkos::View t_sna_2d_ll; @@ -99,7 +99,7 @@ public: typedef Kokkos::View t_sna_5d; typedef Kokkos::View t_sna_1c; - typedef Kokkos::View > t_sna_1c_atomic; + typedef Kokkos::View::value, Kokkos::MemoryTraits > t_sna_1c_atomic; typedef Kokkos::View t_sna_2c; typedef Kokkos::View t_sna_2c_ll; typedef Kokkos::View t_sna_2c_lr;