diff --git a/src/Depend.sh b/src/Depend.sh index e55b100975..85542b21c0 100755 --- a/src/Depend.sh +++ b/src/Depend.sh @@ -195,6 +195,10 @@ if (test $1 = "ML-SNAP") then depend INTEL fi +if (test $1 = "ML-UF3") then + depend KOKKOS +fi + if (test $1 = "CG-SPICA") then depend GPU depend KOKKOS diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh index 94effc5d68..31359d4e4a 100755 --- a/src/KOKKOS/Install.sh +++ b/src/KOKKOS/Install.sh @@ -391,6 +391,8 @@ action pair_tersoff_mod_kokkos.cpp pair_tersoff_mod.cpp action pair_tersoff_mod_kokkos.h pair_tersoff_mod.h action pair_tersoff_zbl_kokkos.cpp pair_tersoff_zbl.cpp action pair_tersoff_zbl_kokkos.h pair_tersoff_zbl.h +action pair_uf3_kokkos.cpp pair_uf3.cpp +action pair_uf3_kokkos.h pair_uf3.h action pair_vashishta_kokkos.cpp pair_vashishta.cpp action pair_vashishta_kokkos.h pair_vashishta.h action pair_yukawa_kokkos.cpp diff --git a/src/KOKKOS/dihedral_hybrid_kokkos.h b/src/KOKKOS/dihedral_hybrid_kokkos.h index 29a3d29689..63a59505af 100644 --- a/src/KOKKOS/dihedral_hybrid_kokkos.h +++ b/src/KOKKOS/dihedral_hybrid_kokkos.h @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifdef BOND_CLASS +#ifdef DIHEDRAL_CLASS // clang-format off DihedralStyle(hybrid/kk,DihedralHybridKokkos); DihedralStyle(hybrid/kk/device,DihedralHybridKokkos); @@ -20,8 +20,8 @@ DihedralStyle(hybrid/kk/host,DihedralHybridKokkos); #else // clang-format off -#ifndef LMP_BOND_HYBRID_KOKKOS_H -#define LMP_BOND_HYBRID_KOKKOS_H +#ifndef LMP_DIHEDRAL_HYBRID_KOKKOS_H +#define LMP_DIHEDRAL_HYBRID_KOKKOS_H #include "dihedral_hybrid.h" #include "kokkos_type.h" @@ -40,13 +40,13 @@ class DihedralHybridKokkos : public DihedralHybrid { double memory_usage() override; private: - int maxbond_all; + int maxdihedral_all; class NeighborKokkos *neighborKK; - DAT::tdual_int_1d k_map; // which style each bond type points to - DAT::tdual_int_1d k_nbondlist; // # of bonds in sub-style bondlists - DAT::tdual_int_3d k_bondlist; // bondlist for each sub-style + DAT::tdual_int_1d k_map; // which style each dihedral type points to + DAT::tdual_int_1d k_ndihedrallist; // # of dihedrals in sub-style dihedrallists + DAT::tdual_int_3d k_dihedrallist; // dihedrallist for each sub-style void allocate() override; void deallocate() override; diff --git a/src/KOKKOS/improper_hybrid_kokkos.h b/src/KOKKOS/improper_hybrid_kokkos.h index f2a80f6a0c..78bafe5df6 100644 --- a/src/KOKKOS/improper_hybrid_kokkos.h +++ b/src/KOKKOS/improper_hybrid_kokkos.h @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#ifdef BOND_CLASS +#ifdef IMPROPER_CLASS // clang-format off ImproperStyle(hybrid/kk,ImproperHybridKokkos); ImproperStyle(hybrid/kk/device,ImproperHybridKokkos); @@ -20,8 +20,8 @@ ImproperStyle(hybrid/kk/host,ImproperHybridKokkos); #else // clang-format off -#ifndef LMP_BOND_HYBRID_KOKKOS_H -#define LMP_BOND_HYBRID_KOKKOS_H +#ifndef LMP_IMPROPER_HYBRID_KOKKOS_H +#define LMP_IMPROPER_HYBRID_KOKKOS_H #include "improper_hybrid.h" #include "kokkos_type.h" diff --git a/src/KOKKOS/pair_uf3_kokkos.h b/src/KOKKOS/pair_uf3_kokkos.h index 9fedfcc3de..952e2aba25 100644 --- a/src/KOKKOS/pair_uf3_kokkos.h +++ b/src/KOKKOS/pair_uf3_kokkos.h @@ -118,9 +118,11 @@ template class PairUF3Kokkos : public PairUF3 { std::vector get_dncoefficients(const double *knots, const double coefficient) const; template + KOKKOS_INLINE_FUNCTION void twobody(const int itype, const int jtype, const F_FLOAT r, F_FLOAT &evdwl, F_FLOAT &fpair) const; template + KOKKOS_INLINE_FUNCTION void threebody(const int itype, const int jtype, const int ktype, const F_FLOAT value_rij, const F_FLOAT value_rik, const F_FLOAT value_rjk, F_FLOAT &evdwl3, F_FLOAT (&fforce)[3]) const; diff --git a/src/ML-UF3/pair_uf3.cpp b/src/ML-UF3/pair_uf3.cpp index a952403287..1f91f25f5b 100644 --- a/src/ML-UF3/pair_uf3.cpp +++ b/src/ML-UF3/pair_uf3.cpp @@ -120,7 +120,6 @@ void PairUF3::settings(int narg, char **arg) "Invalid number of arguments for pair_style uf3" " Are you using a 2-body or 2 & 3-body UF potential?"); nbody_flag = utils::numeric(FLERR, arg[0], true, lmp); - const int num_of_elements = atom->ntypes; if (nbody_flag == 2) { pot_3b = false; manybody_flag = 0;