Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Tweaked the previous strategy so it now considers the (very slow) fir…
Browse files Browse the repository at this point in the history
…st run of each task to size the aforementioned tasks
  • Loading branch information
David Lucas committed Jun 10, 2016
1 parent 9d2b717 commit 1dac338
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/sage/coding/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,6 @@ def task_master(self, verbosity):
"""
import time
#TODO: stop and restart mechanism
#Easily done using len(self.experimental_data(bench)
#to know how much have been done so far
Expand Down Expand Up @@ -874,7 +873,6 @@ def register_results(results, global_no_tests_dict):
global_no_test_dict[bench] = 0
no_test = 0
for res in local_results:
print res[4]
data[bench, no_test] = res
no_test += 1
global_no_test_dict[bench] = no_test
Expand Down Expand Up @@ -905,16 +903,15 @@ def register_results(results, global_no_tests_dict):
bench = t[0]
median_time = self.compute_timings("decoding",
median, identifier = bench)
worst_time = self.experimental_data()[(b, 0)][4]

if median_time < target_task_time:
ind = tasks_preparsing.index(t)
tasks_preparsing[ind][2] = ceil(target_task_time/median_time)
#if median_time < target_task_time:
ind = tasks_preparsing.index(t)
tasks_preparsing[ind][2] = worst_time + ceil(target_task_time/median_time)

start_p = time.ctime()
tasks = preparse_tasks(tasks_preparsing)
results = self._perform_parallel_experiments_for_single_id(tasks)
register_results(results, global_no_test_dict)
end_p = time.ctime()

def _perform_experiments_for_single_id(self, identifier, verbosity):
r"""
Expand Down

0 comments on commit 1dac338

Please sign in to comment.