Browse Source

sc_hypervisor/examples: model->type must be set before calling starpu_perfmodel_init

Nathalie Furmento 11 years ago
parent
commit
5647acf0b1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      sc_hypervisor/examples/cholesky/cholesky_models.c

+ 1 - 1
sc_hypervisor/examples/cholesky/cholesky_models.c

@@ -131,8 +131,8 @@ void initialize_chol_model(struct starpu_perfmodel* model, char * symbol,
 		double (*cuda_cost_function)(struct starpu_task *, struct starpu_perfmodel_arch*, unsigned))
 		double (*cuda_cost_function)(struct starpu_task *, struct starpu_perfmodel_arch*, unsigned))
 {
 {
 	model->symbol = symbol;
 	model->symbol = symbol;
-	starpu_perfmodel_init(model);
 	model->type = STARPU_HISTORY_BASED;
 	model->type = STARPU_HISTORY_BASED;
+	starpu_perfmodel_init(model);
 	model->per_arch[STARPU_CPU_WORKER][0][0][0].cost_function = cpu_cost_function;
 	model->per_arch[STARPU_CPU_WORKER][0][0][0].cost_function = cpu_cost_function;
 	model->per_arch[STARPU_CUDA_WORKER][0][0][0].cost_function = cuda_cost_function;
 	model->per_arch[STARPU_CUDA_WORKER][0][0][0].cost_function = cuda_cost_function;
 }
 }