Fix issue in Kokkos neighor binning when using non-Kokkos lists on GPUs

This commit is contained in:
Stan Moore 2019-07-09 09:43:50 -06:00
parent c00f2adb42
commit 5013fd699f
4 changed files with 8 additions and 0 deletions

View File

@ -40,6 +40,7 @@ NBinKokkos<DeviceType>::NBinKokkos(LAMMPS *lmp) : NBinStandard(lmp) {
#endif
h_resize() = 1;
kokkos = 1;
}
/* ----------------------------------------------------------------------

View File

@ -301,6 +301,7 @@ void NeighborKokkos::build_kokkos(int topoflag)
if (style != Neighbor::NSQ) {
for (int i = 0; i < nbin; i++) {
if (!neigh_bin[i]->kokkos) atomKK->sync(Host,ALL_MASK);
neigh_bin[i]->bin_atoms_setup(nall);
neigh_bin[i]->bin_atoms();
}

View File

@ -35,6 +35,8 @@ NBin::NBin(LAMMPS *lmp) : Pointers(lmp)
dimension = domain->dimension;
triclinic = domain->triclinic;
kokkos = 0;
}
/* ---------------------------------------------------------------------- */

View File

@ -47,6 +47,10 @@ class NBin : protected Pointers {
virtual void setup_bins(int) = 0;
virtual void bin_atoms() = 0;
// Kokkos package
int kokkos; // 1 if class stores Kokkos data
protected:
// data from Neighbor class