Browse Source

port r15790 from 1.1: Initialize _starpu_silent early enough for initial _STARPU_DISP to be affected. Also ignore races on writing to it to avoid spurious warnings in multithreaded init

Samuel Thibault 10 years ago
parent
commit
25b9f46122
2 changed files with 5 additions and 2 deletions
  1. 1 0
      src/common/utils.c
  2. 4 2
      src/core/workers.c

+ 1 - 0
src/common/utils.c

@@ -39,6 +39,7 @@ int _starpu_silent;
 void _starpu_util_init(void)
 {
 	_starpu_silent = starpu_get_env_number_default("STARPU_SILENT", 0);
+	STARPU_HG_DISABLE_CHECKING(_starpu_silent);
 }
 
 #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__)

+ 4 - 2
src/core/workers.c

@@ -1079,6 +1079,9 @@ int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv)
 	int is_a_sink = 0; /* Always defined. If the MP infrastructure is not
 			    * used, we cannot be a sink. */
 	unsigned worker;
+
+	_starpu_util_init();
+
 #ifdef STARPU_USE_MP
 	_starpu_set_argc_argv(argc, argv);
 
@@ -1103,6 +1106,7 @@ int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv)
 #ifdef STARPU_OPENMP
 	_starpu_omp_dummy_init();
 #endif
+
 #ifdef STARPU_SIMGRID
 	_starpu_simgrid_init();
 	/* Warn when the lots of stacks malloc()-ated by simgrid for transfer
@@ -1165,8 +1169,6 @@ int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv)
 
 	srand(2008);
 
-	_starpu_util_init();
-
 #ifdef HAVE_AYUDAME_H
 #ifndef AYU_RT_STARPU
 #define AYU_RT_STARPU 4