瀏覽代碼

Force calibration when a performance model is not calibrated enough

Samuel Thibault 13 年之前
父節點
當前提交
f4c1ae58fa
共有 1 個文件被更改,包括 7 次插入1 次删除
  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
 		 * of that task and the scheduler should perhaps put it aside */
 		/* 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;
 }