3030from libensemble .libE import libE
3131from libensemble .sim_funcs .six_hump_camel import six_hump_camel
3232from libensemble .tests .regression_tests .support import six_hump_camel_minima as minima
33- from libensemble .tools import parse_args
33+ from libensemble .tools import get_rng , parse_args
3434
3535
3636def create_H0 (persis_info , gen_specs , sim_max ):
@@ -42,7 +42,8 @@ def create_H0(persis_info, gen_specs, sim_max):
4242 b = sim_max
4343
4444 H0 = np .zeros (b , dtype = [("x" , float , 2 ), ("sim_id" , int ), ("sim_started" , bool ), ("cancel_requested" , bool )])
45- H0 ["x" ] = persis_info [0 ]["rand_stream" ].uniform (lb , ub , (b , n ))
45+ rng = get_rng (gen_specs , {})
46+ H0 ["x" ] = rng .uniform (lb , ub , (b , n ))
4647 H0 ["sim_id" ] = range (b )
4748 H0 ["sim_started" ] = False
4849 for i in range (b ):
@@ -126,6 +127,7 @@ def create_H0(persis_info, gen_specs, sim_max):
126127 if is_manager :
127128 print ("Testing cancellations with non-persistent gen functions" )
128129
130+ persis_info = {0 : {}}
129131 for testnum in range (1 , 6 ):
130132 alloc_specs = allocs [testnum ]
131133 if is_manager :
@@ -142,7 +144,7 @@ def create_H0(persis_info, gen_specs, sim_max):
142144
143145 # Perform the run - do not overwrite persis_info
144146 H , persis_out , flag = libE (
145- sim_specs , gen_specs , exit_criteria , persis_info , alloc_specs , libE_specs = libE_specs , H0 = H0
147+ sim_specs , gen_specs , exit_criteria , persis_info , alloc_specs = alloc_specs , libE_specs = libE_specs , H0 = H0
146148 )
147149
148150 if is_manager :
0 commit comments