소스 검색

Bug fixed when executing for the first time without CUDA and OpenCL.

Stored configuration was wrong at the first execution of StarPU as code was not executed because when CUDA and OpenCL were disabled.
Nicolas Collin 14 년 전
부모
커밋
d63b8b18c5
1개의 변경된 파일과 2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 4
      src/core/perfmodel/perfmodel_bus.c

+ 2 - 4
src/core/perfmodel/perfmodel_bus.c

@@ -79,12 +79,12 @@ static double opencldev_timing_dtoh[STARPU_MAXNODES] = {0.0};
 static struct dev_timing opencldev_timing_per_cpu[STARPU_MAXNODES*STARPU_MAXCPUS];
 #endif
 
-#if defined(STARPU_USE_CUDA) || defined(STARPU_USE_OPENCL)
-
 #ifdef STARPU_HAVE_HWLOC
 static hwloc_topology_t hwtopology;
 #endif
 
+#if defined(STARPU_USE_CUDA) || defined(STARPU_USE_OPENCL)
+
 #ifdef STARPU_USE_CUDA
 
 static void measure_bandwidth_between_host_and_dev_on_cpu_with_cuda(int dev, int cpu, struct dev_timing *dev_timing_per_cpu)
@@ -516,7 +516,6 @@ static void measure_bandwidth_between_host_and_dev(int dev, double *dev_timing_h
 
 static void benchmark_all_gpu_devices(void)
 {
-#if defined(STARPU_USE_CUDA) || defined(STARPU_USE_OPENCL)
 	int i;
 #ifdef HAVE_CUDA_MEMCPY_PEER
 	int j;
@@ -595,7 +594,6 @@ static void benchmark_all_gpu_devices(void)
 #endif
 
 	_STARPU_DEBUG("Benchmarking the speed of the bus is done.\n");
-#endif /* defined(STARPU_USE_CUDA) || defined(STARPU_USE_OPENCL) */
 
 	was_benchmarked = 1;
 }