Prevent view bounds error when a proc has no atoms

This commit is contained in:
Stan Moore
2022-06-28 11:32:48 -06:00
parent f497afa763
commit a279ab3860

View File

@ -153,6 +153,9 @@ void NPairKokkos<DeviceType,HALF_NEIGH,GHOST,TRI,SIZE>::build(NeighList *list_)
int nall = nlocal;
if (GHOST)
nall += atom->nghost;
if (nall == 0) return;
list->grow(nall);
NeighborKokkosExecute<DeviceType>