From dca90d44b7b6250fd04ce1a6f27e3a96d94e4b04 Mon Sep 17 00:00:00 2001 From: stamoor Date: Wed, 27 Jan 2016 18:40:46 +0000 Subject: [PATCH] Fixing Kokkos bug git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14505 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/KOKKOS/neighbor_kokkos.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/KOKKOS/neighbor_kokkos.cpp b/src/KOKKOS/neighbor_kokkos.cpp index 857d6f8090..b7c0e9a068 100644 --- a/src/KOKKOS/neighbor_kokkos.cpp +++ b/src/KOKKOS/neighbor_kokkos.cpp @@ -420,7 +420,8 @@ void NeighborKokkos::build_kokkos(int topoflag) x = atomKK->k_x; int nlocal = atom->nlocal; if (includegroup) nlocal = atom->nfirst; - if (nlocal > maxhold) { + int maxhold_kokkos = xhold.view().dimension_0(); + if (nlocal > maxhold || maxhold_kokkos < maxhold) { maxhold = atom->nmax; xhold = DAT::tdual_x_array("neigh:xhold",maxhold); }