소스 검색

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;