Fix GPU tag issues in other Kokkos styles
This commit is contained in:
committed by
Axel Kohlmeyer
parent
8e889dfa7c
commit
254c052ecc
@ -20,6 +20,7 @@
|
||||
#include "modify.h"
|
||||
#include "neigh_list_kokkos.h"
|
||||
#include "pair_kokkos.h"
|
||||
#include "atom_masks.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
@ -170,6 +171,7 @@ template <class DeviceType>
|
||||
void FixNeighHistoryKokkos<DeviceType>::post_neighbor()
|
||||
{
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
atomKK->sync(execution_space,TAG_MASK);
|
||||
|
||||
k_firstflag.sync<DeviceType>();
|
||||
k_firstvalue.sync<DeviceType>();
|
||||
|
||||
@ -111,7 +111,6 @@ void PairADPKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
nall = atom->nlocal + atom->nghost;
|
||||
newton_pair = force->newton_pair;
|
||||
|
||||
@ -120,7 +120,6 @@ class PairADPKokkos : public PairADP, public KokkosBase
|
||||
typename AT::t_x_array x;
|
||||
typename AT::t_f_array f;
|
||||
typename AT::t_int_1d type;
|
||||
typename AT::t_tagint_1d tag;
|
||||
|
||||
DAT::tdual_efloat_1d k_eatom;
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
|
||||
@ -101,7 +101,6 @@ void PairBuckKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
c_x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
nall = atom->nlocal + atom->nghost;
|
||||
newton_pair = force->newton_pair;
|
||||
|
||||
@ -74,7 +74,6 @@ class PairBuckKokkos : public PairBuck {
|
||||
typename AT::t_x_array c_x;
|
||||
typename AT::t_f_array f;
|
||||
typename AT::t_int_1d_randomread type;
|
||||
typename AT::t_tagint_1d tag;
|
||||
|
||||
DAT::tdual_efloat_1d k_eatom;
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
|
||||
@ -110,7 +110,6 @@ void PairEAMAlloyKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
nall = atom->nlocal + atom->nghost;
|
||||
newton_pair = force->newton_pair;
|
||||
|
||||
@ -119,7 +119,6 @@ class PairEAMAlloyKokkos : public PairEAM, public KokkosBase {
|
||||
typename AT::t_x_array x;
|
||||
typename AT::t_f_array f;
|
||||
typename AT::t_int_1d type;
|
||||
typename AT::t_tagint_1d tag;
|
||||
|
||||
DAT::tdual_efloat_1d k_eatom;
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
|
||||
@ -110,7 +110,6 @@ void PairEAMFSKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
nall = atom->nlocal + atom->nghost;
|
||||
newton_pair = force->newton_pair;
|
||||
|
||||
@ -119,7 +119,6 @@ class PairEAMFSKokkos : public PairEAM, public KokkosBase {
|
||||
typename AT::t_x_array x;
|
||||
typename AT::t_f_array f;
|
||||
typename AT::t_int_1d type;
|
||||
typename AT::t_tagint_1d tag;
|
||||
|
||||
DAT::tdual_efloat_1d k_eatom;
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
|
||||
@ -105,7 +105,6 @@ void PairEAMKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
nall = atom->nlocal + atom->nghost;
|
||||
newton_pair = force->newton_pair;
|
||||
|
||||
@ -115,7 +115,6 @@ class PairEAMKokkos : public PairEAM, public KokkosBase {
|
||||
typename AT::t_x_array x;
|
||||
typename AT::t_f_array f;
|
||||
typename AT::t_int_1d type;
|
||||
typename AT::t_tagint_1d tag;
|
||||
|
||||
DAT::tdual_efloat_1d k_eatom;
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
|
||||
@ -134,7 +134,6 @@ void PairGranHookeHistoryKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
torque = atomKK->k_torque.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
mask = atomKK->k_mask.view<DeviceType>();
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
rmass = atomKK->k_rmass.view<DeviceType>();
|
||||
radius = atomKK->k_radius.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
|
||||
@ -86,7 +86,6 @@ class PairGranHookeHistoryKokkos : public PairGranHookeHistory {
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
typename AT::t_efloat_1d d_eatom;
|
||||
typename AT::t_virial_array d_vatom;
|
||||
typename AT::t_tagint_1d tag;
|
||||
|
||||
typename AT::t_neighbors_2d d_neighbors;
|
||||
typename AT::t_int_1d_randomread d_ilist;
|
||||
|
||||
@ -102,7 +102,6 @@ void PairLJClass2Kokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
c_x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
nall = atom->nlocal + atom->nghost;
|
||||
newton_pair = force->newton_pair;
|
||||
|
||||
@ -80,7 +80,6 @@ class PairLJClass2Kokkos : public PairLJClass2 {
|
||||
typename AT::t_x_array c_x;
|
||||
typename AT::t_f_array f;
|
||||
typename AT::t_int_1d_randomread type;
|
||||
typename AT::t_tagint_1d tag;
|
||||
|
||||
DAT::tdual_efloat_1d k_eatom;
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
|
||||
@ -97,7 +97,6 @@ void PairLJCutKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
c_x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
nall = atom->nlocal + atom->nghost;
|
||||
newton_pair = force->newton_pair;
|
||||
|
||||
@ -80,7 +80,6 @@ class PairLJCutKokkos : public PairLJCut {
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
typename AT::t_efloat_1d d_eatom;
|
||||
typename AT::t_virial_array d_vatom;
|
||||
typename AT::t_tagint_1d tag;
|
||||
|
||||
int newton_pair;
|
||||
double special_lj[4];
|
||||
|
||||
@ -101,7 +101,6 @@ void PairLJExpandKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
c_x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
nall = atom->nlocal + atom->nghost;
|
||||
newton_pair = force->newton_pair;
|
||||
|
||||
@ -80,7 +80,6 @@ class PairLJExpandKokkos : public PairLJExpand {
|
||||
typename AT::t_x_array c_x;
|
||||
typename AT::t_f_array f;
|
||||
typename AT::t_int_1d_randomread type;
|
||||
typename AT::t_tagint_1d tag;
|
||||
|
||||
DAT::tdual_efloat_1d k_eatom;
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
|
||||
@ -101,7 +101,6 @@ void PairLJSDKKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
c_x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
nall = atom->nlocal + atom->nghost;
|
||||
newton_pair = force->newton_pair;
|
||||
|
||||
@ -77,7 +77,6 @@ class PairLJSDKKokkos : public PairLJSDK {
|
||||
typename AT::t_x_array c_x;
|
||||
typename AT::t_f_array f;
|
||||
typename AT::t_int_1d_randomread type;
|
||||
typename AT::t_tagint_1d tag;
|
||||
|
||||
DAT::tdual_efloat_1d k_eatom;
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
|
||||
@ -104,7 +104,6 @@ void PairMorseKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
c_x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
nall = atom->nlocal + atom->nghost;
|
||||
newton_pair = force->newton_pair;
|
||||
|
||||
@ -80,7 +80,6 @@ class PairMorseKokkos : public PairMorse {
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
typename ArrayTypes<DeviceType>::t_efloat_1d d_eatom;
|
||||
typename ArrayTypes<DeviceType>::t_virial_array d_vatom;
|
||||
typename ArrayTypes<DeviceType>::t_tagint_1d tag;
|
||||
|
||||
int newton_pair;
|
||||
double special_lj[4];
|
||||
|
||||
@ -60,7 +60,7 @@ PairTersoffKokkos<DeviceType>::PairTersoffKokkos(LAMMPS *lmp) : PairTersoff(lmp)
|
||||
kokkosable = 1;
|
||||
atomKK = (AtomKokkos *) atom;
|
||||
execution_space = ExecutionSpaceFromDevice<DeviceType>::space;
|
||||
datamask_read = X_MASK | F_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK;
|
||||
datamask_read = X_MASK | F_MASK | TAG_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK;
|
||||
datamask_modify = F_MASK | ENERGY_MASK | VIRIAL_MASK;
|
||||
}
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ PairTersoffMODKokkos<DeviceType>::PairTersoffMODKokkos(LAMMPS *lmp) : PairTersof
|
||||
kokkosable = 1;
|
||||
atomKK = (AtomKokkos *) atom;
|
||||
execution_space = ExecutionSpaceFromDevice<DeviceType>::space;
|
||||
datamask_read = X_MASK | F_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK;
|
||||
datamask_read = X_MASK | F_MASK | TAG_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK;
|
||||
datamask_modify = F_MASK | ENERGY_MASK | VIRIAL_MASK;
|
||||
}
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ PairTersoffZBLKokkos<DeviceType>::PairTersoffZBLKokkos(LAMMPS *lmp) : PairTersof
|
||||
kokkosable = 1;
|
||||
atomKK = (AtomKokkos *) atom;
|
||||
execution_space = ExecutionSpaceFromDevice<DeviceType>::space;
|
||||
datamask_read = X_MASK | F_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK;
|
||||
datamask_read = X_MASK | F_MASK | TAG_MASK | TYPE_MASK | ENERGY_MASK | VIRIAL_MASK;
|
||||
datamask_modify = F_MASK | ENERGY_MASK | VIRIAL_MASK;
|
||||
|
||||
if (strcmp(update->unit_style,"metal") == 0) {
|
||||
|
||||
@ -176,7 +176,6 @@ void PairYukawaKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
|
||||
c_x = atomKK->k_x.view<DeviceType>();
|
||||
f = atomKK->k_f.view<DeviceType>();
|
||||
type = atomKK->k_type.view<DeviceType>();
|
||||
tag = atomKK->k_tag.view<DeviceType>();
|
||||
nlocal = atom->nlocal;
|
||||
nall = atom->nlocal + atom->nghost;
|
||||
newton_pair = force->newton_pair;
|
||||
|
||||
@ -83,7 +83,6 @@ class PairYukawaKokkos : public PairYukawa {
|
||||
DAT::tdual_virial_array k_vatom;
|
||||
typename AT::t_efloat_1d d_eatom;
|
||||
typename AT::t_virial_array d_vatom;
|
||||
typename AT::t_tagint_1d tag;
|
||||
|
||||
int newton_pair;
|
||||
double special_lj[4];
|
||||
|
||||
Reference in New Issue
Block a user