浏览代码

Make the random policy check that the task can be executed

Samuel Thibault 13 年之前
父节点
当前提交
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;