#! /usr/bin/python3
import os
import sys
-from generator_utils import *
+import generator_utils as gen
template = """// @{generatedby}@
/* ///////////////////////// The MPI Bugs Initiative ////////////////////////
}
"""
-for c in icoll + pcoll:
+for c in gen.icoll + gen.pcoll:
patterns = {}
patterns = {'c': c}
patterns['generatedby'] = f'DO NOT EDIT: this file was generated by {os.path.basename(sys.argv[0])}. DO NOT EDIT.'
- patterns['icollfeature'] = 'Yes' if c in icoll else 'Lacking'
- patterns['pcollfeature'] = 'Yes' if c in pcoll else 'Lacking'
+ patterns['icollfeature'] = 'Yes' if c in gen.icoll else 'Lacking'
+ patterns['pcollfeature'] = 'Yes' if c in gen.pcoll else 'Lacking'
patterns['c'] = c
- patterns['init'] = init[c]("1")
- patterns['start'] = start[c]("1")
- patterns['fini'] = fini[c]("1")
- patterns['operation'] = operation[c]("1")
- patterns['write'] = write[c]("1")
- patterns['free'] = free[c]("1")
-
- replace = patterns
+ patterns['init'] = gen.init[c]("1")
+ patterns['start'] = gen.start[c]("1")
+ patterns['fini'] = gen.fini[c]("1")
+ patterns['operation'] = gen.operation[c]("1")
+ patterns['write'] = gen.write[c]("1")
+ patterns['free'] = gen.free[c]("1")
+
+ 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'
replace['errormsg'] = 'Local Concurrency with a collective. The buffer in @{c}@ is modified at @{filename}@:@{line:MBIERROR}@ whereas there is no guarantee the call has been completed.'
- make_file(template, f'LocalConcurrency_{c}_nok.c', replace)
+ gen.make_file(template, f'LocalConcurrency_{c}_nok.c', replace)