Browse Source

New environment variable STARPU_PERF_MODEL_DIR which can be set to specify a directory where to store performance model files in. When unset, the files are stored in /.starpu/sampling

Nathalie Furmento 10 years ago
parent
commit
f8dad7db33
4 changed files with 17 additions and 1 deletions
  1. 3 0
      ChangeLog
  2. 1 1
      configure.ac
  3. 8 0
      doc/doxygen/chapters/40environment_variables.doxy
  4. 5 0
      src/core/perfmodel/perfmodel.c

+ 3 - 0
ChangeLog

@@ -143,6 +143,9 @@ New features:
   * New data access mode flag STARPU_SSEND to be set when calling
     starpu_mpi_insert_task to specify the data has to be sent using a
     synchronous and non-blocking mode
+  * New environment variable STARPU_PERF_MODEL_DIR which can be set to
+    specify a directory where to store performance model files in.
+    When unset, the files are stored in $STARPU_HOME/.starpu/sampling
 
 Changes:
   * Fix complexity of implicit task/data dependency, from quadratic to linear.

+ 1 - 1
configure.ac

@@ -1660,7 +1660,7 @@ if test x$enable_allocation_cache = xyes; then
 	AC_DEFINE(STARPU_USE_ALLOCATION_CACHE, [1], [enable data allocation cache])
 fi
 
-AC_ARG_WITH(perf-model-dir, [AS_HELP_STRING([--with-perf-model-dir=<dir>], [specify where performance models shoulds be stored])],
+AC_ARG_WITH(perf-model-dir, [AS_HELP_STRING([--with-perf-model-dir=<dir>], [specify where performance models should be stored])],
 	[
 		if test x$withval = xno; then
 			AC_MSG_ERROR(--without-perf-model-dir is not a valid option)

+ 8 - 0
doc/doxygen/chapters/40environment_variables.doxy

@@ -471,6 +471,14 @@ configuration files. The default is <c>$HOME</c> on Unix environments,
 and <c>$USERPROFILE</c> on Windows environments.
 </dd>
 
+<dt>STARPU_HOME</dt>
+<dd>
+\anchor STARPU_PERF_MODEL_DIR
+\addindex __env__STARPU_PERF_MODEL_DIR
+This specifies the main directory in which StarPU stores its
+performance model files. The default is <c>$STARPU_HOME/.starpu/sampling</c>.
+</dd>
+
 <dt>STARPU_HOSTNAME</dt>
 <dd>
 \anchor STARPU_HOSTNAME

+ 5 - 0
src/core/perfmodel/perfmodel.c

@@ -446,6 +446,11 @@ void _starpu_set_perf_model_dirs()
 #else
 	snprintf(_perf_model_dir, _PERF_MODEL_DIR_MAXLEN, "%s/.starpu/sampling/", _starpu_get_home_path());
 #endif
+	char *path = getenv("STARPU_PERF_MODEL_DIR");
+	if (path)
+	{
+		snprintf(_perf_model_dir, _PERF_MODEL_DIR_MAXLEN, "%s/", path);
+	}
 
 	snprintf(_perf_model_dir_codelet, _PERF_MODEL_DIR_MAXLEN, "%s/codelets/%d/", _perf_model_dir, _STARPU_PERFMODEL_VERSION);
 	snprintf(_perf_model_dir_bus, _PERF_MODEL_DIR_MAXLEN, "%s/bus/", _perf_model_dir);