Skip to content

Commit

Permalink
Changing initial sends to bcasts
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlarson1 committed Jul 4, 2018
1 parent cc8fdc9 commit 175024e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
8 changes: 5 additions & 3 deletions code/src/libE_manager.py
Expand Up @@ -55,9 +55,11 @@ def manager_main(libE_specs, alloc_specs, sim_specs, gen_specs, failure_processi
# Manager subroutines
######################################################################
def send_initial_info_to_workers(comm, H, sim_specs, gen_specs, worker_sets):
for w in worker_sets['nonpersis_w']['waiting']:
comm.send(obj=H[sim_specs['in']].dtype, dest=w)
comm.send(obj=H[gen_specs['in']].dtype, dest=w)
# for w in worker_sets['nonpersis_w']['waiting']:
# comm.send(obj=H[sim_specs['in']].dtype, dest=w)
# comm.send(obj=H[gen_specs['in']].dtype, dest=w)
comm.bcast(obj=H[sim_specs['in']].dtype)
comm.bcast(obj=H[gen_specs['in']].dtype)


def send_to_worker_and_update_active_and_idle(comm, H, Work, w, sim_specs, gen_specs, worker_sets, given_count):
Expand Down
9 changes: 7 additions & 2 deletions code/src/libE_worker.py
Expand Up @@ -98,8 +98,13 @@ def initialize_worker(c, sim_specs, gen_specs):

dtypes = {}

dtypes[EVAL_SIM_TAG] = comm.recv(buf=None, source=0)
dtypes[EVAL_GEN_TAG] = comm.recv(buf=None, source=0)
# dtypes[EVAL_SIM_TAG] = comm.recv(buf=None, source=0)
# dtypes[EVAL_GEN_TAG] = comm.recv(buf=None, source=0)

dtypes[EVAL_SIM_TAG] = None
dtypes[EVAL_GEN_TAG] = None
dtypes[EVAL_SIM_TAG] = comm.bcast(dtypes[EVAL_SIM_TAG] , root=0)
dtypes[EVAL_GEN_TAG] = comm.bcast(dtypes[EVAL_GEN_TAG] , root=0)


locations = {}
Expand Down

0 comments on commit 175024e

Please sign in to comment.