瀏覽代碼

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

Nathalie Furmento 10 年之前
父節點
當前提交
11dd7f606c
共有 1 個文件被更改,包括 8 次插入5 次删除
  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;
 }