From dc0dcacd04b2f357b15bf9c6043e09ed5ec9e421 Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Wed, 25 Jan 2017 12:17:09 +0000
Subject: [PATCH] Skip none tasks when checking for scheduled stuff. Clean-up
 more properties of none tasks.

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

diff --git a/src/scheduler.c b/src/scheduler.c
index 6d721f96d8..62b792e0c8 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -138,6 +138,8 @@ static void scheduler_splittask(struct task *t, struct scheduler *s) {
         ((t->type == task_type_timestep) && t->ci->nodeID != s->nodeID) ||
         ((t->type == task_type_init) && t->ci->nodeID != s->nodeID)) {
       t->type = task_type_none;
+      t->subtype = task_subtype_none;
+      t->cj = NULL;
       t->skip = 1;
       break;
     }
@@ -1083,6 +1085,8 @@ void scheduler_start(struct scheduler *s) {
       struct cell *ci = t->ci;
       struct cell *cj = t->cj;
 
+      if (t->type == task_type_none) continue;
+
       /* Don't check MPI stuff */
       if (t->type == task_type_send || t->type == task_type_recv) continue;
 
-- 
GitLab