Skip to content

Commit

Permalink
Removing libE_info from simf and genf that don't use them
Browse files Browse the repository at this point in the history
  • Loading branch information
jmlarson1 committed Aug 2, 2018
1 parent ba39483 commit 8b6a81e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 23 deletions.
4 changes: 1 addition & 3 deletions libensemble/gen_funcs/aposmm_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from petsc4py import PETSc
import nlopt

def aposmm_logic(H,persis_info,gen_specs,libE_info):
def aposmm_logic(H,persis_info,gen_specs,_):
"""
Receives the following data from H:
Expand Down Expand Up @@ -58,8 +58,6 @@ def aposmm_logic(H,persis_info,gen_specs,libE_info):
"""

# del libE_info # Ignored parameter

n, n_s, c_flag, O, rk_const, lhs_divisions, mu, nu = initialize_APOSMM(H, gen_specs)

# np.savez('H'+str(len(H)),H=H,gen_specs=gen_specs,persis_info=persis_info)
Expand Down
13 changes: 3 additions & 10 deletions libensemble/gen_funcs/uniform_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@

import numpy as np

def uniform_random_sample_with_different_nodes_and_ranks(H,persis_info,gen_specs,libE_info):
def uniform_random_sample_with_different_nodes_and_ranks(H,persis_info,gen_specs,_):
"""
Generates points uniformly over the domain defined by gen_specs['ub'] and
gen_specs['lb']. Also randomly requests a different number of nodes to be
used in the evaluation of the generated point.
"""

del libE_info # Ignored parameter

ub = gen_specs['ub']
lb = gen_specs['lb']
n = len(lb)
Expand All @@ -38,13 +35,11 @@ def uniform_random_sample_with_different_nodes_and_ranks(H,persis_info,gen_specs
return O, persis_info


def uniform_random_sample_obj_components(H,persis_info,gen_specs,libE_info):
def uniform_random_sample_obj_components(H,persis_info,gen_specs,_):
"""
Generates points uniformly over the domain defined by gen_specs['ub'] and
gen_specs['lb'] but requests each component be evaluated separately.
"""
del libE_info # Ignored parameter

ub = gen_specs['ub']
lb = gen_specs['lb']

Expand All @@ -66,13 +61,11 @@ def uniform_random_sample_obj_components(H,persis_info,gen_specs,libE_info):

return O, persis_info

def uniform_random_sample(H,persis_info,gen_specs,libE_info):
def uniform_random_sample(H,persis_info,gen_specs,_):
"""
Generates points uniformly over the domain defined by gen_specs['ub'] and
gen_specs['lb'].
"""
del libE_info # Ignored parameter

ub = gen_specs['ub']
lb = gen_specs['lb']

Expand Down
4 changes: 1 addition & 3 deletions libensemble/sim_funcs/chwirut1.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,11 @@ def EvaluateJacobian(x):

return j

def libE_func_wrapper(H,persis_info,sim_specs,libE_info):
def libE_func_wrapper(H,persis_info,sim_specs,_):
"""
libEnsemble wrapper around EvaluateFunction
"""

del libE_info # Ignored parameter

batch = len(H['x'])
O = np.zeros(batch,dtype=sim_specs['out'])

Expand Down
4 changes: 2 additions & 2 deletions libensemble/sim_funcs/comms_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from libensemble.controller import JobController


def float_x1000(H, persis_info, sim_specs, libE_info):
def float_x1000(H, persis_info, sim_specs, _):
"""
Multiplies worker ID by 1000 and sends back values
Input (X) is ignored in this case
Expand All @@ -24,7 +24,7 @@ def float_x1000(H, persis_info, sim_specs, libE_info):
return output, persis_info


#def input_double(H, persis_info, sim_specs, libE_info):
#def input_double(H, persis_info, sim_specs, _):
#"""
#Not yet implemented
#Multiplies input X values by 2 and sends back values
Expand Down
2 changes: 1 addition & 1 deletion libensemble/sim_funcs/job_control_hworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def polling_loop(jobctl, job, timeout_sec=6.0, delay=1.0):
return job, calc_status


def job_control_hworld(H, persis_info, sim_specs, libE_info):
def job_control_hworld(H, persis_info, sim_specs, _):
""" Test of launching and polling job and exiting on job finish"""
jobctl = JobController.controller
cores = sim_specs['cores']
Expand Down
6 changes: 2 additions & 4 deletions libensemble/sim_funcs/six_hump_camel.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ def six_hump_camel_with_different_ranks_and_nodes(H, persis_info, sim_specs, lib
return O, persis_info


def six_hump_camel(H, persis_info, sim_specs, libE_info):
def six_hump_camel(H, persis_info, sim_specs, _):
"""
Evaluates the six_hump_camel_func and possible six_hump_camel_grad
"""
del libE_info # Ignored parameter

batch = len(H['x'])
O = np.zeros(batch,dtype=sim_specs['out'])
Expand All @@ -66,11 +65,10 @@ def six_hump_camel(H, persis_info, sim_specs, libE_info):

return O, persis_info

def six_hump_camel_simple(x, persis_info, sim_specs, libE_info):
def six_hump_camel_simple(x, persis_info, sim_specs, _):
"""
Evaluates the six_hump_camel_func and possible six_hump_camel_grad
"""
del libE_info # Ignored parameter

O = np.zeros(1,dtype=sim_specs['out'])

Expand Down

0 comments on commit 8b6a81e

Please sign in to comment.