Skip to content

Commit

Permalink
Changing default alloc func to only give gen_specs['in'] if it's a fi…
Browse files Browse the repository at this point in the history
…eld with length
  • Loading branch information
jmlarson1 committed Oct 8, 2019
1 parent 926d0fa commit 29eabfe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion libensemble/alloc_funcs/give_sim_work_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def give_sim_work_first(W, H, sim_specs, gen_specs, alloc_specs, persis_info):

# Give gen work
gen_count += 1
gen_work(Work, i, gen_specs['in'], range(len(H)), persis_info[i])
if 'in' in gen_specs and len(gen_specs['in']):
gen_work(Work, i, gen_specs['in'], range(len(H)), persis_info[i])
else:
gen_work(Work, i, [], [], persis_info[i])

return Work, persis_info
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
sim_specs = {'sim_f': sim_f, 'in': ['x'], 'out': [('f', float)]}

gen_specs = {'gen_f': gen_f,
'in': ['sim_id'],
'out': [('x', float, (1,))],
'lb': np.array([-3]),
'ub': np.array([3]),
Expand Down

0 comments on commit 29eabfe

Please sign in to comment.