Browse Source

perfmodel: symbol needs to be set before calling starpu_perfmodel_init

Nathalie Furmento 11 years ago
parent
commit
244c9621c2

+ 1 - 1
examples/cholesky/cholesky_models.c

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

+ 1 - 1
examples/heat/lu_kernels_model.c

@@ -219,9 +219,9 @@ void initialize_lu_kernels_model(struct starpu_perfmodel* model, char * symbol,
 		double (*cpu_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;
 	starpu_perfmodel_init(model);
 	model->type = STARPU_HISTORY_BASED;
-	model->symbol = symbol;
 	model->cost_function = cost_function;
 	model->per_arch[STARPU_CPU_WORKER][0][0][0].cost_function = cpu_cost_function;
 	if(starpu_worker_get_count_by_type(STARPU_CUDA_WORKER) != 0)

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

@@ -130,9 +130,9 @@ void initialize_chol_model(struct starpu_perfmodel* model, char * symbol,
 		double (*cpu_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;
 	starpu_perfmodel_init(model);
 	model->type = STARPU_HISTORY_BASED;
-	model->symbol = symbol;
 	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;
 }