From 3c1f85269e2a5ef5bdda532449c93e6005506cd0 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Mon, 16 Jan 2017 21:11:23 +0000
Subject: [PATCH] Drift before send_xv even in the GIZMO case.

---
 src/engine.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/engine.c b/src/engine.c
index 6f571f9ece..14959143a7 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -718,9 +718,11 @@ void engine_addtasks_send(struct engine *e, struct cell *ci, struct cell *cj,
       /* The send_xv task should unlock the super-cell's ghost task. */
       scheduler_addunlock(s, t_xv, ci->super->ghost);
 
-      scheduler_addunlock(s, ci->super->drift, t_xv);
 #endif
 
+      /* Drift before you send */
+      scheduler_addunlock(s, ci->super->drift, t_xv);
+
       /* The super-cell's kick task should unlock the send_ti task. */
       if (t_ti != NULL) scheduler_addunlock(s, ci->super->kick, t_ti);
     }
-- 
GitLab