소스 검색

hypervisor: fix the number of requested workers in app_driven_test.c

This fixes an assertion at scheduling context creation when the number of
workers (including CPU and GPU) is less than 6 as previously hardcoded.
Samuel Pitoiset 9 년 전
부모
커밋
41ddd72ff5
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      sc_hypervisor/examples/app_driven_test/app_driven_test.c

+ 3 - 2
sc_hypervisor/examples/app_driven_test/app_driven_test.c

@@ -112,8 +112,9 @@ int main()
 	if (ret == -ENODEV)
         return 77;
 
-	int nres1 = 6;
-	int nres2 = 6;
+	int num_workers = starpu_worker_get_count();
+	int nres1 = num_workers;
+	int nres2 = num_workers;
 	int ressources1[nres1];
 	int ressources2[nres2];
 	int i;