Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MBI: don't add the path of the generator in the generated codes
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 18 Mar 2022 21:45:47 +0000 (22:45 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 18 Mar 2022 21:46:08 +0000 (22:46 +0100)
teshsuite/smpi/MBI/CollMatchingGenerator.py
teshsuite/smpi/MBI/ResleakGenerator.py

index 6df18f9..f3ffc4e 100755 (executable)
@@ -3,6 +3,7 @@
 # Copyright 2021-2022. The MBI project. All rights reserved.
 # This program is free software; you can redistribute it and/or modify it under the terms of the license (GNU GPL).
 
+import os
 import sys
 from generator_utils import *
 
@@ -86,7 +87,7 @@ for c1 in coll + icoll + ibarrier:
     for c2 in coll + icoll + ibarrier:
         patterns = {}
         patterns = {'c1': c1, 'c2': c2}
-        patterns['generatedby'] = f'DO NOT EDIT: this file was generated by {sys.argv[0]}. DO NOT EDIT.'
+        patterns['generatedby'] = f'DO NOT EDIT: this file was generated by {os.path.basename(sys.argv[0])}. DO NOT EDIT.'
         patterns['collfeature'] = 'Yes' if c1 in coll or c2 in coll else 'Lacking'
         patterns['icollfeature'] = 'Yes' if c1 in icoll + ibarrier or c2 in icoll + ibarrier else 'Lacking'
         patterns['c1'] = c1
index e344cbb..084cdda 100755 (executable)
@@ -3,6 +3,7 @@
 # Copyright 2021-2022. The MBI project. All rights reserved.
 # This program is free software; you can redistribute it and/or modify it under the terms of the license (GNU GPL).
 
+import os
 import sys
 from generator_utils import *
 
@@ -80,7 +81,7 @@ int main(int argc, char **argv) {
 for call in tcoll:
     patterns = {}
     patterns = {'call': call}
-    patterns['generatedby'] = f'DO NOT EDIT: this file was generated by {sys.argv[0]}. DO NOT EDIT.'
+    patterns['generatedby'] = f'DO NOT EDIT: this file was generated by {os.path.basename(sys.argv[0])}. DO NOT EDIT.'
     patterns['toolfeature'] = 'Yes' 
     patterns['call'] = call
     patterns['operation'] = operation[call]("1")