Explorar o código

Fix printing a perfmodel from a starpu application

Samuel Thibault %!s(int64=4) %!d(string=hai) anos
pai
achega
c00137a7ea

+ 4 - 0
src/core/perfmodel/perfmodel_history.c

@@ -1010,6 +1010,8 @@ static void dump_per_arch_model_xml(FILE *f, struct starpu_perfmodel *model, int
 
 void starpu_perfmodel_dump_xml(FILE *f, struct starpu_perfmodel *model)
 {
+	_starpu_init_and_load_perfmodel(model);
+
 	fprintf(f, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
 	fprintf(f, "<!DOCTYPE StarPUPerfmodel SYSTEM \"starpu-perfmodel.dtd\">\n");
 	fprintf(f, "<!-- symbol %s -->\n", model->symbol);
@@ -1496,6 +1498,8 @@ int starpu_perfmodel_load_file(const char *filename, struct starpu_perfmodel *mo
 
 	if (ret)
 		starpu_perfmodel_unload_model(model);
+	else
+		model->is_loaded = 1;
 	return ret;
 }
 

+ 1 - 0
src/core/perfmodel/perfmodel_print.c

@@ -172,6 +172,7 @@ void starpu_perfmodel_print(struct starpu_perfmodel *model, struct starpu_perfmo
 
 int starpu_perfmodel_print_all(struct starpu_perfmodel *model, char *arch, char *parameter, uint32_t *footprint, FILE *output)
 {
+	_starpu_init_and_load_perfmodel(model);
 	if (arch == NULL)
 	{
 		int comb, impl;