Makes minor changes to the generated output.
patterns['change_arg'] = ''
# Generate the code with invalid color
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Invalid color in @{c}@'
replace['longdesc'] = 'invalid color in @{c}@'
replace['outcome'] = 'ERROR: InvalidOtherArg'
patterns['change_arg'] = ''
# Generate an incorrect root matching (root mismatch)
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Collective @{c}@ with a root mismatch'
replace['longdesc'] = 'Odd ranks use 0 as a root while even ranks use 1 as a root'
replace['outcome'] = 'ERROR: RootMatching'
gen.make_file(template, f'ParamMatching_Root_{c}_nok.c', replace)
# Generate the call with root=-1 (invalid root)
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = f'Collective {c} with root = -1'
replace['longdesc'] = f'Collective {c} with root = -1'
replace['outcome'] = 'ERROR: InvalidRoot'
gen.make_file(template, f'InvalidParam_RootNeg_{c}_nok.c', replace)
# Generate the call with root=2 (root not in communicator)
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = f'Collective {c} with root out of the communicator'
replace['longdesc'] = f'Collective {c} with root = 2 (there is only 2 ranks)'
replace['outcome'] = 'ERROR: InvalidRoot'
patterns['change_arg'] = ''
# Generate the incorrect matching (datatype Mmismatch)
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Collective @{c}@ with a datatype mismatch'
replace['longdesc'] = 'Odd ranks use MPI_INT as the datatype while even ranks use MPI_FLOAT'
replace['outcome'] = 'ERROR: DatatypeMatching'
gen.make_file(template, f'ParamMatching_Data_{c}_nok.c', replace)
# Generate the call with null type (invalid datatype)
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Collective @{c}@ with an invalid datatype '
replace['longdesc'] = 'Collective @{c}@ with an invalid datatype '
replace['outcome'] = 'ERROR: InvalidDatatype'
patterns['change_arg'] = ''
# Generate the incorrect matching (op mismatch)
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Collective @{c}@ with an operator mismatch'
replace['longdesc'] = 'Odd ranks use MPI_SUM as the operator while even ranks use MPI_MAX'
replace['outcome'] = 'ERROR: OperatorMatching'
gen.make_file(template, f'ParamMatching_Op_{c}_nok.c', replace)
# Generate the call with Op=MPI_OP_NULL (invalid op)
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Collective @{c}@ with an invalid operator '
replace['longdesc'] = 'Collective @{c}@ with an invalid operator '
replace['outcome'] = 'ERROR: InvalidOperator'
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'
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'] = 'Odd ranks call the collective on newcom while even ranks call the collective on MPI_COMM_WORLD'
replace['outcome'] = 'ERROR: CommunicatorMatching'
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'
patterns['write'] = gen.write[c]("1")
patterns['free'] = gen.free[c]("1")
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Local concurrency with a collective'
replace['longdesc'] = f'The buffer in {c} is modified before the call has been completed.'
replace['outcome'] = 'ERROR: LocalConcurrency'
if c1 == c2:
# Generate the correct code using the same collective twice
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Correct collective ordering'
replace['longdesc'] = f'All ranks call {c1} twice'
replace['outcome'] = 'OK'
replace['errormsg'] = ''
gen.make_file(template, f'CallOrdering_{c1}_{c2}_ok.c', replace)
# Generate the correct code using the collective once
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Correct collective ordering'
replace['longdesc'] = f'All ranks call {c1} once'
replace['outcome'] = 'OK'
gen.make_file(template, f'CallOrdering_{c1}_ok.c', replace)
else:
# Generate the correct ordering with two different collectives
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Correct collective ordering'
replace['longdesc'] = f'All ranks call {c1} and then {c2}'
replace['outcome'] = 'OK'
replace['errormsg'] = ''
gen.make_file(template, f'CallOrdering_{c1}_{c2}_ok.c', replace)
# Generate the incorrect ordering with two different collectives
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Incorrect collective ordering'
replace['longdesc'] = f'Odd ranks call {c1} and then {c2} while even ranks call these collectives in the other order'
replace['outcome'] = 'ERROR: CallMatching'
gen.make_file(template, f'CallOrdering_{c1}_{c2}_nok.c', replace)
# Generate the incorrect ordering with one collective
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Incorrect collective ordering'
replace['longdesc'] = f'Odd ranks call {c1} while even ranks do not call any collective'
replace['outcome'] = 'ERROR: CallMatching'
replace['operation1b'] = '' # Remove functions
replace['operation2b'] = ''
replace['operation2a'] = ''
+ replace['init2'] = ''
replace['fini1b'] = ''
replace['fini2a'] = ''
replace['fini2b'] = ''
+ replace['free1'] = gen.free[c1]("1")
+ replace['free2'] = ''
gen.make_file(template, f'CallOrdering_{c1}_none_nok.c', replace)
# Generate a correct ordering with a conditional not depending on ranks
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Correct collective ordering'
replace['longdesc'] = f'All ranks call {c1}'
replace['outcome'] = 'OK'
replace['errormsg'] = ''
replace['change_cond'] = 'nprocs<256'
- replace['operation2b'] = '' # Remove functions
+ replace['operation1b'] = '' # Remove functions
+ replace['operation2b'] = ''
replace['operation2a'] = ''
+ replace['init2'] = ''
+ replace['fini1b'] = ''
+ replace['fini2a'] = ''
replace['fini2b'] = ''
- replace['free2a'] = ''
+ replace['free1'] = gen.free[c1]("1")
+ replace['free2'] = ''
gen.make_file(template, f'CallOrdering_{c1}_none_ok.c', replace)
patterns['operation3'] = gen.operation[c]("3")
# Generate the incorrect matching because of the conditional
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Point to point & collective mismatch'
replace['longdesc'] = 'The @{s}@ corresponding to the @{r}@ is after @{c}@, while @{r}@ is before @{c}@. This is a deadlock.'
replace['outcome'] = 'ERROR: CallMatching'
gen.make_file(template, f'CallOrdering_{r}_{s}_{c}_nok.c', replace)
# Generate the incorrect code depending on buffering
- # replace = patterns
+ # replace = patterns.copy()
# replace['shortdesc'] = 'Point to point & collective mismatch'
# replace['longdesc'] = 'Point to point @{s}@ is matched with @{c}@ which causes a deadlock depending on the buffering mode.'
# replace['outcome'] = 'ERROR: BufferingHazard'
patterns['operation4'] = gen.operation[r]("4")
# Generate the incorrect matching because of the conditional
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Message race'
replace['longdesc'] = 'Message race in @{r}@ with @{c}@.'
replace['outcome'] = 'ERROR: MessageRace'
patterns['init'] = gen.init[c]("1")
patterns['fini'] = gen.fini[c]("1")
patterns['operation'] = gen.operation[c]("1")
+ patterns['change_dims'] = '/* No error injected here */'
# Generate the correct code
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Function @{c}@ with correct arguments'
replace['longdesc'] = f'All ranks in comm call {c} with correct arguments'
replace['outcome'] = 'OK'
gen.make_file(template, f'InvalidParam_{c}_ok.c', replace)
# Generate the incorrect code
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'The code tries to get cartesian information of MPI_COMM_WORLD.'
replace['longdesc'] = 'The code creates a cartesian communicator, and tries to get cartesian information of MPI_COMM_WORLD.'
replace['outcome'] = 'ERROR: InvalidCommunicator'
gen.make_file(template, f'InvalidParam_Com_{c}_nok.c', replace)
# Generate the code with newcom=MPI_COMM_NULL
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Function @{c}@ called with comm=MPI_COMM_NULL'
replace['longdesc'] = 'Function @{c}@ called with comm=MPI_COMM_NULL'
replace['outcome'] = 'ERROR: InvalidCommunicator'
gen.make_file(template, f'InvalidParam_ComNull_{c}_nok.c', replace)
# Generate the code with invalid dimension
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Creates a cartesian communicator with a negative entry in the dims attribute'
replace['longdesc'] = 'Creates a cartesian communicator with a negative entry in the dims attribute, which is a usage error'
replace['outcome'] = 'ERROR: InvalidOtherArg'
patterns['free2'] = gen.free[r]("2")
# Generate the correct code
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Correct matching'
replace['longdesc'] = 'No error'
replace['outcome'] = 'OK'
gen.make_file(template, f'ReqLifecycle_{s}_{r}_ok.c', replace)
# Generate the code with a missing wait
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Missing wait'
replace['longdesc'] = 'Missing Wait. @{s}@ at @{filename}@:@{line:MBIERROR}@ has no completion.'
replace['outcome'] = 'ERROR: MissingWait'
if s in gen.psend:
# Generate the code with a missing start - persistent only
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Missing start'
replace['longdesc'] = 'Missing start. @{s}@ at @{filename}@:@{line:MBIERROR}@ has no start'
replace['outcome'] = 'ERROR: MissingStart'
replace['start1'] = ' /* MBIERROR MISSING: ' + startPers + ' */'
gen.make_file(template, f'ReqLifecycle_MissingStart_{s}_{r}_nok.c', replace)
# Generate the code with a missing free - persistent only
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Missing free'
replace['longdesc'] = 'Missing free. @{s}@ at @{filename}@:@{line:MBIERROR}@ has no free'
replace['outcome'] = 'ERROR: RequestLeak'
patterns['free2'] = ""
# Generate the code with a missing wait
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Missing wait'
replace['longdesc'] = 'Missing Wait. @{c}@ at @{filename}@:@{line:MBIERROR}@ has no completion'
replace['outcome'] = 'ERROR: MissingWait'
if c in gen.pcoll:
# Generate the code with a missing start - persistent only
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Missing start functio'
replace['longdesc'] = 'Missing Start. @{c}@ at @{filename}@:@{line:MBIERROR}@ has no start'
replace['outcome'] = 'ERROR: MissingStart'
gen.make_file(template, f'ReqLifecycle_MissingStart_{c}_nok.c', replace)
# Generate the code with a resleak (no free) - persistent only
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Missing free'
replace['longdesc'] = 'Missing free. @{c}@ at @{filename}@:@{line:MBIERROR}@ has no free'
replace['outcome'] = 'ERROR: RequestLeak'
patterns['free2'] = gen.free[p2]("2")
# Generate the incorrect matching
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Point to point @{p1}@ and @{p2}@ have a datatype mismatch'
replace['longdesc'] = 'Process 0 uses MPI_FLOAT as the datatype while process 1 uses MPI_INT.'
replace['outcome'] = 'ERROR: DatatypeMatching'
gen.make_file(template, f'ParamMatching_Data_{p1}_{p2}_nok.c', replace)
# Generate code with a null type
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Use of invalid datatype in point-to-point communication'
replace['longdesc'] = 'Point to point @{p1}@ and @{p2}@ have MPI_DATATYPE_NULL as a type'
replace['outcome'] = 'ERROR: InvalidDatatype'
gen.make_file(template, f'InvalidParam_DatatypeNull_{p1}_{p2}_nok.c', replace)
# Generate code with an invalid datatype
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Use of invalid datatype in point-to-point communication'
replace['longdesc'] = 'Point to point @{p1}@ and @{p2}@ have an invalid datatype'
replace['outcome'] = 'ERROR: InvalidDatatype'
patterns['change_arg'] = ""
# Generate the incorrect tag matching
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Point to point @{p1}@ and @{p2}@ have a tag mismatch'
replace['longdesc'] = 'Point to point @{p1}@ and @{p2}@ have a tag mismatch.'
replace['outcome'] = 'ERROR: TagMatching'
gen.make_file(template, f'ParamMatching_Tag_{p1}_{p2}_nok.c', replace)
# Generate the code with an invalid tag
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Point to point @{p1}@ and @{p2}@ have an invalid tag'
replace['longdesc'] = 'Point to point @{p1}@ and @{p2}@ have an invalid tag.'
replace['outcome'] = 'ERROR: InvalidTag'
gen.make_file(template, f'InvalidParam_Tag_{p1}_{p2}_nok.c', replace)
# Generate a correct code using MPI_ANY_TAG
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Correct code'
replace['longdesc'] = 'Correct code'
replace['outcome'] = 'OK'
patterns['free1'] = gen.free[p1]("1")
patterns['free2'] = gen.free[p2]("2")
patterns['change_srcdest'] = ""
+ patterns['change_com'] = ""
# Generate the incorrect matching
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Point to point @{p1}@ and @{p2}@ have a communicator mismatch'
replace['longdesc'] = 'Process 1 uses newcom as the communicator while process 0 uses MPI_COMM_WORLD.'
replace['outcome'] = 'ERROR: CommunicatorMatching'
gen.make_file(template, f'ParamMatching_Com_{p1}_{p2}_nok.c', replace)
# Generate the code with an invalid communicator
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Point to point @{p1}@ and @{p2}@ have an invalid communicator'
replace['longdesc'] = 'Point to point @{p1}@ and @{p2}@ have an invalid communicator.'
replace['outcome'] = 'ERROR: InvalidCommunicator'
gen.make_file(template, f'InvalidParam_Com_{p1}_{p2}_nok.c', replace)
# Generate the code with an invalid communicator ==> TO CHECK
- #replace = patterns
+ #replace = patterns.copy()
#replace['shortdesc'] = 'Point to point @{p1}@ and @{p2}@ have an invalid communicator'
# replace['longdesc'] = 'Point to point @{p1}@ and @{p2}@ have an invalid communicator.'
# replace['outcome'] = 'ERROR: InvalidCommunicator'
# gen.make_file(template, f'InvalidParam_Com_{p1}_{p2}_nok.c', replace)
# Generate the code with an invalid dest
- replace = patterns
+ replace = patterns.copy()
replace['origin'] = "MBI"
replace['shortdesc'] = 'Point to point @{p1}@ has an invalid argument'
replace['longdesc'] = 'Point to point @{p1}@ and @{p2}@ have an invalid communicator.'
gen.make_file(template, f'InvalidParam_Dest_{p1}_{p2}_nok.c', replace)
# Generate the code with an invalid src
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Point to point @{p2}@ has an invalid argument'
replace['longdesc'] = 'Point to point @{p1}@ and @{p2}@ have an invalid communicator.'
replace['outcome'] = 'ERROR: InvalidSrcDest'
patterns['change_com1'] = ""
patterns['change_com2'] = ""
- replace = patterns
+ replace = patterns.copy()
replace['origin'] = "inspired from MPI-Corrbench"
replace['shortdesc'] = 'Point to point @{p2}@ has an invalid communicator'
replace['longdesc'] = 'MPI_COMM_NULL used in point to point @{p2}@'
replace['change_com2'] = 'newcom = MPI_COMM_NULL;'
gen.make_file(template, f'InvalidParam_ComNull_{p2}_{p1}nok.c', replace)
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Point to point @{p2}@ has an invalid communicator'
replace['longdesc'] = 'MPI_COMM_NULL used in point to point @{p2}@'
replace['outcome'] = 'ERROR: InvalidCommunicator'
# Generate a message race
if s in gen.send and r in gen.irecv + gen.precv:
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = ' Local Concurrency with a P2P'
replace['longdesc'] = f'The message buffer in {r} is modified before the call has been completed.'
replace['outcome'] = 'ERROR: LocalConcurrency'
replace['errormsg'] = 'Local Concurrency with a P2P. The receive buffer in @{r}@ is modified at @{filename}@:@{line:MBIERROR2}@ whereas there is no guarantee the message has been received.'
gen.make_file(template, f'LocalConcurrency_{r}_{s}_nok.c', replace)
if s in gen.isend + gen.psend and r in gen.recv:
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = ' Local Concurrency with a P2P'
replace['longdesc'] = f'The message buffer in {s} is modified before the call has been completed.'
replace['outcome'] = 'ERROR: LocalConcurrency'
replace['errormsg'] = 'Local Concurrency with a P2P. The send buffer in @{s}@ is modified at @{filename}@:@{line:MBIERROR1}@ whereas there is no guarantee the message has been sent.'
gen.make_file(template, f'LocalConcurrency_{r}_{s}_nok.c', replace)
if s in gen.isend + gen.psend and r in gen.irecv + gen.precv:
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = ' Local Concurrency with a P2P'
replace['longdesc'] = f'The message buffer in {s} and {r} are modified before the calls have completed.'
replace['outcome'] = 'ERROR: LocalConcurrency'
patterns['operation1'] = gen.operation[r]("1")
# Generate the incorrect matching
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'The message ordering is non-deterministic.'
replace['longdesc'] = 'The code assumes a fixed order in the reception of messages while the message ordering is non-deterministic.'
replace['outcome'] = 'ERROR: MessageRace'
patterns['change_cond'] = 'rank == 1'
# Generate the incorrect matching with one call
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Point to point @{p}@ is not matched'
replace['longdesc'] = 'Process 0 calls @{p}@ and is not matched'
replace['outcome'] = 'ERROR: CallMatching'
gen.make_file(template, f'CallOrdering_{p}_nok.c', replace)
# Generate the incorrect matching with two calls
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Both point to point @{p}@ are not matched'
replace['longdesc'] = 'Processes 0 and 1 both call @{p}@ which are not matched'
replace['outcome'] = 'ERROR: CallMatching'
patterns['change_cond'] = '(rank == 1) && (its_raining)'
# Generate the incorrect matching because of the conditional
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Point to point @{r}@ is never called.'
replace['longdesc'] = 'Point to point @{r}@ is never executed. Process 1 calls MPI_Finalize and causes a deadlock.'
replace['outcome'] = 'ERROR: CallMatching'
patterns['operation2c'] = gen.operation[s]("4")
# Generate the incorrect matching
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'MPI_Probe is called before MPI_Recv.'
replace['longdesc'] = 'MPI_Probe is a blocking call that returns only after a matching message has been found. By calling MPI_Probe before MPI_Recv, a deadlock is created.'
replace['outcome'] = 'ERROR: CallMatching'
gen.make_file(template, f'CallOrdering_{p}_{r}_{s}_nok.c', replace)
# Generate a correct matching
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Correct use of MPI_Probe.'
replace['longdesc'] = 'Correct use of MPI_Probe.'
replace['outcome'] = 'OK'
patterns['change_arg'] = ""
# Generate a code with a null type
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Invalid argument in one-sided operation.'
replace['longdesc'] = 'A one-sided operation has MPI_DATATYPE_NULL as a type.'
replace['outcome'] = 'ERROR: InvalidDatatype'
gen.make_file(template, f'InvalidParam_BufferNullCond_{e}_{p}_nok.c', replace)
# Generate a code with an invalid type
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Invalid argument in one-sided operation.'
replace['longdesc'] = 'Use of an invalid datatype in one-sided operation.'
replace['outcome'] = 'ERROR: InvalidDatatype'
patterns['malloc'] = "malloc(N * sizeof(int));"
# Generate a code with a null type
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Invalid argument in one-sided operation.'
replace['longdesc'] = 'A one-sided operation has MPI_DATATYPE_NULL as a type.'
replace['outcome'] = 'ERROR: InvalidDatatype'
gen.make_file(template, f'InvalidParam_DatatypeNull_{e}_{p}_nok.c', replace)
# Generate a code with a null buffer (move to RMAWinBufferGenerator)
- # replace = patterns
+ # replace = patterns.copy()
# replace['origin'] = 'MPI-Corrbench'
# replace['shortdesc'] = 'nullptr is invalid in one-sided operation.'
# replace['longdesc'] = 'A one-sided operation has an invalid buffer.'
# gen.make_file(template, f'InvalidParam_BufferNull_{e}_{p}_nok.c', replace)
# Generate a code with an invalid type
- replace = patterns
+ replace = patterns.copy()
replace['origin'] = 'MBI'
replace['shortdesc'] = 'Invalid argument in one-sided operation.'
replace['longdesc'] = 'Use of an invalid datatype in one-sided operation.'
gen.make_file(template, f'InvalidParam_Datatype_{e}_{p}_nok.c', replace)
# Generate a code with invalid buffer
- replace = patterns
+ replace = patterns.copy()
patterns['origin'] = "MPI-Corrbench"
replace['shortdesc'] = 'Invalid invalid buffer (buffer must be allocated)'
replace['longdesc'] = 'Use of an invalid buffer in MPI_Win_create.'
replace['outcome'] = 'ERROR: InvalidBuffer'
- patterns['malloc'] = "NULL; /* MBIERROR2 */"
+ replace['malloc'] = "NULL; /* MBIERROR2 */"
replace['init'] = ""
- patterns['operation'] = ""
+ replace['operation'] = ""
replace['change_arg'] = ""
replace['errormsg'] = 'Invalid buffer in Win_create at @{filename}@:@{line:MBIERROR2}@'
gen.make_file(template, f'InvalidParam_InvalidBufferWinCreate_{e}_{p}_nok.c', replace)
patterns['operation2'] = gen.operation[p2]("1")
# 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'
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 = patterns.copy()
replace['shortdesc'] = 'Correct code using RMA operations'
replace['longdesc'] = 'Correct code using RMA operations'
replace['outcome'] = 'OK'
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 = patterns.copy()
replace['shortdesc'] = 'Correct code using RMA operations'
replace['longdesc'] = 'Correct code using RMA operations'
replace['outcome'] = 'OK'
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 = patterns.copy()
replace['shortdesc'] = 'Correct code using RMA operations'
replace['longdesc'] = 'Correct code using RMA operations'
replace['outcome'] = 'OK'
gen.make_file(template, f'LocalConcurrency_lloutwindow_{e}_{p2}_{p1}_ok.c', replace)
# Generate a correct code by removing operation2
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Correct code using RMA operations'
replace['longdesc'] = 'Correct code using RMA operations'
replace['outcome'] = 'OK'
patterns['operation2'] = gen.operation[s]("2") #send
patterns['operation3'] = gen.operation[r]("3") #recv
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Global Concurrency error.'
replace['longdesc'] = 'Global Concurrency error. Concurrent access of variable winbuf by @{p}@ and @{r}@'
replace['outcome'] = 'ERROR: GlobalConcurrency'
patterns['operation2'] = gen.operation[p2]("1")
# Generate a data race (Get + Get/load/store/Put)
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Global Concurrency error.'
replace['longdesc'] = 'Global Concurrency error. @{p2}@ conflicts with @{p1}@'
replace['outcome'] = 'ERROR: GlobalConcurrency'
patterns['operation2'] = gen.operation[p2]("1")
# Generate a data race (Put + store)
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Global Concurrency error.'
replace['longdesc'] = 'Global Concurrency error. @{p2}@ conflicts with @{p1}@'
replace['outcome'] = 'ERROR: GlobalConcurrency'
patterns['operation1'] = gen.operation[p1]("1")
# Generate a data race (Get + Get/load/store/Put)
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Global Concurrency error.'
replace['longdesc'] = 'Global Concurrency error. Both processes 0 and 2 access the window in process 1 with @{p1}@'
replace['outcome'] = 'ERROR: GlobalConcurrency'
patterns['operation'] = gen.operation[p]("1")
# Generate a code correct
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Correct code'
replace['longdesc'] = 'Correct code'
replace['outcome'] = 'OK'
gen.make_file(template, f'ReqLifecycle_RMA_{e1}_{p}_ok.c', replace)
# Generate a code with missing open epoch
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = f"Request lifecycle, missing open {e1} epoch"
replace['longdesc'] = f"Request lifecycle, missing open {e1} epoch"
replace['outcome'] = 'ERROR: MissingStart'
gen.make_file(template, f'ReqLifecycle_RMA_MissingOpen_{e1}_{p}_nok.c', replace)
# Generate a code with missing close epoch
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = f"Request lifecycle, missing close {e1} epoch"
replace['longdesc'] = f"Request lifecycle, missing close {e1} epoch"
replace['outcome'] = 'ERROR: MissingWait'
patterns['operation'] = gen.operation[p]("1")
# Generate a code with epoch into an epoch
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = f"Request lifecycle, {e2} epoch into {e1} epoch"
replace['longdesc'] = f"Request lifecycle, {e2} epoch into {e1} epoch"
replace['outcome'] = 'ERROR: MissingWait' #FIXME: New type of error
patterns['generatedby'] = f'DO NOT EDIT: this file was generated by {os.path.basename(sys.argv[0])}. DO NOT EDIT.'
patterns['rmafeature'] = 'Yes'
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = 'Invalid buffer in window creation.'
replace['longdesc'] = 'Invalid buffer in window creation.'
replace['outcome'] = 'ERROR: InvalidBuffer'
patterns['end'] = ''
# Generate the correct code
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = '@{call}@ is correctly used'
replace['longdesc'] = f'{call} correctly used'
replace['outcome'] = 'OK'
gen.make_file(template, f'ResLeak_{call}_ok.c', replace)
# Generate the resleak
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = '@{call}@ has no free'
replace['longdesc'] = '@{call}@ has no free'
replace['outcome'] = f'ERROR: {gen.error[call]}'
gen.make_file(template, f'ResLeak_{call}_nok.c', replace)
# Generate multiple resleak
- replace = patterns
+ replace = patterns.copy()
replace['shortdesc'] = '@{call}@ lacks several free'
replace['longdesc'] = '@{call}@ lacks several free'
replace['outcome'] = f'ERROR: {gen.error[call]}'