import sys
import os
-import re
from MBIutils import *
import simgrid
(name, path, binary, filename) = sys.argv
for test in parse_one_code(filename):
- execcmd = re.sub("mpirun", f"{path}/smpi_script/bin/smpirun -wrapper '{path}/bin/simgrid-mc --log=mc_safety.t:info' -platform ./cluster.xml -analyze --cfg=smpi/finalization-barrier:on --cfg=smpi/list-leaks:10 --cfg=model-check/max-depth:10000", test['cmd'])
- execcmd = re.sub('\${EXE}', binary, execcmd)
- execcmd = re.sub('\$zero_buffer', "--cfg=smpi/buffering:zero", execcmd)
- execcmd = re.sub('\$infty_buffer', "--cfg=smpi/buffering:infty", execcmd)
+ execcmd = test['cmd'].replace("mpirun", f"{path}/smpi_script/bin/smpirun -wrapper '{path}/bin/simgrid-mc --log=mc_safety.t:info' -platform ./cluster.xml -analyze --cfg=smpi/finalization-barrier:on --cfg=smpi/list-leaks:10 --cfg=model-check/max-depth:10000")
+ execcmd = execcmd.replace('${EXE}', binary)
+ execcmd = execcmd.replace('$zero_buffer', "--cfg=smpi/buffering:zero")
+ execcmd = execcmd.replace('$infty_buffer', "--cfg=smpi/buffering:infty")
if os.path.exists(f'{filename}.txt'):
os.remove(f'{filename}.txt')
if res_category != "TRUE_NEG" and res_category != "TRUE_POS":
print("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n")
print(f"SimGrid gave the wrong result ({outcome} instead of {test['expect']}).")
- sys.exit(1)
\ No newline at end of file
+ sys.exit(1)