浏览代码

Make sure the topology is initialized when benchmarking the bus performance

Samuel Thibault 13 年之前
父节点
当前提交
2b6c0e9af5
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/core/perfmodel/perfmodel_bus.c

+ 3 - 3
src/core/perfmodel/perfmodel_bus.c

@@ -429,7 +429,7 @@ static void benchmark_all_gpu_devices(void)
 #endif
 
 	struct starpu_machine_config_s *config = _starpu_get_machine_config();
-	ncpus = config->topology.ncpus;
+	ncpus = _starpu_topology_get_nhwcpu(config);
 
 	/* TODO: measure bandwidth between GPU-GPU */
 
@@ -509,7 +509,7 @@ static void load_bus_affinity_file_content(void)
 
 #if defined(STARPU_USE_CUDA) || defined(STARPU_USE_OPENCL)
 	struct starpu_machine_config_s *config = _starpu_get_machine_config();
-	ncpus = config->topology.ncpus;
+	ncpus = _starpu_topology_get_nhwcpu(config);
         int gpu;
 
 #ifdef STARPU_USE_CUDA
@@ -1020,7 +1020,7 @@ static void check_bus_config_file()
                 fclose(f);
 
                 // Loading current configuration
-                ncpus = config->topology.ncpus;
+                ncpus = _starpu_topology_get_nhwcpu(config);
 #ifdef STARPU_USE_CUDA
 		ncuda = _starpu_get_cuda_device_count();
 #endif