-----------------------------------------------------------------------
r7056 | thibault | 2012-07-24 08:37:58 +0200 (mar. 24 juil. 2012) | 1 ligne

Fix cpuset of combined workers, they have to be physical cpusets, not logical
-----------------------------------------------------------------------

Index: starpu/src/core/topology.c
===================================================================
--- starpu/src/core/topology.c	(révision 7055)
+++ starpu/src/core/topology.c	(révision 7056)
@@ -832,17 +832,15 @@
 #endif /* __GLIBC__ */
 
 #ifdef STARPU_HAVE_HWLOC
-		/* Clear the cpu set and set the cpu */
-		workerarg->initial_hwloc_cpu_set = hwloc_bitmap_alloc();
-		hwloc_bitmap_only(workerarg->initial_hwloc_cpu_set, workerarg->bindid);
-		workerarg->current_hwloc_cpu_set = hwloc_bitmap_alloc();
-		hwloc_bitmap_only(workerarg->current_hwloc_cpu_set, workerarg->bindid);
-
 		/* Put the worker descriptor in the userdata field of the hwloc object describing the CPU */
 		hwloc_obj_t worker_obj;
 		worker_obj = hwloc_get_obj_by_depth(config->topology.hwtopology,
 					config->cpu_depth, workerarg->bindid);
 		worker_obj->userdata = &config->workers[worker];
+
+		/* Clear the cpu set and set the cpu */
+		workerarg->initial_hwloc_cpu_set = hwloc_bitmap_dup(worker_obj->cpuset);
+		workerarg->current_hwloc_cpu_set = hwloc_bitmap_dup(worker_obj->cpuset);
 #endif
 	}
 }

-----------------------------------------------------------------------
r6975 | thibault | 2012-07-20 08:52:40 +0200 (ven. 20 juil. 2012) | 1 ligne

Fix choosing the right CPU for driving GPU
-----------------------------------------------------------------------

Index: starpu/src/core/perfmodel/perfmodel_bus.c
===================================================================
--- starpu/src/core/perfmodel/perfmodel_bus.c	(révision 6974)
+++ starpu/src/core/perfmodel/perfmodel_bus.c	(révision 6975)
@@ -341,11 +341,11 @@
 	double right_dtoh = right->timing_dtoh;
 	double right_htod = right->timing_htod;
 
-	double bandwidth_sum2_left = left_dtoh*left_dtoh + left_htod*left_htod;
-	double bandwidth_sum2_right = right_dtoh*right_dtoh + right_htod*right_htod;
+	double timing_sum2_left = left_dtoh*left_dtoh + left_htod*left_htod;
+	double timing_sum2_right = right_dtoh*right_dtoh + right_htod*right_htod;
 
 	/* it's for a decreasing sorting */
-	return (bandwidth_sum2_left < bandwidth_sum2_right);
+	return (timing_sum2_left > timing_sum2_right);
 }
 
 #ifdef STARPU_HAVE_HWLOC
