Skip to content

Commit

Permalink
Fixed options comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Nov 28, 2024
1 parent 187925c commit 74b2a73
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions contrib/slurm/arrayexecutor.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,17 +199,22 @@ def filter_previous_results(run_set, benchmark, output_handler):
return run_set.runs

previous_results = parse_results_file(result_file)
if previous_results.get("version") != benchmark.tool_version:

old_version = previous_results.get("version")
new_version = benchmark.tool_version
if old_version != new_version:
logging.warning(
f"Mismatch in tool version: old version={previous_results.get('version')}, current version: {benchmark.tool_version}"
f"Mismatch in tool version: old version={old_version}, current version: {new_version}"
)
shutil.rmtree(logfile_folder)
shutil.rmtree(files_folder)
return run_set.runs

if previous_results.get("options") != benchmark.options:
old_options = previous_results.get("options")
new_options = " ".join(benchmark.options)
if old_options != new_options:
logging.warning(
f"Mismatch in tool options: old options='{previous_results.get('options')}', current options: '{benchmark.options}'"
f"Mismatch in tool options: old options='{old_options}', current options: '{new_options}'"
)
shutil.rmtree(logfile_folder)
shutil.rmtree(files_folder)
Expand Down

0 comments on commit 74b2a73

Please sign in to comment.