diff --git a/src/KOKKOS/npair_kokkos.cpp b/src/KOKKOS/npair_kokkos.cpp index 4fec623c5d..fb3149ca4b 100644 --- a/src/KOKKOS/npair_kokkos.cpp +++ b/src/KOKKOS/npair_kokkos.cpp @@ -151,7 +151,11 @@ void NPairKokkos::build(NeighList *list_) if (GHOST) nall += atom->nghost; - if (nall == 0) return; + if (nall == 0) { + list->inum = 0; + list->gnum = 0; + return; + } list->grow(nall);