diff --git a/src/scheduler.c b/src/scheduler.c index d97fd65fe498d435d842380d88ece6d9a65ef63f..cd7c61525f6e37cb180dc4d7dfee1a8efe4b376c 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -173,6 +173,13 @@ static void scheduler_splittask(struct task *t, struct scheduler *s) { /* convert to a self-subtask. */ t->type = task_type_sub_self; + /* Make sure we have a drift task */ + lock_lock(&ci->lock); + if (ci->drift == NULL) + ci->drift = scheduler_addtask(s, task_type_drift, task_subtype_none, + 0, 0, ci, NULL, 0); + lock_unlock_blind(&ci->lock); + /* Depend on local sorts on this cell. */ if (ci->sorts != NULL) scheduler_addunlock(s, ci->sorts, t);