Browse Source

ws: fix work stealing

Samuel Thibault 4 years ago
parent
commit
defd7a25b0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/sched_policies/work_stealing_policy.c

+ 3 - 1
src/sched_policies/work_stealing_policy.c

@@ -140,8 +140,10 @@ static int select_victim_round_robin(struct _starpu_work_stealing_data *ws, unsi
 		if (!ws->per_worker[workerids[worker]].notask)
 		{
 			if (ws->per_worker[workerids[worker]].busy
-						   || starpu_worker_is_blocked_in_parallel(workerids[worker]))
+						   || starpu_worker_is_blocked_in_parallel(workerids[worker])) {
+				ntasks = 1;
 				break;
+			}
 		}
 
 		worker = (worker + 1) % nworkers;