소스 검색

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