Explorar o código

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 %!s(int64=13) %!d(string=hai) anos
pai
achega
d63b8b18c5
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  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;
 }