Browse Source

Add STARPU_HWLOC_INPUT environment variable to save initialization time.

Samuel Thibault 6 years ago
parent
commit
c6203a1f28
3 changed files with 21 additions and 3 deletions
  1. 7 1
      ChangeLog
  2. 10 1
      doc/doxygen/chapters/501_environment_variables.doxy
  3. 4 1
      src/core/topology.c

+ 7 - 1
ChangeLog

@@ -1,7 +1,7 @@
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
 # Copyright (C) 2012-2014,2016-2018                      Inria
-# Copyright (C) 2009-2018                                Université de Bordeaux
+# Copyright (C) 2009-2019                                Université de Bordeaux
 # Copyright (C) 2010-2019                                CNRS
 #
 # StarPU is free software; you can redistribute it and/or modify
@@ -138,6 +138,12 @@ Small changes:
   * Fonction starpu_is_initialized() is moved to the public API.
   * Fix code to allow to submit tasks to empty contexts
 
+StarPU 1.2.7 (git revision xxx)
+==============================================
+
+Small features:
+  * Add STARPU_HWLOC_INPUT environment variable to save initialization time.
+
 StarPU 1.2.6 (git revision 23049adea01837479f309a75c002dacd16eb34ad)
 ==============================================
 

+ 10 - 1
doc/doxygen/chapters/501_environment_variables.doxy

@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2011-2013,2015-2017                      Inria
  * Copyright (C) 2010-2019                                CNRS
- * Copyright (C) 2009-2011,2013-2018                      Université de Bordeaux
+ * Copyright (C) 2009-2011,2013-2019                      Université de Bordeaux
  * Copyright (C) 2016                                     Uppsala University
  *
  * StarPU is free software; you can redistribute it and/or modify
@@ -1237,6 +1237,15 @@ If the environment variable STARPU_IDLE_FILE is defined, a file named after its
 The file will contain the sum of the idle times of all the workers.
 </dd>
 
+<dt>STARPU_HWLOC_INPUT</dt>
+<dd>
+\anchor STARPU_HWLOC_INPUT
+\addindex __env__STARPU_HWLOC_INPUT
+If the environment variable STARPU_HWLOC_INPUT is defined to the path of an XML file, hwloc will be made to use it as input instead of detecting the current platform topology, which can save significant initialization time.
+
+To produce this XML file, use <c>lstopo file.xml</c>
+</dd>
+
 </dl>
 
 \section ConfiguringTheHypervisor Configuring The Hypervisor

+ 4 - 1
src/core/topology.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  * Copyright (C) 2011-2017                                Inria
- * Copyright (C) 2009-2018                                Université de Bordeaux
+ * Copyright (C) 2009-2019                                Université de Bordeaux
  * Copyright (C) 2010-2017                                CNRS
  * Copyright (C) 2013                                     Thibaut Lambert
  * Copyright (C) 2016                                     Uppsala University
@@ -827,6 +827,9 @@ _starpu_init_topology (struct _starpu_machine_config *config)
 #ifndef STARPU_SIMGRID
 #ifdef STARPU_HAVE_HWLOC
 	hwloc_topology_init(&topology->hwtopology);
+	char *hwloc_input = starpu_getenv("STARPU_HWLOC_INPUT");
+	if (hwloc_input)
+		hwloc_topology_set_xml(topology->hwtopology, hwloc_input);
 	_starpu_topology_filter(topology->hwtopology);
 	hwloc_topology_load(topology->hwtopology);
 	_starpu_allocate_topology_userdata(hwloc_get_root_obj(topology->hwtopology));