|
@@ -310,31 +310,33 @@ static int _parallel_heft_push_task(struct starpu_task *task, unsigned prio)
|
|
|
{
|
|
|
for (worker = 0; worker < nworkers+ncombinedworkers; worker++)
|
|
|
{
|
|
|
-
|
|
|
- if (skip_worker[worker][nimpl])
|
|
|
- {
|
|
|
- /* no one on that queue may execute this task */
|
|
|
- continue;
|
|
|
- }
|
|
|
-
|
|
|
- fitness[worker][nimpl] = alpha*(local_exp_end[worker][nimpl] - best_exp_end)
|
|
|
- + beta*(local_data_penalty[worker][nimpl])
|
|
|
- + _gamma*(local_power[worker][nimpl]);
|
|
|
-
|
|
|
- if (local_exp_end[worker][nimpl] > max_exp_end)
|
|
|
- /* This placement will make the computation
|
|
|
- * longer, take into account the idle
|
|
|
- * consumption of other cpus */
|
|
|
- fitness[worker][nimpl] += _gamma * idle_power * (local_exp_end[worker][nimpl] - max_exp_end) / 1000000.0;
|
|
|
-
|
|
|
- if (best == -1 || fitness[worker][nimpl] < best_fitness)
|
|
|
+ for (nimpl = 0; nimpl < STARPU_MAXIMPLEMENTATIONS; nimpl++)
|
|
|
{
|
|
|
- /* we found a better solution */
|
|
|
- best_fitness = fitness[worker][nimpl];
|
|
|
- best = worker;
|
|
|
+ if (skip_worker[worker][nimpl])
|
|
|
+ {
|
|
|
+ /* no one on that queue may execute this task */
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ fitness[worker][nimpl] = alpha*(local_exp_end[worker][nimpl] - best_exp_end)
|
|
|
+ + beta*(local_data_penalty[worker][nimpl])
|
|
|
+ + _gamma*(local_power[worker][nimpl]);
|
|
|
+
|
|
|
+ if (local_exp_end[worker][nimpl] > max_exp_end)
|
|
|
+ /* This placement will make the computation
|
|
|
+ * longer, take into account the idle
|
|
|
+ * consumption of other cpus */
|
|
|
+ fitness[worker][nimpl] += _gamma * idle_power * (local_exp_end[worker][nimpl] - max_exp_end) / 1000000.0;
|
|
|
+
|
|
|
+ if (best == -1 || fitness[worker][nimpl] < best_fitness)
|
|
|
+ {
|
|
|
+ /* we found a better solution */
|
|
|
+ best_fitness = fitness[worker][nimpl];
|
|
|
+ best = worker;
|
|
|
+ }
|
|
|
+
|
|
|
+ // fprintf(stderr, "FITNESS worker %d -> %e local_exp_end %e - local_data_penalty %e\n", worker, fitness[worker][nimpl], local_exp_end[worker][nimpl] - best_exp_end, local_data_penalty[worker][nimpl]);
|
|
|
}
|
|
|
-
|
|
|
- // fprintf(stderr, "FITNESS worker %d -> %e local_exp_end %e - local_data_penalty %e\n", worker, fitness[worker][nimpl], local_exp_end[worker][nimpl] - best_exp_end, local_data_penalty[worker][nimpl]);
|
|
|
}
|
|
|
}
|
|
|
|