Browse Source

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 years ago
parent
commit
41ddd72ff5
1 changed files with 3 additions and 2 deletions
  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;