Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / teshsuite / smpi / MBI / RMALocalLocalConcurrencyGenerator.py
index 00777e3..a34c0ea 100755 (executable)
@@ -91,9 +91,10 @@ for e in gen.epoch:
             patterns['init1'] = gen.init[p1]("1")
             patterns['operation1'] = gen.operation[p1]("1")
             patterns['operation2'] = gen.operation[p2]("1")
+            shortdesc_rma = 'Correct code using RMA operations'
 
             # Generate a data race (Get + Get/load/store/Put)
-            replace = patterns
+            replace = patterns.copy()
             replace['shortdesc'] = 'Local Concurrency error.'
             replace['longdesc'] = 'Local Concurrency error. @{p2}@ conflicts with @{p1}@'
             replace['outcome'] = 'ERROR: LocalConcurrency'
@@ -101,18 +102,18 @@ for e in gen.epoch:
             gen.make_file(template, f'LocalConcurrency_lloutwindow_{e}_{p1}_{p2}_nok.c', replace)
             # Generate a correct code by switching operation1 and  operation2
             if p2 in gen.store + gen.load + gen.loadstore:
-                replace = patterns
-                replace['shortdesc'] = 'Correct code using RMA operations'
-                replace['longdesc'] = 'Correct code using RMA operations'
+                replace = patterns.copy()
+                replace['shortdesc'] = shortdesc_rma
+                replace['longdesc'] = shortdesc_rma
                 replace['outcome'] = 'OK'
                 replace['errormsg'] = 'OK'
                 replace['operation1'] = gen.operation[p2]("1")
                 replace['operation2'] = gen.operation[p1]("1")
                 gen.make_file(template, f'LocalConcurrency_lloutwindow_{e}_{p2}_{p1}_ok.c', replace)
         # Generate a correct code by removing operation2
-        replace = patterns
-        replace['shortdesc'] = 'Correct code using RMA operations'
-        replace['longdesc'] = 'Correct code using RMA operations'
+        replace = patterns.copy()
+        replace['shortdesc'] = shortdesc_rma
+        replace['longdesc'] = shortdesc_rma
         replace['outcome'] = 'OK'
         replace['errormsg'] = 'OK'
         replace['operation1'] = gen.operation[p1]("1")
@@ -137,16 +138,16 @@ for e in gen.epoch:
             patterns['operation2'] = gen.operation[p2]("1")
 
             # Generate a data race (Put + store)
-            replace = patterns
+            replace = patterns.copy()
             replace['shortdesc'] = 'Local Concurrency error.'
             replace['longdesc'] = 'Local Concurrency error. @{p2}@ conflicts with @{p1}@'
             replace['outcome'] = 'ERROR: LocalConcurrency'
             replace['errormsg'] = 'Local Concurrency error. @{p2}@ at @{filename}@:@{line:MBIERROR2}@ conflicts with @{p1}@ line @{line:MBIERROR1}@'
             gen.make_file(template, f'LocalConcurrency_lloutwindow_{e}_{p1}_{p2}_nok.c', replace)
             # Generate a correct code by switching operation1 and operation2
-            replace = patterns
-            replace['shortdesc'] = 'Correct code using RMA operations'
-            replace['longdesc'] = 'Correct code using RMA operations'
+            replace = patterns.copy()
+            replace['shortdesc'] = shortdesc_rma
+            replace['longdesc'] = shortdesc_rma
             replace['outcome'] = 'OK'
             replace['errormsg'] = 'OK'
             replace['operation1'] = gen.operation[p2]("1")
@@ -154,9 +155,9 @@ for e in gen.epoch:
             gen.make_file(template, f'LocalConcurrency_lloutwindow_{e}_{p2}_{p1}_ok.c', replace)
 
             # Generate a correct code by removing operation2
-            replace = patterns
-            replace['shortdesc'] = 'Correct code using RMA operations'
-            replace['longdesc'] = 'Correct code using RMA operations'
+            replace = patterns.copy()
+            replace['shortdesc'] = shortdesc_rma
+            replace['longdesc'] = shortdesc_rma
             replace['outcome'] = 'OK'
             replace['errormsg'] = 'OK'
             replace['operation1'] = gen.operation[p1]("1")