Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[MBI] Import generator_utils as gen.
[simgrid.git] / teshsuite / smpi / MBI / RMAArgGenerator.py
index c459dfa..5e42794 100755 (executable)
@@ -1,7 +1,7 @@
 #! /usr/bin/python3
 import os
 import sys
-from generator_utils import *
+import generator_utils as gen
 
 template = """// @{generatedby}@
 /* ///////////////////////// The MPI Bugs Initiative ////////////////////////
@@ -75,8 +75,8 @@ int main(int argc, char **argv) {
 """
 
 
-for e in epoch:
-    for p in rma:
+for e in gen.epoch:
+    for p in gen.rma:
         patterns = {}
         patterns = {'e': e, 'p': p}
         patterns['origin'] = "MBI"
@@ -84,10 +84,10 @@ for e in epoch:
         patterns['rmafeature'] = 'Yes'
         patterns['p'] = p
         patterns['e'] = e
-        patterns['epoch'] = epoch[e]("1")
-        patterns['finEpoch'] = finEpoch[e]("1")
-        patterns['init'] = init[p]("1")
-        patterns['operation'] = operation[p]("1")
+        patterns['epoch'] = gen.epoch[e]("1")
+        patterns['finEpoch'] = gen.finEpoch[e]("1")
+        patterns['init'] = gen.init[p]("1")
+        patterns['operation'] = gen.operation[p]("1")
         patterns['change_arg'] = ""
 
         # Generate a code with a null type
@@ -97,7 +97,7 @@ for e in epoch:
         replace['outcome'] = 'ERROR: InvalidDatatype'
         replace['change_arg'] = 'type = MPI_DATATYPE_NULL;'
         replace['errormsg'] = '@{p}@ at @{filename}@:@{line:MBIERROR}@ has MPI_DATATYPE_NULL as a type'
-        make_file(template, f'InvalidParam_BufferNullCond_{e}_{p}_nok.c', replace)
+        gen.make_file(template, f'InvalidParam_BufferNullCond_{e}_{p}_nok.c', replace)
 
         # Generate a code with an invalid type
         replace = patterns
@@ -106,4 +106,4 @@ for e in epoch:
         replace['outcome'] = 'ERROR: InvalidDatatype'
         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)
+        gen.make_file(template, f'InvalidParam_DatatypeCond_{e}_{p}_nok.c', replace)