forked from lijiext/lammps
Fix issue in Kokkos neighor binning when using non-Kokkos lists on GPUs
This commit is contained in:
parent
c00f2adb42
commit
5013fd699f
|
@ -40,6 +40,7 @@ NBinKokkos<DeviceType>::NBinKokkos(LAMMPS *lmp) : NBinStandard(lmp) {
|
|||
#endif
|
||||
h_resize() = 1;
|
||||
|
||||
kokkos = 1;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,8 @@ NBin::NBin(LAMMPS *lmp) : Pointers(lmp)
|
|||
|
||||
dimension = domain->dimension;
|
||||
triclinic = domain->triclinic;
|
||||
|
||||
kokkos = 0;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue