CollP2PMessageRaceGenerator.py: Replace source of second recv for message race.
(+ whitespace cleanups)
# replace['fini1'] = fini[r]("2")
# replace['fini2'] = fini[s]("1")
# make_file(template, f'CollP2PBuffering_{r}_{s}_{c}_nok.c', replace)
+
MPI_Op op = MPI_SUM;
-
@{init1}@
@{init2}@
@{init3}@
@{operation3}@ /* MBIERROR1 */
@{operation1}@
@{fini1}@
+ src = 0;
@{operation4}@ /* MBIERROR2 */
@{fini3}@
@{fini4}@
Description: @{shortdesc}@
@{longdesc}@
-
+
Version of MPI: Conforms to MPI 1.1, does not require MPI 2 implementation
BEGIN_MPI_FEATURES
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'
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.'
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'
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'
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'
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.'
replace['change_com1'] = 'newcom = MPI_COMM_NULL;'
replace['change_com2'] = ""
make_file(template, f'InvalidParam_ComNull_{p1}_{p2}nok.c', replace)
+
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)
+
replace['operation1'] = operation[s]("1")
replace['operation2'] = operation[r]("2")
make_file(template, f'CallOrdering_{r}_{s}_nok.c', replace)
+
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)
+
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'
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'
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'
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)
+
@{change_size}@
@{init}@
- @{loop}@
+ @{loop}@
@{operation}@
- @{cond}@
+ @{cond}@
@{fini}@
- @{end}@
+ @{end}@
@{free}@
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)