Skip to content

Commit

Permalink
Increase the timeout value passed to MoXI-MC-Flow and add explanation…
Browse files Browse the repository at this point in the history
… as comments
  • Loading branch information
Po-Chun-Chien committed Dec 5, 2024
1 parent e1fee24 commit bac42d5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion benchexec/tools/moxi-mc-flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,15 @@ def project_url(self):

def cmdline(self, executable, options, task, rlimits):
if rlimits.cputime and "--timeout" not in options:
options += ["--timeout", str(ceil(rlimits.cputime * 1.05))]
# The `--timeout` parameter must be passed to the tool
# to prevent it from using its default value,
# which could be shorter than the limit set by BenchExec
# and cause early termination.
# Moreover, in practice the tool sometimes terminates itself prematurely
# even when the exact time limit is passed.
# To prevent this and ensure the tool utilizes the full time limit,
# a factor of 2 is applied to the timeout value.
options += ["--timeout", str(rlimits.cputime * 2)]
return ["python3", executable, task.single_input_file, *options]

def determine_result(self, run):
Expand Down

0 comments on commit bac42d5

Please sign in to comment.