Browse Source

Force calibration when a performance model is not calibrated enough

Samuel Thibault 13 years ago
parent
commit
f4c1ae58fa
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/core/perfmodel/perfmodel_history.c

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

@@ -881,7 +881,13 @@ double _starpu_history_based_job_expected_perf(struct starpu_perfmodel_t *model,
 		/* TODO: report differently if we've scheduled really enough
 		/* TODO: report differently if we've scheduled really enough
 		 * of that task and the scheduler should perhaps put it aside */
 		 * of that task and the scheduler should perhaps put it aside */
 		/* Not calibrated enough */
 		/* Not calibrated enough */
-		return -1.0;
+		exp = -1.0;
+
+	if (exp == -1.0 && !model->benchmarking) {
+		_STARPU_DISP("Warning: model %s is not calibrated enough, forcing calibration for this run. Use the STARPU_CALIBRATE environment variable to control this.\n", model->symbol);
+		_starpu_set_calibrate_flag(1);
+		model->benchmarking = 1;
+	}
 
 
 	return exp;
 	return exp;
 }
 }