BEGIN_MBI_TESTS
$ mpirun -np 2 ${EXE} 1
- | @{outcome}@
- | @{errormsg}@
+ | @{outcome1}@
+ | @{errormsg1}@
$ mpirun -np 2 ${EXE} 2
- | @{outcome}@
- | @{errormsg}@
+ | @{outcome2}@
+ | @{errormsg2}@
END_MBI_TESTS
////////////////////// End of MBI headers /////////////////// */
int nprocs = -1;
int rank = -1;
MPI_Status sta;
- int src,dest;
int i=0;
int root = 0;
- int stag=0, rtag=0;
+ int stag=0;
+ int rtag=0;
int buff_size = N;
MPI_Init(&argc, &argv);
@{init2}@
if (rank == 0) {
- dest=1, src=1;
if ((n % 2) == 0) { @{errorcond}@
@{operation1b}@
@{fini1b}@
@{fini1a}@
}
} else @{addcond}@ {
- dest=0, src=0;
@{operation2}@
@{fini2}@
}
patterns['r'] = r
patterns['init1'] = gen.init[s]("1")
- patterns['operation1a'] = gen.operation[s]("1").replace("buf1", "buffer")
- patterns['operation1b'] = gen.operation[s]("1").replace("buf1", "buffer")
+ patterns['operation1a'] = gen.operation[s]("1").replace("buf1", "buffer").replace("dest", "1")
+ patterns['operation1b'] = gen.operation[s]("1").replace("buf1", "buffer").replace("dest", "1")
patterns['fini1a'] = gen.fini[s]("1")
patterns['fini1b'] = gen.fini[s]("1")
patterns['free1'] = gen.free[s]("1")
patterns['init2'] = gen.init[r]("2")
- patterns['operation2'] = gen.operation[r]("2").replace("buf2", "buffer")
+ patterns['operation2'] = gen.operation[r]("2").replace("buf2", "buffer").replace("src", "0")
patterns['fini2'] = gen.fini[r]("2")
patterns['free2'] = gen.free[r]("2")
replace = patterns.copy()
replace['shortdesc'] = 'Correct call ordering.'
replace['longdesc'] = 'Correct call ordering.'
- replace['outcome'] = 'OK'
- replace['errormsg'] = 'OK'
+ replace['outcome1'] = 'OK'
+ replace['errormsg1'] = 'OK'
+ replace['outcome2'] = 'OK'
+ replace['errormsg2'] = 'OK'
gen.make_file(template, f'InputHazardCallOrdering_{r}_{s}_ok.c', replace)
# Generate the incorrect matching
replace = patterns.copy()
replace['shortdesc'] = 'Missing Send function.'
replace['longdesc'] = 'Missing Send function call for a path depending to input, a deadlock is created.'
- replace['outcome'] = 'ERROR: IHCallMatching'
- replace['errormsg'] = 'P2P mistmatch. Missing @{r}@ at @{filename}@:@{line:MBIERROR}@.'
+ replace['outcome1'] = 'OK'
+ replace['errormsg1'] = 'OK'
+ replace['outcome2'] = 'ERROR: IHCallMatching'
+ replace['errormsg2'] = 'P2P mistmatch. Missing @{r}@ at @{filename}@:@{line:MBIERROR}@.'
replace['errorcond'] = '/* MBIERROR */'
replace['operation1b'] = ''
replace['fini1b'] = ''
replace = patterns.copy()
replace['shortdesc'] = 'Correct call ordering.'
replace['longdesc'] = 'Correct call ordering.'
- replace['outcome'] = 'OK'
- replace['errormsg'] = 'OK'
+ replace['outcome1'] = 'OK'
+ replace['errormsg1'] = 'OK'
+ replace['outcome2'] = 'OK'
+ replace['errormsg2'] = 'OK'
gen.make_file(template, f'InputHazardCallOrdering_{c}_ok.c', replace)
# Generate the incorrect matching
replace = patterns.copy()
replace['shortdesc'] = 'Missing collective function call.'
replace['longdesc'] = 'Missing collective function call for a path depending to input, a deadlock is created.'
- replace['outcome'] = 'ERROR: IHCallMatching'
- replace['errormsg'] = 'P2P mistmatch. Missing @{c}@ at @{filename}@:@{line:MBIERROR}@.'
+ replace['outcome1'] = 'OK'
+ replace['errormsg1'] = 'OK'
+ replace['outcome2'] = 'ERROR: IHCallMatching'
+ replace['errormsg2'] = 'P2P mistmatch. Missing @{c}@ at @{filename}@:@{line:MBIERROR}@.'
replace['errorcond'] = '/* MBIERROR */'
replace['operation1b'] = ''
replace['fini1b'] = ''