Browse Source

src/core/perfmodel/perfmodel_bus.c: only display header when some cuda or opencl devices are available

Nathalie Furmento 13 years ago
parent
commit
41b76f990d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/core/perfmodel/perfmodel_bus.c

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

@@ -1133,7 +1133,8 @@ void starpu_bus_print_bandwidth(FILE *f)
 	}
 
 #if defined(STARPU_USE_CUDA) || defined(STARPU_USE_OPENCL)
-	fprintf(f, "\nGPU\tCPU in preference order (logical index), host-to-device, device-to-host\n");
+	if (ncuda != 0 || nopencl != 0)
+		fprintf(f, "\nGPU\tCPU in preference order (logical index), host-to-device, device-to-host\n");
 	for (src = 1; src <= maxnode; src++)
 	{
 		struct dev_timing *timing;