From c6e81164fb8b66d42d54efde2d50a3179cc8010b Mon Sep 17 00:00:00 2001
From: Pedro Gonnet <gonnet@google.com>
Date: Wed, 26 Apr 2017 21:49:41 +0200
Subject: [PATCH] also activate the drift of the local cell in the pair.

---
 src/cell.c   | 4 ++++
 src/engine.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/src/cell.c b/src/cell.c
index 82bc269265..5c1de13bcd 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -1305,10 +1305,12 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
         if (l == NULL) error("Missing link to send_xv task.");
         scheduler_activate(s, l->t);
 
+        /* Drift both cells, the foreign one at the level which it is sent. */
         if (l->t->ci->drift)
           scheduler_activate(s, l->t->ci->drift);
         else
           error("Drift task missing !");
+        scheduler_activate(s, cj->drift);
 
         if (cell_is_active(cj, e)) {
           for (l = cj->send_rho; l != NULL && l->t->cj->nodeID != ci->nodeID;
@@ -1341,10 +1343,12 @@ int cell_unskip_tasks(struct cell *c, struct scheduler *s) {
         if (l == NULL) error("Missing link to send_xv task.");
         scheduler_activate(s, l->t);
 
+        /* Drift both cells, the foreign one at the level which it is sent. */
         if (l->t->ci->drift)
           scheduler_activate(s, l->t->ci->drift);
         else
           error("Drift task missing !");
+        scheduler_activate(s, ci->drift);
 
         if (cell_is_active(ci, e)) {
           for (l = ci->send_rho; l != NULL && l->t->cj->nodeID != cj->nodeID;
diff --git a/src/engine.c b/src/engine.c
index 687093cace..128d445b58 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -2528,10 +2528,12 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
         if (l == NULL) error("Missing link to send_xv task.");
         scheduler_activate(s, l->t);
 
+        /* Drift both cells, the foreign one at the level which it is sent. */
         if (l->t->ci->drift)
           scheduler_activate(s, l->t->ci->drift);
         else
           error("Drift task missing !");
+        scheduler_activate(s, cj->drift);
 
         if (cell_is_active(cj, e)) {
           for (l = cj->send_rho; l != NULL && l->t->cj->nodeID != ci->nodeID;
@@ -2564,10 +2566,12 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
         if (l == NULL) error("Missing link to send_xv task.");
         scheduler_activate(s, l->t);
 
+        /* Drift both cells, the foreign one at the level which it is sent. */
         if (l->t->ci->drift)
           scheduler_activate(s, l->t->ci->drift);
         else
           error("Drift task missing !");
+        scheduler_activate(s, ci->drift);
 
         if (cell_is_active(ci, e)) {
           for (l = ci->send_rho; l != NULL && l->t->cj->nodeID != cj->nodeID;
-- 
GitLab