Browse Source

Merge branch 'master' into fpga

Nathalie Furmento 4 years ago
parent
commit
18cd8b0f44

+ 7 - 1
examples/mlr/mlr.c

@@ -185,7 +185,7 @@ int main(void)
 		vector_mn[1] = n;
 		starpu_data_release(vector_mn_handle);
 
-		for (j = 0; j < 42; j++)
+		for (j = 0; j < 1000; j++)
 		{
 			starpu_insert_task(&cl_init,
 					   STARPU_R, vector_mn_handle,
@@ -202,5 +202,11 @@ int main(void)
 	free(vector_mn);
 	starpu_shutdown();
 
+	ret = starpu_init(NULL);
+	if (ret == -ENODEV)
+		return 77;
+	starpu_perfmodel_dump_xml(stdout, &cl_model_final);
+	starpu_shutdown();
+
 	return 0;
 }

+ 1 - 1
include/starpu_clusters.h

@@ -122,7 +122,7 @@ struct starpu_cluster_machine* starpu_cluster_machine(hwloc_obj_type_t cluster_l
 int starpu_uncluster_machine(struct starpu_cluster_machine* clusters);
 int starpu_cluster_print(struct starpu_cluster_machine* clusters);
 
-/* Prologue functions */
+/** Prologue functions */
 void starpu_openmp_prologue(void*);
 #define starpu_intel_openmp_mkl_prologue starpu_openmp_prologue
 #ifdef STARPU_MKL

+ 5 - 5
include/starpu_config.h.in

@@ -218,9 +218,9 @@
 #undef STARPU_MAXNUMANODES
 
 /**
- * Define the maximum number of CUDA devices that are supported by StarPU.
- * @ingroup API_CUDA_Extensions
- */
+   Define the maximum number of CUDA devices that are supported by StarPU.
+   @ingroup API_CUDA_Extensions
+*/
 #undef STARPU_MAXCUDADEVS
 
 /**
@@ -318,10 +318,10 @@ typedef ssize_t starpu_ssize_t;
 #undef STARPU_PTHREAD_COND_INITIALIZER_ZERO
 #undef STARPU_PTHREAD_RWLOCK_INITIALIZER_ZERO
 
-/* This is only for building examples */
+/** This is only for building examples */
 #undef STARPU_HAVE_HELGRIND_H
 
-/* Enable Fortran to C MPI interface */
+/** Enable Fortran to C MPI interface */
 #undef  HAVE_MPI_COMM_F2C
 
 #undef STARPU_HAVE_DARWIN

+ 3 - 1
include/starpu_data.h

@@ -115,7 +115,9 @@ enum starpu_data_access_mode
 
 struct starpu_data_interface_ops;
 
-/** Set the name of the data, to be shown in various profiling tools. */
+/**
+   Set the name of the data, to be shown in various profiling tools.
+*/
 void starpu_data_set_name(starpu_data_handle_t handle, const char *name);
 
 /**

+ 1 - 1
src/core/perfmodel/multiple_regression.c

@@ -329,7 +329,7 @@ int _starpu_multiple_regression(struct starpu_perfmodel_history_list *ptr, doubl
 		/* Basic validation of the model accuracy */
 		starpu_validate_mlr(coeff, ncoeff, codelet_name);
 #else
-		_STARPU_DISP("Warning: StarPU was compiled with '--disable-mlr' option or on Windows machine, thus multiple linear regression model will not be computed.\n");
+		_STARPU_DISP("Warning: StarPU was compiled without '--enable-mlr' option, thus multiple linear regression model will not be computed.\n");
 		for(i=0; i<ncoeff; i++)
 			coeff[i] = 0.;
 #endif //STARPU_MLR_MODEL

+ 8 - 4
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;
 }
 
@@ -1611,7 +1615,7 @@ docal:
 		char archname[STR_SHORT_LENGTH];
 
 		starpu_perfmodel_get_arch_name(arch, archname, sizeof(archname), nimpl);
-		_STARPU_DISP("Warning: model %s is not calibrated enough for %s size %lu (only %u measurements from size %lu to %lu), forcing calibration for this run. Use the STARPU_CALIBRATE environment variable to control this.\n", model->symbol, archname, (unsigned long) size, regmodel?regmodel->nsample:0, regmodel?regmodel->minx:0, regmodel?regmodel->maxx:0);
+		_STARPU_DISP("Warning: model %s is not calibrated enough for %s size %lu (only %u measurements from size %lu to %lu), forcing calibration for this run. Use the STARPU_CALIBRATE environment variable to control this. You probably need to run again to continue calibrating the model, until this warning disappears.\n", model->symbol, archname, (unsigned long) size, regmodel?regmodel->nsample:0, regmodel?regmodel->minx:0, regmodel?regmodel->maxx:0);
 		_starpu_set_calibrate_flag(1);
 		model->benchmarking = 1;
 	}
@@ -1664,7 +1668,7 @@ docal:
 			char archname[STR_SHORT_LENGTH];
 
 			starpu_perfmodel_get_arch_name(arch, archname, sizeof(archname), nimpl);
-			_STARPU_DISP("Warning: model %s is not calibrated enough for %s size %lu (only %u measurements), forcing calibration for this run. Use the STARPU_CALIBRATE environment variable to control this.\n", model->symbol, archname, (unsigned long) size, entry && entry->history_entry ? entry->history_entry->nsample : 0);
+			_STARPU_DISP("Warning: model %s is not calibrated enough for %s size %lu (only %u measurements), forcing calibration for this run. Use the STARPU_CALIBRATE environment variable to control this. You probably need to run again to continue calibrating the model, until this warning disappears.\n", model->symbol, archname, (unsigned long) size, entry && entry->history_entry ? entry->history_entry->nsample : 0);
 			_starpu_set_calibrate_flag(1);
 			model->benchmarking = 1;
 		}
@@ -1711,7 +1715,7 @@ docal:
 		char archname[STR_SHORT_LENGTH];
 
 		starpu_perfmodel_get_arch_name(arch, archname, sizeof(archname), nimpl);
-		_STARPU_DISP("Warning: model %s is not calibrated enough for %s, forcing calibration for this run. Use the STARPU_CALIBRATE environment variable to control this.\n", model->symbol, archname);
+		_STARPU_DISP("Warning: model %s is not calibrated enough for %s, forcing calibration for this run. Use the STARPU_CALIBRATE environment variable to control this. You probably need to run again to continue calibrating the model, until this warning disappears.\n", model->symbol, archname);
 		_starpu_set_calibrate_flag(1);
 		model->benchmarking = 1;
 	}
@@ -1794,7 +1798,7 @@ docal:
 		char archname[STR_SHORT_LENGTH];
 
 		starpu_perfmodel_get_arch_name(arch, archname, sizeof(archname), nimpl);
-		_STARPU_DISP("Warning: model %s is not calibrated enough for %s size %ld footprint %x (only %u measurements), forcing calibration for this run. Use the STARPU_CALIBRATE environment variable to control this.\n", model->symbol, archname, j->task?(long int)_starpu_job_get_data_size(model, arch, nimpl, j):-1, key, entry ? entry->nsample : 0);
+		_STARPU_DISP("Warning: model %s is not calibrated enough for %s size %ld footprint %x (only %u measurements), forcing calibration for this run. Use the STARPU_CALIBRATE environment variable to control this. You probably need to run again to continue calibrating the model, until this warning disappears.\n", model->symbol, archname, j->task?(long int)_starpu_job_get_data_size(model, arch, nimpl, j):-1, key, entry ? entry->nsample : 0);
 		_starpu_set_calibrate_flag(1);
 		model->benchmarking = 1;
 	}

+ 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;