Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement test with wait_for...
[simgrid.git] / tools / simgrid_convert_TI_traces.py
index d3425f8..8c9cd3e 100755 (executable)
@@ -1,8 +1,13 @@
 #!/usr/bin/env python3
 
+# Copyright (c) 2018-2023. The SimGrid Team. All rights reserved.
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the license (GNU LGPL) which comes with this package.
+
 '''
 This script is intended to convert SMPI time independent traces (TIT) from the
-old format (simgrid version <= 3.19) to the new format.
+old format (SimGrid version <= 3.19) to the new format.
 
 On the previous format each MPI_wait calls were associated to the last ISend of
 IRecv call arbitrarily.
@@ -10,7 +15,7 @@ IRecv call arbitrarily.
 This new that includes tags field that links MPI_wait calls to the
 MPI_ISend or MPI_IRecv associated to this wait.
 
-This script reproduce the old behavior of simgrid because information are
+This script reproduce the old behavior of SimGrid because information are
 missing to add the tags properly. It also lower case all the mpi calls.
 
 It takes in input (as argument or in stdin) the trace list file that is only a
@@ -65,8 +70,8 @@ def convert_trace(trace_path, base_path, output_path, trace_version="1.0"):
                         raise Exception("Invalid traces: No Isend or Irecv "
                                         "found before the wait in line " +
                                         str(line_num) + " in file " + old_file_path)
-                    new_line = insert_elem(split_line, 2, last_async_call_src)
-                    new_line = insert_elem(split_line, 3, last_async_call_dst)
+                    insert_elem(split_line, 2, last_async_call_src)
+                    insert_elem(split_line, 3, last_async_call_dst)
                     new_line = insert_elem(split_line, 4, "0")
 
                 if new_line is not None: