Skip to content

Commit

Permalink
Proposing only calling allocf when idle workers; should be much bette…
Browse files Browse the repository at this point in the history
…r timing
  • Loading branch information
jmlarson1 committed Jun 27, 2018
1 parent 5963c75 commit c47f20e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions code/src/libE_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ def manager_main(libE_specs, alloc_specs, sim_specs, gen_specs, failure_processi

persistent_queue_data = update_active_and_queue(H[:H_ind], libE_specs, gen_specs, persistent_queue_data)

Work, gen_info = alloc_specs['alloc_f'](worker_sets, H[:H_ind], sim_specs, gen_specs, gen_info)
if len(worker_sets['nonpersis_w']['waiting'] | worker_sets['persis_w']['waiting'][EVAL_SIM_TAG] | worker_sets['persis_w']['waiting'][EVAL_GEN_TAG]):
Work, gen_info = alloc_specs['alloc_f'](worker_sets, H[:H_ind], sim_specs, gen_specs, gen_info)

for w in Work:
if term_test(H,H_ind):
break
worker_sets = send_to_worker_and_update_active_and_idle(comm, H, Work[w], w, sim_specs, gen_specs, worker_sets)
for w in Work:
if term_test(H,H_ind):
break
worker_sets = send_to_worker_and_update_active_and_idle(comm, H, Work[w], w, sim_specs, gen_specs, worker_sets)

H, gen_info, exit_flag = final_receive_and_kill(comm, worker_sets, H, H_ind, sim_specs, gen_specs, term_test, libE_specs, gen_info)

Expand Down

0 comments on commit c47f20e

Please sign in to comment.