From 36b113e5c94889b7f0ab69fa6327978f2adc3a3a Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 26 Mar 2022 11:01:16 +0100 Subject: [PATCH] Resynch MBI generators with upstream CollP2PMessageRaceGenerator.py: Replace source of second recv for message race. (+ whitespace cleanups) --- .../smpi/MBI/CollP2PMatchingGenerator.py | 1 + .../smpi/MBI/CollP2PMessageRaceGenerator.py | 2 +- .../smpi/MBI/MissingWaitandStartGenerator.py | 14 ++++++------ teshsuite/smpi/MBI/P2PComGenerator.py | 2 +- teshsuite/smpi/MBI/P2PInvalidComGenerator.py | 1 + .../smpi/MBI/P2PMatchingANYSRCGenerator.py | 1 + teshsuite/smpi/MBI/P2PMatchingGenerator.py | 1 + teshsuite/smpi/MBI/RMAArgGenerator.py | 1 + .../MBI/RMALocalLocalConcurrencyGenerator.py | 22 +++++++++---------- .../RMARemoteRemoteConcurrencyGenerator.py | 1 + teshsuite/smpi/MBI/ResleakGenerator.py | 8 +++---- 11 files changed, 30 insertions(+), 24 deletions(-) diff --git a/teshsuite/smpi/MBI/CollP2PMatchingGenerator.py b/teshsuite/smpi/MBI/CollP2PMatchingGenerator.py index 315bf407ba..09e5ff2ff4 100755 --- a/teshsuite/smpi/MBI/CollP2PMatchingGenerator.py +++ b/teshsuite/smpi/MBI/CollP2PMatchingGenerator.py @@ -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) + diff --git a/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py b/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py index 6c45f48831..c817f96d88 100755 --- a/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py +++ b/teshsuite/smpi/MBI/CollP2PMessageRaceGenerator.py @@ -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}@ diff --git a/teshsuite/smpi/MBI/MissingWaitandStartGenerator.py b/teshsuite/smpi/MBI/MissingWaitandStartGenerator.py index 8ff8833769..54d4384bba 100755 --- a/teshsuite/smpi/MBI/MissingWaitandStartGenerator.py +++ b/teshsuite/smpi/MBI/MissingWaitandStartGenerator.py @@ -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' diff --git a/teshsuite/smpi/MBI/P2PComGenerator.py b/teshsuite/smpi/MBI/P2PComGenerator.py index 004a93a3b5..1179650c8f 100755 --- a/teshsuite/smpi/MBI/P2PComGenerator.py +++ b/teshsuite/smpi/MBI/P2PComGenerator.py @@ -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.' diff --git a/teshsuite/smpi/MBI/P2PInvalidComGenerator.py b/teshsuite/smpi/MBI/P2PInvalidComGenerator.py index 87deaa15e9..ff8453e745 100755 --- a/teshsuite/smpi/MBI/P2PInvalidComGenerator.py +++ b/teshsuite/smpi/MBI/P2PInvalidComGenerator.py @@ -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) + diff --git a/teshsuite/smpi/MBI/P2PMatchingANYSRCGenerator.py b/teshsuite/smpi/MBI/P2PMatchingANYSRCGenerator.py index 409495dcce..21613bd095 100755 --- a/teshsuite/smpi/MBI/P2PMatchingANYSRCGenerator.py +++ b/teshsuite/smpi/MBI/P2PMatchingANYSRCGenerator.py @@ -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) + diff --git a/teshsuite/smpi/MBI/P2PMatchingGenerator.py b/teshsuite/smpi/MBI/P2PMatchingGenerator.py index fe4e0b890b..0cf3e5ad91 100755 --- a/teshsuite/smpi/MBI/P2PMatchingGenerator.py +++ b/teshsuite/smpi/MBI/P2PMatchingGenerator.py @@ -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) + diff --git a/teshsuite/smpi/MBI/RMAArgGenerator.py b/teshsuite/smpi/MBI/RMAArgGenerator.py index c459dfa7fc..e8a8ca37df 100755 --- a/teshsuite/smpi/MBI/RMAArgGenerator.py +++ b/teshsuite/smpi/MBI/RMAArgGenerator.py @@ -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) + diff --git a/teshsuite/smpi/MBI/RMALocalLocalConcurrencyGenerator.py b/teshsuite/smpi/MBI/RMALocalLocalConcurrencyGenerator.py index 715d8ae72d..f24d5f326c 100755 --- a/teshsuite/smpi/MBI/RMALocalLocalConcurrencyGenerator.py +++ b/teshsuite/smpi/MBI/RMALocalLocalConcurrencyGenerator.py @@ -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' diff --git a/teshsuite/smpi/MBI/RMARemoteRemoteConcurrencyGenerator.py b/teshsuite/smpi/MBI/RMARemoteRemoteConcurrencyGenerator.py index 74f65497c9..10e421ca99 100755 --- a/teshsuite/smpi/MBI/RMARemoteRemoteConcurrencyGenerator.py +++ b/teshsuite/smpi/MBI/RMARemoteRemoteConcurrencyGenerator.py @@ -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) + diff --git a/teshsuite/smpi/MBI/ResleakGenerator.py b/teshsuite/smpi/MBI/ResleakGenerator.py index e83205f834..13fc716c86 100755 --- a/teshsuite/smpi/MBI/ResleakGenerator.py +++ b/teshsuite/smpi/MBI/ResleakGenerator.py @@ -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) -- 2.20.1