-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_benchmarks_hello.py
executable file
·50 lines (36 loc) · 1.29 KB
/
run_benchmarks_hello.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env python3
from instance import *
from configuration_hello import *
def run_benchmarks(instances, do_compilation=True, max_result=1, skip_running=True):
nb_tasks = 225
number_of_instances = len(instances)
processed_instances = 0
for inst in instances:
processed_instances = processed_instances + 1
inst_name = str(inst)
nb_results = len(inst.results_ht)
print('Processing %(processed_instances)d / %(number_of_instances)d : %(inst_name)s (%(nb_results)d) - ' % locals(), end='')
if nb_results >= max_result:
print('Pass')
continue
if skip_running:
if inst.still_running:
print('Running')
continue
print('OK')
inst.platform.wait_nb_task(nb_tasks - 1)
task = inst.create_new_task()
task.prepare_run(do_compilation)
task.run()
task.precheck_result()
print()
inst.platform.wait_nb_task(nb_tasks - 1)
def main():
instances = generate_instances(check_platform=True)
#instances = [i for i in instances if 'O3' not in str(i)]
instances_load_results(instances)
instances_check_results(instances)
run_benchmarks(instances, max_result=3)
print("Done.")
if __name__ == "__main__":
main()