Browse Source

When requested for only a single combined worker, also create workers of smaller sizes, but always using the same cpus, so that we keep the property of only one parallel task at a time

Samuel Thibault 13 years ago
parent
commit
37845e1678
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/sched_policies/detect_combined_workers.c

+ 3 - 3
src/sched_policies/detect_combined_workers.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2010-2011  Université de Bordeaux 1
+ * Copyright (C) 2010-2012  Université de Bordeaux 1
  * Copyright (C) 2011, 2012       Centre National de la Recherche Scientifique
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -466,10 +466,10 @@ static void combine_all_cpu_workers(struct starpu_machine_topology *topology)
 	    cpu_workers[ncpus++] = i;
     }
 
-    if (ncpus > 0)
+    for (i = 1; i <= ncpus; i++)
     {
 	int ret;
-	ret = starpu_combined_worker_assign_workerid(ncpus, cpu_workers);
+	ret = starpu_combined_worker_assign_workerid(i, cpu_workers);
 	STARPU_ASSERT(ret >= 0);
     }
 }