Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Resynch MBI generators with upstream
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 26 Mar 2022 10:01:16 +0000 (11:01 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 26 Mar 2022 23:28:29 +0000 (00:28 +0100)
CollP2PMessageRaceGenerator.py: Replace source of second recv for message race.

(+ whitespace cleanups)

teshsuite/smpi/MBI/CollP2PMatchingGenerator.py
teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py
teshsuite/smpi/MBI/MissingWaitandStartGenerator.py
teshsuite/smpi/MBI/P2PComGenerator.py
teshsuite/smpi/MBI/P2PInvalidComGenerator.py
teshsuite/smpi/MBI/P2PMatchingANYSRCGenerator.py
teshsuite/smpi/MBI/P2PMatchingGenerator.py
teshsuite/smpi/MBI/RMAArgGenerator.py
teshsuite/smpi/MBI/RMALocalLocalConcurrencyGenerator.py
teshsuite/smpi/MBI/RMARemoteRemoteConcurrencyGenerator.py
teshsuite/smpi/MBI/ResleakGenerator.py

index 315bf40..09e5ff2 100755 (executable)
@@ -131,3 +131,4 @@ for s in send + isend:
             #  replace['fini1'] = fini[r]("2")
             #  replace['fini2'] = fini[s]("1")
             #  make_file(template, f'CollP2PBuffering_{r}_{s}_{c}_nok.c', replace)
+
index 6c45f48..c817f96 100755 (executable)
@@ -59,7 +59,6 @@ int main(int argc, char **argv) {
   MPI_Op op = MPI_SUM;
 
 
-
   @{init1}@
   @{init2}@
   @{init3}@
@@ -82,6 +81,7 @@ int main(int argc, char **argv) {
     @{operation3}@ /* MBIERROR1 */
     @{operation1}@
     @{fini1}@
+    src = 0;
     @{operation4}@ /* MBIERROR2 */
     @{fini3}@
     @{fini4}@
index 8ff8833..54d4384 100755 (executable)
@@ -10,7 +10,7 @@ template = """// @{generatedby}@
 
   Description: @{shortdesc}@
     @{longdesc}@
-  
+
    Version of MPI: Conforms to MPI 1.1, does not require MPI 2 implementation
 
 BEGIN_MPI_FEATURES
@@ -106,7 +106,7 @@ for s in isend + psend:
         Reqfree = patterns['free1']
         patterns['free2'] = free[r]("2")
 
-       # Generate the correct code
+        # Generate the correct code
         replace = patterns
         replace['shortdesc'] = 'Correct matching'
         replace['longdesc'] = f'No error'
@@ -114,7 +114,7 @@ for s in isend + psend:
         replace['errormsg'] = 'OK'
         make_file(template, f'ReqLifecycle_{s}_{r}_ok.c', replace)
 
-       # Generate the code with a missing wait
+        # Generate the code with a missing wait
         replace = patterns
         replace['shortdesc'] = 'Missing wait'
         replace['longdesc'] = 'Missing Wait. @{s}@ at @{filename}@:@{line:MBIERROR}@ has no completion.'
@@ -122,9 +122,9 @@ for s in isend + psend:
         replace['errormsg'] = 'ERROR: MissingWait'
         replace['fini1'] =  ' /* MBIERROR MISSING: ' + wait + ' */'
         make_file(template, f'ReqLifecycle_MissingWait_{s}_{r}_nok.c', replace)
-    
+
         if s in psend:
-                       # Generate the code with a missing start - persistent only
+            # Generate the code with a missing start - persistent only
             replace = patterns
             replace['shortdesc'] = 'Missing start'
             replace['longdesc'] = 'Missing start. @{s}@ at @{filename}@:@{line:MBIERROR}@ has no start'
@@ -133,7 +133,7 @@ for s in isend + psend:
             replace['fini1'] = fini[s]("1")
             replace['start1'] = ' /* MBIERROR MISSING: ' + startPers + ' */'
             make_file(template, f'ReqLifecycle_MissingStart_{s}_{r}_nok.c', replace)
-                       # Generate the code with a missing free - persistent only
+            # Generate the code with a missing free - persistent only
             replace = patterns
             replace['shortdesc'] = 'Missing free'
             replace['longdesc'] = 'Missing free. @{s}@ at @{filename}@:@{line:MBIERROR}@ has no free'
@@ -178,7 +178,7 @@ for c in pcoll + icoll + ibarrier:
     replace['free1'] = ' /* MISSING: ' + replace['free1'] + ' (to not free the buffer before an internal wait */'
     make_file(template, f'ReqLifecycle_MissingWait_{c}_nok.c', replace)
 
-    if c in pcoll:    
+    if c in pcoll:
         # Generate the code with a missing start - persistent only
         replace = patterns
         replace['shortdesc'] = 'Missing start functio'
index 004a93a..1179650 100755 (executable)
@@ -122,7 +122,7 @@ for p1 in send + isend + psend:
         replace['change_com'] = 'MPI_Comm_free(&newcom);  /* MBIERROR */'
         make_file(template, f'InvalidParam_Com_{p1}_{p2}_nok.c', replace)
 
-       #  Generate the code with an invalid communicator ==> TO CHECK
+        #  Generate the code with an invalid communicator ==> TO CHECK
         #replace = patterns
         #replace['shortdesc'] = 'Point to point @{p1}@ and @{p2}@ have an invalid communicator'
        # replace['longdesc'] = 'Point to point @{p1}@ and @{p2}@ have an invalid communicator.'
index 87deaa1..ff8453e 100755 (executable)
@@ -118,3 +118,4 @@ for p1 in send + isend + psend:
         replace['change_com1'] = 'newcom = MPI_COMM_NULL;'
         replace['change_com2'] = ""
         make_file(template, f'InvalidParam_ComNull_{p1}_{p2}nok.c', replace)
+
index 409495d..21613bd 100755 (executable)
@@ -107,3 +107,4 @@ for s in send + isend:
         replace['outcome'] = 'ERROR: MessageRace'
         replace['errormsg'] = 'P2P message race which can cause a deadlock. @{r}@ at @{filename}@:@{line:MBIERROR}@ is called with ANY_SRC.'
         make_file(template, f'MessageRace_{r}_{s}_nok.c', replace)
+
index fe4e0b8..0cf3e5a 100755 (executable)
@@ -133,3 +133,4 @@ for s in send + isend + ssend + bsend:
         replace['operation1'] =  operation[s]("1")
         replace['operation2'] = operation[r]("2")
         make_file(template, f'CallOrdering_{r}_{s}_nok.c', replace)
+
index c459dfa..e8a8ca3 100755 (executable)
@@ -107,3 +107,4 @@ for e in epoch:
         replace['change_arg'] = 'MPI_Type_contiguous (2, MPI_INT, &type); MPI_Type_commit(&type);MPI_Type_free(&type); /* MBIERROR2 */'
         replace['errormsg'] = 'Invalid Datatype in @{p}@ at @{filename}@:@{line:MBIERROR}@'
         make_file(template, f'InvalidParam_DatatypeCond_{e}_{p}_nok.c', replace)
+
index 715d8ae..f24d5f3 100755 (executable)
@@ -99,16 +99,16 @@ for e in epoch:
             replace['outcome'] = 'ERROR: LocalConcurrency'
             replace['errormsg'] = 'Local Concurrency error. @{p2}@ at @{filename}@:@{line:MBIERROR2}@ conflicts with @{p1}@ line @{line:MBIERROR1}@'
             make_file(template, f'LocalConcurrency_lloutwindow_{e}_{p1}_{p2}_nok.c', replace)
-               # Generate a correct code by switching operation1 and  operation2
+            # Generate a correct code by switching operation1 and  operation2
             if p2 in store + load + loadstore:
-                 replace = patterns
-                         replace['shortdesc'] = 'Correct code using RMA operations'
-                         replace['longdesc'] = 'Correct code using RMA operations'
-                         replace['outcome'] = 'OK'
-                         replace['errormsg'] = 'OK'
-                         replace['operation1'] = operation[p2]("1")
-                         replace['operation2'] = operation[p1]("1")
-                 make_file(template, f'LocalConcurrency_lloutwindow_{e}_{p2}_{p1}_ok.c', replace)
+                  replace = patterns
+                  replace['shortdesc'] = 'Correct code using RMA operations'
+                  replace['longdesc'] = 'Correct code using RMA operations'
+                  replace['outcome'] = 'OK'
+                  replace['errormsg'] = 'OK'
+                  replace['operation1'] = operation[p2]("1")
+                  replace['operation2'] = operation[p1]("1")
+                  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'
@@ -143,7 +143,7 @@ for e in epoch:
             replace['outcome'] = 'ERROR: LocalConcurrency'
             replace['errormsg'] = 'Local Concurrency error. @{p2}@ at @{filename}@:@{line:MBIERROR2}@ conflicts with @{p1}@ line @{line:MBIERROR1}@'
             make_file(template, f'LocalConcurrency_lloutwindow_{e}_{p1}_{p2}_nok.c', replace)
-               # Generate a correct code by switching operation1 and operation2
+            # 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'
@@ -153,7 +153,7 @@ for e in epoch:
             replace['operation2'] = operation[p1]("1")
             make_file(template, f'LocalConcurrency_lloutwindow_{e}_{p2}_{p1}_ok.c', replace)
 
-               # Generate a correct code by removing operation2
+            # Generate a correct code by removing operation2
             replace = patterns
             replace['shortdesc'] = 'Correct code using RMA operations'
             replace['longdesc'] = 'Correct code using RMA operations'
index 74f6549..10e421c 100755 (executable)
@@ -94,3 +94,4 @@ for e in epoch:
         replace['outcome'] = 'ERROR: GlobalConcurrency'
         replace['errormsg'] = 'Global Concurrency error. @{p1}@ at @{filename}@:@{line:MBIERROR1}@ conflicts in process 1'
         make_file(template, f'GlobalConcurrency_rr_{e}_{p1}_nok.c', replace)
+
index e83205f..13fc716 100755 (executable)
@@ -63,11 +63,11 @@ int main(int argc, char **argv) {
 
   @{change_size}@
   @{init}@
-  @{loop}@  
+  @{loop}@
   @{operation}@
-  @{cond}@  
+  @{cond}@
   @{fini}@
-  @{end}@  
+  @{end}@
 
   @{free}@
 
@@ -121,5 +121,5 @@ for call in tcoll:
     replace['loop'] = 'for (i = 0; i < ITERATIONS; i++) {\n    for (j = 0; j < PARAM_PER_ITERATION; j++) {'
     replace['cond'] = '      if (j < PARAM_PER_ITERATION - PARAM_LOST_PER_ITERATION) {'
     replace['fini'] = fini[call]("1") + ' /* MBIERROR */'
-    replace['end'] = '      }\n                }\n     }'
+    replace['end'] = '      }\n     }\n   }'
     make_file(template, f'ResLeak_multiple_{call}_nok.c', replace)