Merge remote-tracking branch 'github/fix_issues' into collected-small-fixes

This commit is contained in:
Axel Kohlmeyer
2024-07-29 15:10:39 -04:00
6 changed files with 18 additions and 11 deletions

View File

@ -195,6 +195,10 @@ if (test $1 = "ML-SNAP") then
depend INTEL depend INTEL
fi fi
if (test $1 = "ML-UF3") then
depend KOKKOS
fi
if (test $1 = "CG-SPICA") then if (test $1 = "CG-SPICA") then
depend GPU depend GPU
depend KOKKOS depend KOKKOS

View File

@ -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_mod_kokkos.h pair_tersoff_mod.h
action pair_tersoff_zbl_kokkos.cpp pair_tersoff_zbl.cpp action pair_tersoff_zbl_kokkos.cpp pair_tersoff_zbl.cpp
action pair_tersoff_zbl_kokkos.h pair_tersoff_zbl.h 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.cpp pair_vashishta.cpp
action pair_vashishta_kokkos.h pair_vashishta.h action pair_vashishta_kokkos.h pair_vashishta.h
action pair_yukawa_kokkos.cpp action pair_yukawa_kokkos.cpp

View File

@ -11,7 +11,7 @@
See the README file in the top-level LAMMPS directory. See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#ifdef BOND_CLASS #ifdef DIHEDRAL_CLASS
// clang-format off // clang-format off
DihedralStyle(hybrid/kk,DihedralHybridKokkos); DihedralStyle(hybrid/kk,DihedralHybridKokkos);
DihedralStyle(hybrid/kk/device,DihedralHybridKokkos); DihedralStyle(hybrid/kk/device,DihedralHybridKokkos);
@ -20,8 +20,8 @@ DihedralStyle(hybrid/kk/host,DihedralHybridKokkos);
#else #else
// clang-format off // clang-format off
#ifndef LMP_BOND_HYBRID_KOKKOS_H #ifndef LMP_DIHEDRAL_HYBRID_KOKKOS_H
#define LMP_BOND_HYBRID_KOKKOS_H #define LMP_DIHEDRAL_HYBRID_KOKKOS_H
#include "dihedral_hybrid.h" #include "dihedral_hybrid.h"
#include "kokkos_type.h" #include "kokkos_type.h"
@ -40,13 +40,13 @@ class DihedralHybridKokkos : public DihedralHybrid {
double memory_usage() override; double memory_usage() override;
private: private:
int maxbond_all; int maxdihedral_all;
class NeighborKokkos *neighborKK; class NeighborKokkos *neighborKK;
DAT::tdual_int_1d k_map; // which style each bond type points to DAT::tdual_int_1d k_map; // which style each dihedral type points to
DAT::tdual_int_1d k_nbondlist; // # of bonds in sub-style bondlists DAT::tdual_int_1d k_ndihedrallist; // # of dihedrals in sub-style dihedrallists
DAT::tdual_int_3d k_bondlist; // bondlist for each sub-style DAT::tdual_int_3d k_dihedrallist; // dihedrallist for each sub-style
void allocate() override; void allocate() override;
void deallocate() override; void deallocate() override;

View File

@ -11,7 +11,7 @@
See the README file in the top-level LAMMPS directory. See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#ifdef BOND_CLASS #ifdef IMPROPER_CLASS
// clang-format off // clang-format off
ImproperStyle(hybrid/kk,ImproperHybridKokkos); ImproperStyle(hybrid/kk,ImproperHybridKokkos);
ImproperStyle(hybrid/kk/device,ImproperHybridKokkos); ImproperStyle(hybrid/kk/device,ImproperHybridKokkos);
@ -20,8 +20,8 @@ ImproperStyle(hybrid/kk/host,ImproperHybridKokkos);
#else #else
// clang-format off // clang-format off
#ifndef LMP_BOND_HYBRID_KOKKOS_H #ifndef LMP_IMPROPER_HYBRID_KOKKOS_H
#define LMP_BOND_HYBRID_KOKKOS_H #define LMP_IMPROPER_HYBRID_KOKKOS_H
#include "improper_hybrid.h" #include "improper_hybrid.h"
#include "kokkos_type.h" #include "kokkos_type.h"

View File

@ -118,9 +118,11 @@ template <class DeviceType> class PairUF3Kokkos : public PairUF3 {
std::vector<F_FLOAT> get_dncoefficients(const double *knots, const double coefficient) const; std::vector<F_FLOAT> get_dncoefficients(const double *knots, const double coefficient) const;
template <int EVFLAG> template <int EVFLAG>
KOKKOS_INLINE_FUNCTION
void twobody(const int itype, const int jtype, const F_FLOAT r, F_FLOAT &evdwl, void twobody(const int itype, const int jtype, const F_FLOAT r, F_FLOAT &evdwl,
F_FLOAT &fpair) const; F_FLOAT &fpair) const;
template <int EVFLAG> template <int EVFLAG>
KOKKOS_INLINE_FUNCTION
void threebody(const int itype, const int jtype, const int ktype, const F_FLOAT value_rij, 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, const F_FLOAT value_rik, const F_FLOAT value_rjk, F_FLOAT &evdwl3,
F_FLOAT (&fforce)[3]) const; F_FLOAT (&fforce)[3]) const;

View File

@ -120,7 +120,6 @@ void PairUF3::settings(int narg, char **arg)
"Invalid number of arguments for pair_style uf3" "Invalid number of arguments for pair_style uf3"
" Are you using a 2-body or 2 & 3-body UF potential?"); " Are you using a 2-body or 2 & 3-body UF potential?");
nbody_flag = utils::numeric(FLERR, arg[0], true, lmp); nbody_flag = utils::numeric(FLERR, arg[0], true, lmp);
const int num_of_elements = atom->ntypes;
if (nbody_flag == 2) { if (nbody_flag == 2) {
pot_3b = false; pot_3b = false;
manybody_flag = 0; manybody_flag = 0;