Переглянути джерело

data statictics are no longer display when environment variable STARPU_STATS is set to 0

Nathalie Furmento 12 роки тому
батько
коміт
26b414108e

+ 5 - 0
doc/chapters/configuration.texi

@@ -557,3 +557,8 @@ When defined, statistics about the workers will be displayed when calling
 environment variable @code{STARPU_PROFILING}, it displays the power
 consumption (@pxref{Power-based scheduling}).
 @end defvr
+
+@defvr {Environment variable} STARPU_STATS
+When defined and set 0, data statistics will not be displayed at the
+end of the execution of an application (@pxref{Data statistics}).
+@end defvr

+ 20 - 1
doc/chapters/perf-feedback.texi

@@ -503,7 +503,26 @@ of the application. To enable them, you need to pass the option
 @code{--enable-stats} when calling @code{configure}. When calling
 @code{starpu_shutdown()} various statistics will be displayed,
 execution, MSI cache statistics, allocation cache statistics, and data
-transfer statistics.
+transfer statistics. The display can be disabled by setting the
+environment variable @code{STARPU_STATS} to 0.
+
+@example
+$ ./examples/cholesky/cholesky_tag
+Computation took (in ms)
+518.16
+Synthetic GFlops : 44.21
+#---------------------
+MSI cache stats :
+TOTAL MSI stats	hit 1622 (66.23 %)	miss 827 (33.77 %)
+...
+@end example
+
+@example
+$ STARPU_STATS=0 ./examples/cholesky/cholesky_tag
+Computation took (in ms)
+518.16
+Synthetic GFlops : 44.21
+@end example
 
 @c TODO: data transfer stats are similar to the ones displayed when
 @c setting STARPU_BUS_STATS

+ 9 - 3
src/core/workers.c

@@ -880,9 +880,15 @@ void starpu_shutdown(void)
 	/* tell all workers to shutdown */
 	_starpu_kill_all_workers(&config);
 
-	_starpu_display_msi_stats();
-	_starpu_display_alloc_cache_stats();
-	_starpu_display_comm_amounts();
+	{
+	     int stats = starpu_get_env_number("STARPU_STATS");
+	     if (stats != 0)
+	     {
+		  _starpu_display_msi_stats();
+		  _starpu_display_alloc_cache_stats();
+		  _starpu_display_comm_amounts();
+	     }
+	}
 
 	{
 	     // Display statistics on data which have not been unregistered