From 66da9d09385d0415f3ffd29414c8c63f06d65aab Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Wed, 18 Jan 2017 13:47:50 +0000
Subject: [PATCH] Dependency between the recv_rho and recv_ti tasks

---
 src/engine.c |  4 ++--
 src/runner.c | 11 +----------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/engine.c b/src/engine.c
index cbfe71e2ae..5ca6ab413d 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -813,7 +813,7 @@ void engine_addtasks_recv(struct engine *e, struct cell *c, struct task *t_xv,
   }
   for (struct link *l = c->force; l != NULL; l = l->next) {
     scheduler_addunlock(s, t_gradient, l->t);
-    if (t_ti != NULL) scheduler_addunlock(s, l->t, t_ti);
+    scheduler_addunlock(s, l->t, t_ti);
   }
   if (c->sorts != NULL) scheduler_addunlock(s, t_xv, c->sorts);
 #else
@@ -823,7 +823,7 @@ void engine_addtasks_recv(struct engine *e, struct cell *c, struct task *t_xv,
   }
   for (struct link *l = c->force; l != NULL; l = l->next) {
     scheduler_addunlock(s, t_rho, l->t);
-    // scheduler_addunlock(s, l->t, c->time);
+    scheduler_addunlock(s, l->t, t_ti);
   }
   if (c->sorts != NULL) scheduler_addunlock(s, t_xv, c->sorts);
 #endif
diff --git a/src/runner.c b/src/runner.c
index 612e75c86f..005c29bf4a 100644
--- a/src/runner.c
+++ b/src/runner.c
@@ -869,15 +869,11 @@ void runner_do_kick1(struct runner *r, struct cell *c, int timer) {
         const integertime_t ti_end =
             get_integer_time_end(ti_current, p->time_bin);
 
-<<<<<<< HEAD
-        if (ti_end - ti_begin != ti_step) error("Particle in wrong time-bin, ti_end=%lld, ti_begin=%lld, ti_step=%lld time_bin=%d ti_current=%lld", ti_end, ti_begin, ti_step, p->time_bin, ti_current);
-=======
-        if (ti_end - ti_begin != ti_step && ti_current > 0)
+        if (ti_end - ti_begin != ti_step)
           error(
               "Particle in wrong time-bin, ti_end=%lld, ti_begin=%lld, "
               "ti_step=%lld time_bin=%d ti_current=%lld",
               ti_end, ti_begin, ti_step, p->time_bin, ti_current);
->>>>>>> 674f1bc38893e37847ea3c773e3f34ae27ed8a65
 #endif
 
         /* do the kick */
@@ -959,16 +955,11 @@ void runner_do_kick2(struct runner *r, struct cell *c, int timer) {
             get_integer_time_begin(ti_current, p->time_bin);
 
 #ifdef SWIFT_DEBUG_CHECKS
-<<<<<<< HEAD
         if (ti_begin + ti_step != ti_current) 
-	  error("Particle in wrong time-bin, ti_begin=%lld, ti_step=%lld time_bin=%d ti_current=%lld", ti_begin, ti_step, p->time_bin, ti_current);
-=======
-        if (ti_begin + ti_step != ti_current && ti_current > 0)
           error(
               "Particle in wrong time-bin, ti_begin=%lld, ti_step=%lld "
               "time_bin=%d ti_current=%lld",
               ti_begin, ti_step, p->time_bin, ti_current);
->>>>>>> 674f1bc38893e37847ea3c773e3f34ae27ed8a65
 #endif
 
         /* Finish the time-step with a second half-kick */
-- 
GitLab