From 2dffd9113018536705af7787b426f459456a29b4 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <schaller@strw.leidenuniv.nl>
Date: Thu, 15 Nov 2018 18:05:16 +0100
Subject: [PATCH] Make sure the pair flags are correct when splitting tasks.

---
 src/scheduler.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/scheduler.c b/src/scheduler.c
index 28fb414698..74ef4b099a 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -489,6 +489,12 @@ static void scheduler_splittask_hydro(struct task *t, struct scheduler *s) {
       double shift[3];
       const int sid = space_getsid(s->space, &ci, &cj, shift);
 
+#ifdef SWIFT_DEBUG_CHECKS
+      if (sid != t->flags)
+        error("Got pair task with incorrect flags: sid=%d flags=%lld", sid,
+              t->flags);
+#endif
+
       /* Should this task be split-up? */
       if (cell_can_split_pair_hydro_task(ci) &&
           cell_can_split_pair_hydro_task(cj)) {
-- 
GitLab