From d705ed96c8474c46642b5e5bd322d0359d99a3d4 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Mon, 1 Apr 2019 09:52:38 +0200 Subject: [PATCH] Do not forget to activate the self-feedback task in the unskipping MPI case. --- src/cell.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/cell.c b/src/cell.c index 95e323307a..22feeca040 100644 --- a/src/cell.c +++ b/src/cell.c @@ -3574,20 +3574,31 @@ int cell_unskip_stars_tasks(struct cell *c, struct scheduler *s) { const int cj_nodeID = nodeID; #endif - /* We only want to activate the task if the cell is active and is - going to update some gas on the *local* node */ - if ((ci_nodeID == nodeID && cj_nodeID == nodeID) && - (ci_active || cj_active)) { + if (t->type == task_type_self && ci_active) { + scheduler_activate(s, t); + } + else if (t->type == task_type_sub_self && ci_active) { scheduler_activate(s, t); + } - } else if ((ci_nodeID == nodeID && cj_nodeID != nodeID) && (cj_active)) { + else if (t->type == task_type_pair || t->type == task_type_sub_pair) { - scheduler_activate(s, t); + /* We only want to activate the task if the cell is active and is + going to update some gas on the *local* node */ + if ((ci_nodeID == nodeID && cj_nodeID == nodeID) && + (ci_active || cj_active)) { - } else if ((ci_nodeID != nodeID && cj_nodeID == nodeID) && (ci_active)) { + scheduler_activate(s, t); - scheduler_activate(s, t); + } else if ((ci_nodeID == nodeID && cj_nodeID != nodeID) && (cj_active)) { + + scheduler_activate(s, t); + + } else if ((ci_nodeID != nodeID && cj_nodeID == nodeID) && (ci_active)) { + + scheduler_activate(s, t); + } } /* Nothing more to do here, all drifts and sorts activated above */ -- GitLab