Browse Source

tools/starpu_machine_display.c: do not display topology and bus bandwidth when there is no workers

Nathalie Furmento 10 years ago
parent
commit
11dd7f606c
1 changed files with 8 additions and 5 deletions
  1. 8 5
      tools/starpu_machine_display.c

+ 8 - 5
tools/starpu_machine_display.c

@@ -164,13 +164,16 @@ int main(int argc, char **argv)
 
 	display_all_combined_workers();
 
-	fprintf(stdout, "\ntopology ...\n");
-	starpu_topology_print(stdout);
+	if (ret != -ENODEV)
+	{
+		fprintf(stdout, "\ntopology ...\n");
+		starpu_topology_print(stdout);
 
-	fprintf(stdout, "\nbandwidth and latency ...\n");
-	starpu_bus_print_bandwidth(stdout);
+		fprintf(stdout, "\nbandwidth and latency ...\n");
+		starpu_bus_print_bandwidth(stdout);
 
-	starpu_shutdown();
+		starpu_shutdown();
+	}
 
 	return 0;
 }