Просмотр исходного кода

Make the random policy check that the task can be executed

Samuel Thibault лет назад: 13
Родитель
Сommit
37850e3dae
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/sched_policies/random_policy.c

+ 1 - 1
src/sched_policies/random_policy.c

@@ -49,7 +49,7 @@ static int _random_push_task(struct starpu_task *task, unsigned prio)
 		enum starpu_perf_archtype perf_arch = starpu_worker_get_perf_archtype(worker);
 		double worker_alpha = starpu_worker_get_relative_speedup(perf_arch);
 
-		if (alpha + worker_alpha > random) {
+		if (alpha + worker_alpha > random && starpu_worker_can_execute_task(worker, task, 0)) {
 			/* we found the worker */
 			selected = worker;
 			break;