Browse Source

port r6503 from 1.0: Task sizes have to vary, not only can

Samuel Thibault 13 years ago
parent
commit
70d97054ff

+ 1 - 1
doc/chapters/advanced-examples.texi

@@ -349,7 +349,7 @@ struct starpu_codelet cl = @{
 
 @item
 Measured at runtime and refined by regression (@code{STARPU_*REGRESSION_BASED}
-model type). This still assumes performance regularity, but can work
+model type). This still assumes performance regularity, but works
 with various data input sizes, by applying regression over observed
 execution times. STARPU_REGRESSION_BASED uses an a*n^b regression
 form, STARPU_NL_REGRESSION_BASED uses an a*n^b+c (more precise than

+ 4 - 1
src/core/perfmodel/perfmodel_history.c

@@ -946,8 +946,11 @@ double _starpu_regression_based_job_expected_perf(struct starpu_perfmodel *model
 
 	regmodel = &model->per_arch[arch][nimpl].regression;
 
-	if (regmodel->valid)
+	if (regmodel->valid) {
+		fprintf(stderr, "model is valid\n");
                 exp = regmodel->alpha*pow((double)size, regmodel->beta);
+	} else
+		fprintf(stderr, "model is not valid\n");
 
 	return exp;
 }

+ 7 - 2
src/sched_policies/parallel_heft.c

@@ -306,17 +306,21 @@ static int _parallel_heft_push_task(struct starpu_task *task, unsigned prio)
 				nimpl_best = nimpl;
 			}
 
-			if (isnan(local_task_length[worker][nimpl]))
+			if (isnan(local_task_length[worker][nimpl])) {
 				/* we are calibrating, we want to speed-up calibration time
 				 * so we privilege non-calibrated tasks (but still
 				 * greedily distribute them to avoid dumb schedules) */
+				fprintf(stderr,"still nan\n");
 				calibrating = 1;
+			}
 
 			if (isnan(local_task_length[worker][nimpl])
-					|| _STARPU_IS_ZERO(local_task_length[worker][nimpl]))
+					|| _STARPU_IS_ZERO(local_task_length[worker][nimpl])) {
 				/* there is no prediction available for that task
 				 * with that arch yet, so switch to a greedy strategy */
+				fprintf(stderr,"unknown\n");
 				unknown = 1;
+			}
 
 			if (unknown)
 				continue;
@@ -442,6 +446,7 @@ static void initialize_parallel_heft_policy(struct starpu_machine_topology *topo
 	_starpu_sched_find_worker_combinations(topology);
 
 	ncombinedworkers = topology->ncombinedworkers;
+	fprintf(stderr,"combined %d\n", ncombinedworkers);
 
 	unsigned workerid;
 	for (workerid = 0; workerid < nworkers; workerid++)