瀏覽代碼

src/core/workers.c: make sure the configuration is stored before calling any other action (e.g _starpu_load_bus_performance_files might end up calling void starpu_cuda_set_device(int devid) which needs to access the global configuration)

Nathalie Furmento 13 年之前
父節點
當前提交
2fb7cca255
共有 1 個文件被更改,包括 14 次插入14 次删除
  1. 14 14
      src/core/workers.c

+ 14 - 14
src/core/workers.c

@@ -538,20 +538,6 @@ int starpu_init(struct starpu_conf *user_conf)
 
 	srand(2008);
 
-#ifdef STARPU_USE_FXT
-	_starpu_start_fxt_profiling();
-#endif
-
-	_starpu_open_debug_logfile();
-
-	_starpu_data_interface_init();
-
-	_starpu_timing_init();
-
-	_starpu_profiling_init();
-
-	_starpu_load_bus_performance_files();
-
 	/* store the pointer to the user explicit configuration during the
 	 * initialization */
 	if (user_conf == NULL)
@@ -572,6 +558,20 @@ int starpu_init(struct starpu_conf *user_conf)
 	}
 	_starpu_conf_check_environment(config.conf);
 
+#ifdef STARPU_USE_FXT
+	_starpu_start_fxt_profiling();
+#endif
+
+	_starpu_open_debug_logfile();
+
+	_starpu_data_interface_init();
+
+	_starpu_timing_init();
+
+	_starpu_profiling_init();
+
+	_starpu_load_bus_performance_files();
+
 	ret = _starpu_build_topology(&config);
 	if (ret)
 	{