#! /usr/bin/python3
import os
import sys
-from generator_utils import *
+import generator_utils as gen
template = """// @{generatedby}@
/* ///////////////////////// The MPI Bugs Initiative ////////////////////////
int * buffer;
-void get_win(MPI_Win *win) {
+static void get_win(MPI_Win *win) {
@{bufferalloc}@
MPI_Win_create(@{buffer}@, N * sizeof(int), 1, MPI_INFO_NULL, MPI_COMM_WORLD, win);
"""
-for b in ['stack', 'missing', 'null', 'malloc', 'bufferSize']:
+for b in ['missing', 'null', 'malloc', 'bufferSize']:
patterns = {}
patterns = {'b': b}
patterns['origin'] = "MPI-CorrBench"
ok = 'nok'
replace['buffer'] = 'buffer'
- if b == 'stack':
- replace['bufferalloc'] = 'int buffer[N]; /* MBIERROR1 */'
- replace['buffer'] = '&buffer'
- replace['longdesc'] = 'Use a stack oriented buffer in window creation, buffer on temporary stack memory.'
- elif b == 'missing':
+ if b == 'missing':
replace['bufferalloc'] = '/* MBIERROR1 */'
replace['longdesc'] = 'Uninitialized buffer in window creation.'
elif b == 'null':
replace['errormsg'] = ''
ok = 'ok'
- make_file(template, f'InvalidParam_WinBuffer_{b}_{ok}.c', replace)
+ gen.make_file(template, f'InvalidParam_WinBuffer_{b}_{ok}.c', replace)