]> xenbits.xensource.com Git - people/andrewcoop/hwloc.git/commitdiff
core: propagate total memory at the end of the ...
authorBrice Goglin <brice.goglin@inria.fr>
Thu, 13 Jun 2013 13:57:40 +0000 (13:57 +0000)
committerBrice Goglin <brice.goglin@inria.fr>
Thu, 13 Jun 2013 13:57:40 +0000 (13:57 +0000)
core: propagate total memory at the end of the discovery

We don't need it early, and it may be incomplete if some
objects are added later.

This commit was SVN r5664.

src/topology.c

index 63e50eb837834ef442f8d9caf3ce4874c3b41607..2cf364c0c76d45554001906b287c6cca5c1ace9e 100644 (file)
@@ -2317,10 +2317,6 @@ next_cpubackend:
   if (hwloc_connect_levels(topology) < 0)
     return -1;
 
-  /* accumulate children memory in total_memory fields (only once parent is set) */
-  hwloc_debug("%s", "\nPropagate total memory up\n");
-  propagate_total_memory(topology->levels[0][0]);
-
   /*
    * Additional discovery with other backends
    */
@@ -2371,6 +2367,10 @@ next_noncpubackend:
       return -1;
   }
 
+  /* accumulate children memory in total_memory fields (only once parent is set) */
+  hwloc_debug("%s", "\nPropagate total memory up\n");
+  propagate_total_memory(topology->levels[0][0]);
+
   /*
    * Now that objects are numbered, take distance matrices from backends and put them in the main topology.
    *