diff --git a/src/KOKKOS/pair_snap_kokkos_impl.h b/src/KOKKOS/pair_snap_kokkos_impl.h index 810d30e3ce..bcece9626a 100644 --- a/src/KOKKOS/pair_snap_kokkos_impl.h +++ b/src/KOKKOS/pair_snap_kokkos_impl.h @@ -82,14 +82,14 @@ PairSNAPKokkos::~PairSNAPKokkos() template void PairSNAPKokkos::init_style() { - //if constexpr (host_flag) { - // if (lmp->kokkos->nthreads > 1) - // error->all(FLERR,"Pair style snap/kk can currently only run on a single " - // "CPU thread"); + if constexpr (host_flag) { + if (lmp->kokkos->nthreads > 1) + error->all(FLERR,"Pair style snap/kk can currently only run on a single " + "CPU thread"); - // PairSNAP::init_style(); - // return; - //} + PairSNAP::init_style(); + return; + } if (force->newton_pair == 0) error->all(FLERR,"Pair style SNAP requires newton pair on"); @@ -131,12 +131,12 @@ struct FindMaxNumNeighs { template void PairSNAPKokkos::compute(int eflag_in, int vflag_in) { - //if constexpr (host_flag) { - // atomKK->sync(Host,X_MASK|F_MASK|TYPE_MASK); - // PairSNAP::compute(eflag_in,vflag_in); - // atomKK->modified(Host,F_MASK); - // return; - //} + if constexpr (host_flag) { + atomKK->sync(Host,X_MASK|F_MASK|TYPE_MASK); + PairSNAP::compute(eflag_in,vflag_in); + atomKK->modified(Host,F_MASK); + return; + } eflag = eflag_in; vflag = vflag_in;