From 4210abfc795fdbefc6ea61b6eb2cc5e1476ad96a Mon Sep 17 00:00:00 2001
From: Axel Kohlmeyer <akohlmey@gmail.com>
Date: Tue, 13 Feb 2018 18:15:17 +0100
Subject: [PATCH] bugifx for using compute chunk/atom with compress via rerun
 or right at the beginning of a run

---
 src/compute_chunk_atom.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp
index dcfd2ff131..aa1210caad 100644
--- a/src/compute_chunk_atom.cpp
+++ b/src/compute_chunk_atom.cpp
@@ -712,13 +712,14 @@ void ComputeChunkAtom::compute_ichunk()
     return;
   }
 
-  invoked_ichunk = update->ntimestep;
-
   // assign chunk IDs to atoms
   // will exclude atoms not in group or in optional region
   // already invoked if this is same timestep as last setup_chunks()
+  // however, when between runs or using rerun, we need it again.
 
-  if (update->ntimestep > invoked_setup) assign_chunk_ids();
+  if ((update->ntimestep > invoked_setup) || (invoked_ichunk < 0)) assign_chunk_ids();
+
+  invoked_ichunk = update->ntimestep;
 
   // compress chunk IDs via hash of the original uncompressed IDs
   // also apply discard rule except for binning styles which already did
-- 
GitLab