From f8cfc4e687ffb66da41db887cf4d4abc5dfeb83f Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Wed, 1 May 2019 15:51:58 +0200
Subject: [PATCH] Prevent the code from running the stellar ghost on a foreign
 node.

---
 src/runner.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/runner.c b/src/runner.c
index f722a51d9c..4dd6edd219 100644
--- a/src/runner.c
+++ b/src/runner.c
@@ -171,6 +171,11 @@ void runner_do_stars_ghost(struct runner *r, struct cell *c, int timer) {
 
   TIMER_TIC;
 
+#ifdef SWIFT_DEBUG_CHECKS
+  if (c->nodeID != e->nodeID)
+    error("Running the star ghost on a foreign node!");
+#endif
+
   /* Anything to do here? */
   if (c->stars.count == 0) return;
   if (!cell_is_active_stars(c, e)) return;
-- 
GitLab