File tree Expand file tree Collapse file tree
libensemble/tests/unit_tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import numpy as np
44
55import libensemble .tests .unit_tests .setup as setup
6+ from libensemble .resources .platforms import PerlmutterGPU
67from libensemble .utils .misc import pydanticV1 , specs_dump
78
89
@@ -166,10 +167,30 @@ def test_flakey_workflow():
166167 assert not flag , "should've caught input errors"
167168
168169
170+ def test_ensemble_specs_update_libE_specs ():
171+
172+ from libensemble .ensemble import Ensemble
173+ from libensemble .specs import LibeSpecs
174+
175+ platform_specs = PerlmutterGPU ()
176+
177+ ensemble = Ensemble (
178+ libE_specs = LibeSpecs (comms = "local" , nworkers = 4 ),
179+ )
180+
181+ ensemble .libE_specs = LibeSpecs (
182+ num_resource_sets = ensemble .nworkers - 1 ,
183+ resource_info = {"gpus_on_node" : 4 },
184+ use_workflow_dir = True ,
185+ platform_specs = platform_specs ,
186+ )
187+
188+
169189if __name__ == "__main__" :
170190 test_ensemble_init ()
171191 test_ensemble_parse_args_false ()
172192 test_from_files ()
173193 test_bad_func_loads ()
174194 test_full_workflow ()
175195 test_flakey_workflow ()
196+ test_ensemble_specs_update_libE_specs ()
You can’t perform that action at this time.
0 commit comments