Browse Source

Fix NUMA node devids when using all NUMA nodes

Samuel Thibault 7 years ago
parent
commit
2fe7c45e33
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/core/topology.c

+ 2 - 2
src/core/topology.c

@@ -2170,7 +2170,7 @@ static void _starpu_init_numa_node(struct _starpu_machine_config *config)
 			unsigned numa_logical_id = obj->logical_index;
 			unsigned numa_physical_id = obj->os_index;
 
-			int memnode = _starpu_memory_node_register(STARPU_CPU_RAM, 0);
+			int memnode = _starpu_memory_node_register(STARPU_CPU_RAM, numa);
 			STARPU_ASSERT_MSG(memnode < STARPU_MAXNUMANODES, "Wrong Memory Node : %d (only %d available) \n", memnode, STARPU_MAXNUMANODES);
 
 			numa_memory_nodes_to_hwloclogid[memnode] = numa_logical_id;
@@ -2189,7 +2189,7 @@ static void _starpu_init_numa_node(struct _starpu_machine_config *config)
 		{
 
 			/* In this case, nnuma has only one node */
-			int memnode = _starpu_memory_node_register(STARPU_CPU_RAM, 0);
+			int memnode = _starpu_memory_node_register(STARPU_CPU_RAM, numa);
 			STARPU_ASSERT_MSG(memnode == STARPU_MAIN_RAM, "Wrong Memory Node : %d (expected %d) \n", memnode, STARPU_MAIN_RAM);
 
 			numa_memory_nodes_to_hwloclogid[memnode] = STARPU_NUMA_MAIN_RAM;