patterns['operation2a'] = gen.operation[c2]("2")
patterns['operation2b'] = gen.operation[c2]("2")
patterns['change_cond'] = 'rank % 2'
+ shortdesc = ' collective ordering'
if c1 == c2:
# Generate the correct code using the same collective twice
replace = patterns.copy()
- replace['shortdesc'] = 'Correct collective ordering'
+ replace['shortdesc'] = 'Correct' + shortdesc
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.copy()
- replace['shortdesc'] = 'Correct collective ordering'
+ replace['shortdesc'] = 'Correct' + shortdesc
replace['longdesc'] = f'All ranks call {c1} once'
replace['outcome'] = 'OK'
replace['errormsg'] = ''
else:
# Generate the correct ordering with two different collectives
replace = patterns.copy()
- replace['shortdesc'] = 'Correct collective ordering'
+ replace['shortdesc'] = 'Correct' + shortdesc
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.copy()
- replace['shortdesc'] = 'Incorrect collective ordering'
+ replace['shortdesc'] = 'Incorrect' + shortdesc
replace['longdesc'] = f'Odd ranks call {c1} and then {c2} while even ranks call these collectives in the other order'
replace['outcome'] = 'ERROR: CallMatching'
replace['errormsg'] = 'Collective mistmatch. @{c1}@ at @{filename}@:@{line:MBIERROR1}@ is matched with @{c2}@ line @{filename}@:@{line:MBIERROR2}@.'
# Generate the incorrect ordering with one collective
replace = patterns.copy()
- replace['shortdesc'] = 'Incorrect collective ordering'
+ replace['shortdesc'] = 'Incorrect' + shortdesc
replace['longdesc'] = f'Odd ranks call {c1} while even ranks do not call any collective'
replace['outcome'] = 'ERROR: CallMatching'
replace['errormsg'] = 'Collective mistmatch. @{c1}@ at @{filename}@:@{line:MBIERROR1}@ is not matched.'
gen.make_file(template, f'CallOrdering_{c1}_none_nok.c', replace)
# Generate a correct ordering with a conditional not depending on ranks
replace = patterns.copy()
- replace['shortdesc'] = 'Correct collective ordering'
+ replace['shortdesc'] = 'Correct' + shortdesc
replace['longdesc'] = f'All ranks call {c1}'
replace['outcome'] = 'OK'
replace['errormsg'] = ''
patterns['write2'] = gen.write[r]("2")
patterns['free1'] = gen.free[s]("1")
patterns['free2'] = gen.free[r]("2")
+ shortdesc = ' Local Concurrency with a P2P'
- # Generate a message race
+ # Gtenerate a message race
if s in gen.send and r in gen.irecv + gen.precv:
replace = patterns.copy()
- replace['shortdesc'] = ' Local Concurrency with a P2P'
+ replace['shortdesc'] = shortdesc
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.copy()
- replace['shortdesc'] = ' Local Concurrency with a P2P'
+ replace['shortdesc'] = shortdesc
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.copy()
- replace['shortdesc'] = ' Local Concurrency with a P2P'
+ replace['shortdesc'] = shortdesc
replace['longdesc'] = f'The message buffer in {s} and {r} are modified before the calls have completed.'
replace['outcome'] = 'ERROR: LocalConcurrency'
replace['errormsg'] = 'Local Concurrency with a P2P. The message buffers in @{s}@ and @{r}@ are modified at @{filename}@:@{line:MBIERROR1}@ and @{filename}@:@{line:MBIERROR2}@ whereas there is no guarantee the calls have been completed.'
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.copy()
# Generate a correct code by switching operation1 and operation2
if p2 in gen.store + gen.load + gen.loadstore:
replace = patterns.copy()
- replace['shortdesc'] = 'Correct code using RMA operations'
- replace['longdesc'] = 'Correct code using RMA operations'
+ replace['shortdesc'] = shortdesc_rma
+ replace['longdesc'] = shortdesc_rma
replace['outcome'] = 'OK'
replace['errormsg'] = 'OK'
replace['operation1'] = gen.operation[p2]("1")
gen.make_file(template, f'LocalConcurrency_lloutwindow_{e}_{p2}_{p1}_ok.c', replace)
# Generate a correct code by removing operation2
replace = patterns.copy()
- replace['shortdesc'] = 'Correct code using RMA operations'
- replace['longdesc'] = 'Correct code using RMA operations'
+ replace['shortdesc'] = shortdesc_rma
+ replace['longdesc'] = shortdesc_rma
replace['outcome'] = 'OK'
replace['errormsg'] = 'OK'
replace['operation1'] = gen.operation[p1]("1")
gen.make_file(template, f'LocalConcurrency_lloutwindow_{e}_{p1}_{p2}_nok.c', replace)
# Generate a correct code by switching operation1 and operation2
replace = patterns.copy()
- replace['shortdesc'] = 'Correct code using RMA operations'
- replace['longdesc'] = 'Correct code using RMA operations'
+ replace['shortdesc'] = shortdesc_rma
+ replace['longdesc'] = shortdesc_rma
replace['outcome'] = 'OK'
replace['errormsg'] = 'OK'
replace['operation1'] = gen.operation[p2]("1")
# Generate a correct code by removing operation2
replace = patterns.copy()
- replace['shortdesc'] = 'Correct code using RMA operations'
- replace['longdesc'] = 'Correct code using RMA operations'
+ replace['shortdesc'] = shortdesc_rma
+ replace['longdesc'] = shortdesc_rma
replace['outcome'] = 'OK'
replace['errormsg'] = 'OK'
replace['operation1'] = gen.operation[p1]("1")