Browse Source

putting assert on the right place: veryfing that model->symbol is defined

Luka Stanisic 9 years ago
parent
commit
7fae25e322
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/perfmodel/perfmodel_history.c

+ 2 - 2
src/core/perfmodel/perfmodel_history.c

@@ -940,11 +940,11 @@ void _starpu_load_history_based_model(struct starpu_perfmodel *model, unsigned s
 	if(!model->is_loaded)
 	{
 		char path[256];
-		starpu_perfmodel_get_model_path(model->symbol, path, 256);
-
 		// Check if a symbol is defined before trying to load the model from a file
 		STARPU_ASSERT_MSG(model->symbol, "history-based performance models must have a symbol");
 
+		starpu_perfmodel_get_model_path(model->symbol, path, 256);
+
 		_STARPU_DEBUG("Opening performance model file %s for model %s ...\n", path, model->symbol);
 
 		unsigned calibrate_flag = _starpu_get_calibrate_flag();