Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-existing executables. #153

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions benchmark_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ def benchmark_size(bench, metrics):
# If the benchmark failed to build, then return a 0 size instead of
# crashing when failing to open the file.
if not os.path.exists(appexe):
log.warning(f'Warning: {bench} executable not found.')
return {}

# read format from file and check it is as expected
Expand Down
7 changes: 5 additions & 2 deletions benchmark_speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def benchmark_speed(bench, target_args):
appdir = os.path.join(gp['bd_benchdir'], bench)
appexe = os.path.join(appdir, bench)

arglist = []
if os.path.isfile(appexe):
arglist = build_benchmark_cmd(bench, target_args)
try:
Expand Down Expand Up @@ -221,6 +222,7 @@ def benchmark_speed(bench, target_args):
if succeeded:
return exec_time
else:
comm = ""
for arg in arglist:
if arg == arglist[0]:
comm = arg
Expand All @@ -239,7 +241,7 @@ def benchmark_speed(bench, target_args):
def run_threads(bench, target_args, data_collect_q):
item = benchmark_speed(bench, target_args)
data_collect_q.put_nowait([bench, item])

def collect_data(benchmarks, remnant):
"""Collect and log all the raw and optionally relative data associated with
the list of benchmarks supplied in the "benchmarks" argument. "remant"
Expand Down Expand Up @@ -268,7 +270,8 @@ def collect_data(benchmarks, remnant):
collect_data_q = queue.Queue()
benchmark_threads = list()
for bench in benchmarks:
curr_thread = threading.Thread(target=run_threads, args=(bench, target_args, collect_data_q))
curr_thread = threading.Thread(target=run_threads, args=(bench, target_args,
collect_data_q))
benchmark_threads.append(curr_thread)
curr_thread.start()
# Join threads
Expand Down