ソースを参照

tools: small fixes

Nathalie Furmento 3 年 前
コミット
38543f5be9
共有3 個のファイルを変更した5 個の追加5 個の削除を含む
  1. 2 2
      tools/starpu_fxt_number_events_to_names.py.in
  2. 2 2
      tools/starpu_mpi_comm_matrix.py.in
  3. 1 1
      tools/starpu_send_recv_data_use.py

+ 2 - 2
tools/starpu_fxt_number_events_to_names.py.in

@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
-# Copyright (C) 2020       Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
+# Copyright (C) 2020-2021  Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
 #
 # StarPU is free software; you can redistribute it and/or modify
 # it under the terms of the GNU Lesser General Public License as published by
@@ -70,7 +70,7 @@ for line in fxt_codes_raw.split("\n"):
 
     if len(elements) == 3:
         key = int(elements[2][2:], 16)
-        assert(key not in fxt_codes)
+        assert key not in fxt_codes
 
         fxt_codes[key] = elements[1]
 

+ 2 - 2
tools/starpu_mpi_comm_matrix.py.in

@@ -42,7 +42,7 @@ if len(sys.argv) >= 2:
         sys.exit(0)
     if sys.argv[1] == '-h' or sys.argv[1] == '--help':
         usage()
-if (len(sys.argv) == 1):
+if len(sys.argv) == 1:
     usage()
 
 if len(sys.argv) >= 2 and sys.argv[1] == '-png':
@@ -61,7 +61,7 @@ for line in file.readlines():
     match = re.search('\TOTAL', line)
     if match:
         (node,stuff)=line.split(sep="[")[2].split("]")
-        if (int(node) > nodes):
+        if int(node) > nodes:
             nodes=int(node)
 file.close()
 nodes=nodes+1

+ 1 - 1
tools/starpu_send_recv_data_use.py

@@ -92,7 +92,7 @@ def plot_graph(comm_time_key, match, filename, title, xlabel):
                 workers[worker] = []
 
             eps = t["starttime"] - c[comm_time_key]
-            assert(eps > 0)
+            assert eps > 0
             durations.append(eps)
             workers[worker].append((c[comm_time_key], eps))