Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
teshsuite: smpi: MBI: Merge change form MBI.
[simgrid.git] / teshsuite / smpi / MBI / CollComGenerator.py
index 707e9f3..667404d 100755 (executable)
@@ -89,7 +89,7 @@ for c in gen.coll + gen.icoll + gen.ibarrier:
     patterns['operation'] = gen.operation[c]("1")
 
     # Generate the correct code => to remove?
-    replace = patterns
+    replace = patterns.copy()
     replace['shortdesc'] = 'Collective @{c}@ with correct arguments'
     replace['longdesc'] = f'All ranks in newcom call {c} with correct arguments'
     replace['outcome'] = 'OK'
@@ -98,16 +98,16 @@ for c in gen.coll + gen.icoll + gen.ibarrier:
     gen.make_file(template, f'ParamMatching_Com_{c}_ok.c', replace)
 
     # Generate the incorrect communicator matching
-    replace = patterns
+    replace = patterns.copy()
     replace['shortdesc'] = 'Collective @{c}@ with a communicator mismatch'
-    replace['longdesc'] = f'Odd ranks call the collective on newcom while even ranks call the collective on MPI_COMM_WORLD'
+    replace['longdesc'] = 'Odd ranks call the collective on newcom while even ranks call the collective on MPI_COMM_WORLD'
     replace['outcome'] = 'ERROR: CommunicatorMatching'
     replace['errormsg'] = 'Communicator mistmatch in collectives. @{c}@ at @{filename}@:@{line:MBIERROR}@ has newcom or MPI_COMM_WORLD as a communicator.'
     replace['change_com'] = 'if (rank % 2)\n    newcom = MPI_COMM_WORLD; /* MBIERROR */'
     gen.make_file(template, f'ParamMatching_Com_{c}_nok.c', replace)
 
     # Generate the coll with newcom=MPI_COMM_NULL
-    replace = patterns
+    replace = patterns.copy()
     replace['shortdesc'] = f'Collective @{c}@ with newcom=MPI_COMM_NULL'
     replace['longdesc'] = f'Collective @{c}@ with newcom=MPI_COMM_NULL'
     replace['outcome'] = 'ERROR: InvalidCommunicator'