diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index 8f60f3526d..f54df5cb76 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -306,7 +306,7 @@ void KokkosLMP::accelerator(int narg, char **arg) neighflag = HALFTHREAD; else neighflag = HALF; - } else if (strcmp(arg[iarg+1],"n2") == 0) neighflag = N2; + } else error->all(FLERR,"Illegal package kokkos command"); if (!neighflag_qeq_set) neighflag_qeq = neighflag; iarg += 2; @@ -318,7 +318,7 @@ void KokkosLMP::accelerator(int narg, char **arg) neighflag_qeq = HALFTHREAD; else neighflag_qeq = HALF; - } else if (strcmp(arg[iarg+1],"n2") == 0) neighflag_qeq = N2; + } else error->all(FLERR,"Illegal package kokkos command"); neighflag_qeq_set = 1; iarg += 2; diff --git a/src/KOKKOS/kokkos_type.h b/src/KOKKOS/kokkos_type.h index c8fccaf409..796f4612a4 100644 --- a/src/KOKKOS/kokkos_type.h +++ b/src/KOKKOS/kokkos_type.h @@ -22,7 +22,7 @@ #include #include -enum{FULL=1u,HALFTHREAD=2u,HALF=4u,N2=8u}; +enum{FULL=1u,HALFTHREAD=2u,HALF=4u}; #if defined(KOKKOS_ENABLE_CXX11) #undef ISFINITE diff --git a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp index b28bbebbeb..46c5ee82cb 100644 --- a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp @@ -307,9 +307,6 @@ void PairBuckCoulCutKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with buck/coul/cut/kk"); } diff --git a/src/KOKKOS/pair_buck_kokkos.cpp b/src/KOKKOS/pair_buck_kokkos.cpp index 990c9e94a6..04ebd6608b 100644 --- a/src/KOKKOS/pair_buck_kokkos.cpp +++ b/src/KOKKOS/pair_buck_kokkos.cpp @@ -229,9 +229,6 @@ void PairBuckKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with buck/kk"); } diff --git a/src/KOKKOS/pair_buck_kokkos.h b/src/KOKKOS/pair_buck_kokkos.h index 2691f10929..815b5b2dee 100644 --- a/src/KOKKOS/pair_buck_kokkos.h +++ b/src/KOKKOS/pair_buck_kokkos.h @@ -31,7 +31,7 @@ namespace LAMMPS_NS { template class PairBuckKokkos : public PairBuck { public: - enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; + enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=0}; typedef DeviceType device_type; typedef ArrayTypes AT; @@ -98,15 +98,12 @@ class PairBuckKokkos : public PairBuck { friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend EV_FLOAT pair_compute_neighlist(PairBuckKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist(PairBuckKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist(PairBuckKokkos*,NeighListKokkos*); - friend EV_FLOAT pair_compute_neighlist(PairBuckKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairBuckKokkos*,NeighListKokkos*); friend void pair_virial_fdotr_compute(PairBuckKokkos*); }; diff --git a/src/KOKKOS/pair_coul_debye_kokkos.cpp b/src/KOKKOS/pair_coul_debye_kokkos.cpp index b212bdc53a..a544a5fb8d 100644 --- a/src/KOKKOS/pair_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_coul_debye_kokkos.cpp @@ -276,9 +276,6 @@ void PairCoulDebyeKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with coul/debye/kk"); } diff --git a/src/KOKKOS/pair_kokkos.h b/src/KOKKOS/pair_kokkos.h index 54035c54eb..2c89f8a7f3 100644 --- a/src/KOKKOS/pair_kokkos.h +++ b/src/KOKKOS/pair_kokkos.h @@ -87,6 +87,8 @@ struct PairComputeFunctor { c(*c_ptr),list(*list_ptr) { // allocate duplicated memory f = c.f; + d_eatom = c.d_eatom; + d_vatom = c.d_vatom; dup_f = Kokkos::Experimental::create_scatter_view::value >(c.f); dup_eatom = Kokkos::Experimental::create_scatter_view::value >(c.d_eatom); dup_vatom = Kokkos::Experimental::create_scatter_view::value >(c.d_vatom); @@ -690,148 +692,6 @@ struct PairComputeFunctor { } }; -template -struct PairComputeFunctor { - typedef typename PairStyle::device_type device_type ; - typedef EV_FLOAT value_type; - - PairStyle c; - NeighListKokkos list; - - PairComputeFunctor(PairStyle* c_ptr, - NeighListKokkos* list_ptr): - c(*c_ptr),list(*list_ptr) {}; - ~PairComputeFunctor() {c.cleanup_copy();list.copymode = 1;}; - - KOKKOS_INLINE_FUNCTION int sbmask(const int& j) const { - return j >> SBBITS & 3; - } - - - void contribute() {} - - template - KOKKOS_FUNCTION - EV_FLOAT compute_item(const int& ii, - const NeighListKokkos &list, const NoCoulTag&) const { - (void) list; - EV_FLOAT ev; - const int i = ii;//list.d_ilist[ii]; - const X_FLOAT xtmp = c.x(i,0); - const X_FLOAT ytmp = c.x(i,1); - const X_FLOAT ztmp = c.x(i,2); - const int itype = c.type(i); - - //const AtomNeighborsConst neighbors_i = list.get_neighbors_const(i); - const int jnum = c.nall; - - F_FLOAT fxtmp = 0.0; - F_FLOAT fytmp = 0.0; - F_FLOAT fztmp = 0.0; - - for (int jj = 0; jj < jnum; jj++) { - int j = jj;//neighbors_i(jj); - if(i==j) continue; - const F_FLOAT factor_lj = c.special_lj[sbmask(j)]; - j &= NEIGHMASK; - const X_FLOAT delx = xtmp - c.x(j,0); - const X_FLOAT dely = ytmp - c.x(j,1); - const X_FLOAT delz = ztmp - c.x(j,2); - const int jtype = c.type(j); - const F_FLOAT rsq = delx*delx + dely*dely + delz*delz; - - if(rsq < (STACKPARAMS?c.m_cutsq[itype][jtype]:c.d_cutsq(itype,jtype))) { - - const F_FLOAT fpair = factor_lj*c.template compute_fpair(rsq,i,j,itype,jtype); - fxtmp += delx*fpair; - fytmp += dely*fpair; - fztmp += delz*fpair; - - if (EVFLAG) { - F_FLOAT evdwl = 0.0; - if (c.eflag) { - evdwl = 0.5* - factor_lj * c.template compute_evdwl(rsq,i,j,itype,jtype); - ev.evdwl += evdwl; - } - - if (c.vflag_either || c.eflag_atom) ev_tally(ev,i,j,evdwl,fpair,delx,dely,delz); - } - } - } - - c.f(i,0) += fxtmp; - c.f(i,1) += fytmp; - c.f(i,2) += fztmp; - - return ev; - } - - KOKKOS_INLINE_FUNCTION - void ev_tally(EV_FLOAT &ev, const int &i, const int &j, - const F_FLOAT &epair, const F_FLOAT &fpair, const F_FLOAT &delx, - const F_FLOAT &dely, const F_FLOAT &delz) const - { - const int EFLAG = c.eflag; - const int VFLAG = c.vflag_either; - - if (EFLAG) { - if (c.eflag_atom) { - const E_FLOAT epairhalf = 0.5 * epair; - if (i < c.nlocal) c.d_eatom[i] += epairhalf; - if (j < c.nlocal) c.d_eatom[j] += epairhalf; - } - } - - if (VFLAG) { - const E_FLOAT v0 = delx*delx*fpair; - const E_FLOAT v1 = dely*dely*fpair; - const E_FLOAT v2 = delz*delz*fpair; - const E_FLOAT v3 = delx*dely*fpair; - const E_FLOAT v4 = delx*delz*fpair; - const E_FLOAT v5 = dely*delz*fpair; - - if (c.vflag_global) { - ev.v[0] += 0.5*v0; - ev.v[1] += 0.5*v1; - ev.v[2] += 0.5*v2; - ev.v[3] += 0.5*v3; - ev.v[4] += 0.5*v4; - ev.v[5] += 0.5*v5; - } - - if (c.vflag_atom) { - if (i < c.nlocal) { - c.d_vatom(i,0) += 0.5*v0; - c.d_vatom(i,1) += 0.5*v1; - c.d_vatom(i,2) += 0.5*v2; - c.d_vatom(i,3) += 0.5*v3; - c.d_vatom(i,4) += 0.5*v4; - c.d_vatom(i,5) += 0.5*v5; - } - } - } - } - - KOKKOS_INLINE_FUNCTION - void operator()(const int i) const { - compute_item<0,0>(i,list,typename DoCoul::type()); - } - - KOKKOS_INLINE_FUNCTION - void operator()(const int i, value_type &energy_virial) const { - energy_virial += compute_item<1,0>(i,list,typename DoCoul::type()); - } - - KOKKOS_INLINE_FUNCTION - void operator()(const typename Kokkos::TeamPolicy<>::member_type& team) const - {} - - KOKKOS_INLINE_FUNCTION - void operator()(const typename Kokkos::TeamPolicy<>::member_type& team, value_type &energy_virial) const - {} - -}; // Filter out Neighflags which are not supported for PairStyle // The enable_if clause will invalidate the last parameter of the function, so that @@ -867,7 +727,7 @@ int GetTeamSize(FunctorStyle& functor, int inum, int reduce_flag, int team_size, return team_size; } -// Submit ParallelFor for NEIGHFLAG=HALF,HALFTHREAD,FULL,N2 +// Submit ParallelFor for NEIGHFLAG=HALF,HALFTHREAD,FULL template EV_FLOAT pair_compute_neighlist (PairStyle* fpair, typename std::enable_if<(NEIGHFLAG&PairStyle::EnabledNeighFlags) != 0, NeighListKokkos*>::type list) { EV_FLOAT ev; @@ -918,8 +778,6 @@ EV_FLOAT pair_compute (PairStyle* fpair, NeighListKokkos (fpair,list); } else if (fpair->neighflag == HALF) { ev = pair_compute_neighlist (fpair,list); - } else if (fpair->neighflag == N2) { - ev = pair_compute_neighlist (fpair,list); } return ev; } diff --git a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp index 37485c77f0..b8c72d7b88 100644 --- a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp @@ -309,9 +309,6 @@ void PairLJClass2CoulCutKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with lj/class2/coul/cut/kk"); } diff --git a/src/KOKKOS/pair_lj_class2_kokkos.cpp b/src/KOKKOS/pair_lj_class2_kokkos.cpp index dd99ea9ab5..5bac4c8140 100644 --- a/src/KOKKOS/pair_lj_class2_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_kokkos.cpp @@ -247,9 +247,6 @@ void PairLJClass2Kokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with lj/class2/kk"); } diff --git a/src/KOKKOS/pair_lj_class2_kokkos.h b/src/KOKKOS/pair_lj_class2_kokkos.h index ae0676c8a5..4bfc44ee6f 100644 --- a/src/KOKKOS/pair_lj_class2_kokkos.h +++ b/src/KOKKOS/pair_lj_class2_kokkos.h @@ -31,7 +31,7 @@ namespace LAMMPS_NS { template class PairLJClass2Kokkos : public PairLJClass2 { public: - enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; + enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=0}; typedef DeviceType device_type; typedef ArrayTypes AT; @@ -104,15 +104,12 @@ class PairLJClass2Kokkos : public PairLJClass2 { friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend EV_FLOAT pair_compute_neighlist(PairLJClass2Kokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist(PairLJClass2Kokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist(PairLJClass2Kokkos*,NeighListKokkos*); - friend EV_FLOAT pair_compute_neighlist(PairLJClass2Kokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairLJClass2Kokkos*,NeighListKokkos*); friend void pair_virial_fdotr_compute(PairLJClass2Kokkos*); }; diff --git a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp index 36fd960c98..e2b57e8df7 100644 --- a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp @@ -300,9 +300,6 @@ void PairLJCutCoulCutKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/coul/cut/kk"); } diff --git a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp index 3810a0140b..bc8369fd65 100644 --- a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp @@ -329,9 +329,6 @@ void PairLJCutCoulDebyeKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/coul/debye/kk"); } diff --git a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp index b8818b1098..feb6a58136 100644 --- a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp @@ -322,9 +322,6 @@ void PairLJCutCoulDSFKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/coul/cut/kk"); } diff --git a/src/KOKKOS/pair_lj_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_kokkos.cpp index a4b2e90e07..1d1e6dd894 100644 --- a/src/KOKKOS/pair_lj_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_kokkos.cpp @@ -85,6 +85,7 @@ void PairLJCutKokkos::compute(int eflag_in, int vflag_in) ev_init(eflag,vflag,0); // reallocate per-atom arrays if necessary + // if (eflag_atom) { memoryKK->destroy_kokkos(k_eatom,eatom); @@ -241,9 +242,6 @@ void PairLJCutKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/kk"); } diff --git a/src/KOKKOS/pair_lj_cut_kokkos.h b/src/KOKKOS/pair_lj_cut_kokkos.h index 7e2b8fd91a..122aef5a1e 100644 --- a/src/KOKKOS/pair_lj_cut_kokkos.h +++ b/src/KOKKOS/pair_lj_cut_kokkos.h @@ -31,7 +31,7 @@ namespace LAMMPS_NS { template class PairLJCutKokkos : public PairLJCut { public: - enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; + enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=0}; typedef DeviceType device_type; typedef ArrayTypes AT; @@ -99,15 +99,12 @@ class PairLJCutKokkos : public PairLJCut { friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend EV_FLOAT pair_compute_neighlist(PairLJCutKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist(PairLJCutKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist(PairLJCutKokkos*,NeighListKokkos*); - friend EV_FLOAT pair_compute_neighlist(PairLJCutKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairLJCutKokkos*,NeighListKokkos*); friend void pair_virial_fdotr_compute(PairLJCutKokkos*); }; diff --git a/src/KOKKOS/pair_lj_expand_kokkos.cpp b/src/KOKKOS/pair_lj_expand_kokkos.cpp index 496a7a76ac..0409eda401 100644 --- a/src/KOKKOS/pair_lj_expand_kokkos.cpp +++ b/src/KOKKOS/pair_lj_expand_kokkos.cpp @@ -249,9 +249,6 @@ void PairLJExpandKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with lj/expand/kk"); } diff --git a/src/KOKKOS/pair_lj_expand_kokkos.h b/src/KOKKOS/pair_lj_expand_kokkos.h index 093031f7d7..bdd0bf5870 100644 --- a/src/KOKKOS/pair_lj_expand_kokkos.h +++ b/src/KOKKOS/pair_lj_expand_kokkos.h @@ -31,7 +31,7 @@ namespace LAMMPS_NS { template class PairLJExpandKokkos : public PairLJExpand { public: - enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; + enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=0}; typedef DeviceType device_type; typedef ArrayTypes AT; @@ -105,15 +105,12 @@ class PairLJExpandKokkos : public PairLJExpand { friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend EV_FLOAT pair_compute_neighlist(PairLJExpandKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist(PairLJExpandKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist(PairLJExpandKokkos*,NeighListKokkos*); - friend EV_FLOAT pair_compute_neighlist(PairLJExpandKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairLJExpandKokkos*,NeighListKokkos*); friend void pair_virial_fdotr_compute(PairLJExpandKokkos*); }; diff --git a/src/KOKKOS/pair_lj_sdk_kokkos.cpp b/src/KOKKOS/pair_lj_sdk_kokkos.cpp index 645f8a9159..70d04385d0 100644 --- a/src/KOKKOS/pair_lj_sdk_kokkos.cpp +++ b/src/KOKKOS/pair_lj_sdk_kokkos.cpp @@ -279,9 +279,6 @@ void PairLJSDKKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with lj/sdk/kk"); } diff --git a/src/KOKKOS/pair_lj_sdk_kokkos.h b/src/KOKKOS/pair_lj_sdk_kokkos.h index f313c4342f..db71dc4677 100644 --- a/src/KOKKOS/pair_lj_sdk_kokkos.h +++ b/src/KOKKOS/pair_lj_sdk_kokkos.h @@ -31,7 +31,7 @@ namespace LAMMPS_NS { template class PairLJSDKKokkos : public PairLJSDK { public: - enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; + enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=0}; typedef DeviceType device_type; typedef ArrayTypes AT; @@ -100,15 +100,12 @@ class PairLJSDKKokkos : public PairLJSDK { friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend EV_FLOAT pair_compute_neighlist(PairLJSDKKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist(PairLJSDKKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist(PairLJSDKKokkos*,NeighListKokkos*); - friend EV_FLOAT pair_compute_neighlist(PairLJSDKKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairLJSDKKokkos*,NeighListKokkos*); friend void pair_virial_fdotr_compute(PairLJSDKKokkos*); }; diff --git a/src/KOKKOS/pair_morse_kokkos.cpp b/src/KOKKOS/pair_morse_kokkos.cpp index 4e88c72518..16d4d8a0a3 100644 --- a/src/KOKKOS/pair_morse_kokkos.cpp +++ b/src/KOKKOS/pair_morse_kokkos.cpp @@ -258,9 +258,6 @@ void PairMorseKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with morse/kk"); } diff --git a/src/KOKKOS/pair_morse_kokkos.h b/src/KOKKOS/pair_morse_kokkos.h index f9cce941a5..ff3c552437 100644 --- a/src/KOKKOS/pair_morse_kokkos.h +++ b/src/KOKKOS/pair_morse_kokkos.h @@ -31,7 +31,7 @@ namespace LAMMPS_NS { template class PairMorseKokkos : public PairMorse { public: - enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; + enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=0}; typedef DeviceType device_type; PairMorseKokkos(class LAMMPS *); @@ -98,15 +98,12 @@ class PairMorseKokkos : public PairMorse { friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend EV_FLOAT pair_compute_neighlist(PairMorseKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist(PairMorseKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist(PairMorseKokkos*,NeighListKokkos*); - friend EV_FLOAT pair_compute_neighlist(PairMorseKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute(PairMorseKokkos*,NeighListKokkos*); friend void pair_virial_fdotr_compute(PairMorseKokkos*); }; diff --git a/src/KOKKOS/pair_table_kokkos.cpp b/src/KOKKOS/pair_table_kokkos.cpp index a86db70d4d..b2aaaf1566 100644 --- a/src/KOKKOS/pair_table_kokkos.cpp +++ b/src/KOKKOS/pair_table_kokkos.cpp @@ -136,12 +136,6 @@ void PairTableKokkos::compute_style(int eflag_in, int vflag_in) if (eflag || vflag) Kokkos::parallel_reduce(list->inum,f,ev); else Kokkos::parallel_for(list->inum,f); f.contribute(); - } else if (neighflag == N2) { - PairComputeFunctor,N2,false,S_TableCompute > - f(this,(NeighListKokkos*) list); - if (eflag || vflag) Kokkos::parallel_reduce(list->inum,f,ev); - else Kokkos::parallel_for(list->inum,f); - f.contribute(); } } else { if (neighflag == FULL) { @@ -162,12 +156,6 @@ void PairTableKokkos::compute_style(int eflag_in, int vflag_in) if (eflag || vflag) Kokkos::parallel_reduce(list->inum,f,ev); else Kokkos::parallel_for(list->inum,f); f.contribute(); - } else if (neighflag == N2) { - PairComputeFunctor,N2,true,S_TableCompute > - f(this,(NeighListKokkos*) list); - if (eflag || vflag) Kokkos::parallel_reduce(list->inum,f,ev); - else Kokkos::parallel_for(list->inum,f); - f.contribute(); } } @@ -525,9 +513,6 @@ void PairTableKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/kk"); } diff --git a/src/KOKKOS/pair_table_kokkos.h b/src/KOKKOS/pair_table_kokkos.h index eede023d7e..2f84e6a61e 100644 --- a/src/KOKKOS/pair_table_kokkos.h +++ b/src/KOKKOS/pair_table_kokkos.h @@ -41,7 +41,7 @@ template class PairTableKokkos : public PairTable { public: - enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; + enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; enum {COUL_FLAG=0}; typedef DeviceType device_type; typedef ArrayTypes AT; @@ -139,38 +139,30 @@ class PairTableKokkos : public PairTable { friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; - friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; - friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; - friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; - friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; - friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; - friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; - friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; friend class PairComputeFunctor >; - friend class PairComputeFunctor >; friend void pair_virial_fdotr_compute(PairTableKokkos*); }; diff --git a/src/KOKKOS/pair_table_rx_kokkos.cpp b/src/KOKKOS/pair_table_rx_kokkos.cpp index d78a5ee646..2b066d7633 100644 --- a/src/KOKKOS/pair_table_rx_kokkos.cpp +++ b/src/KOKKOS/pair_table_rx_kokkos.cpp @@ -665,8 +665,6 @@ void PairTableRXKokkos::compute_style(int eflag_in, int vflag_in) nspecies, isite1, isite2, fractionalWeighting, mixWtSite1old, mixWtSite2old, mixWtSite1, mixWtSite2); - if (neighflag == N2) error->all(FLERR,"pair table/rx/kk can't handle N2 yet\n"); - NeighListKokkos* l = dynamic_cast*>(list); @@ -1282,9 +1280,6 @@ void PairTableRXKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/kk"); } diff --git a/src/KOKKOS/pair_table_rx_kokkos.h b/src/KOKKOS/pair_table_rx_kokkos.h index 4230263dc9..7aba307476 100644 --- a/src/KOKKOS/pair_table_rx_kokkos.h +++ b/src/KOKKOS/pair_table_rx_kokkos.h @@ -30,7 +30,7 @@ namespace LAMMPS_NS { template class PairTableRXKokkos : public PairTable { public: - enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF|N2}; + enum {EnabledNeighFlags=FULL|HALFTHREAD|HALF}; typedef DeviceType device_type; PairTableRXKokkos(class LAMMPS *); diff --git a/src/KOKKOS/pair_yukawa_kokkos.h b/src/KOKKOS/pair_yukawa_kokkos.h index 5f4e823657..f24298d415 100644 --- a/src/KOKKOS/pair_yukawa_kokkos.h +++ b/src/KOKKOS/pair_yukawa_kokkos.h @@ -103,19 +103,15 @@ class PairYukawaKokkos : public PairYukawa { friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; friend class PairComputeFunctor; - friend class PairComputeFunctor; friend EV_FLOAT pair_compute_neighlist( PairYukawaKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist( PairYukawaKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute_neighlist( PairYukawaKokkos*,NeighListKokkos*); - friend EV_FLOAT pair_compute_neighlist( - PairYukawaKokkos*,NeighListKokkos*); friend EV_FLOAT pair_compute( PairYukawaKokkos*,NeighListKokkos*); friend void pair_virial_fdotr_compute(PairYukawaKokkos*); diff --git a/src/KOKKOS/pair_zbl_kokkos.cpp b/src/KOKKOS/pair_zbl_kokkos.cpp index fe34f58fa6..5e4ec398d9 100644 --- a/src/KOKKOS/pair_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_zbl_kokkos.cpp @@ -103,9 +103,6 @@ void PairZBLKokkos::init_style() } else if (neighflag == HALF || neighflag == HALFTHREAD) { neighbor->requests[irequest]->full = 0; neighbor->requests[irequest]->half = 1; - } else if (neighflag == N2) { - neighbor->requests[irequest]->full = 0; - neighbor->requests[irequest]->half = 0; } else { error->all(FLERR,"Cannot use chosen neighbor list style with lj/cut/kk"); }