aboutsummaryrefslogtreecommitdiff
path: root/Tools/LibEnsemble/run_libensemble_on_warpx.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/LibEnsemble/run_libensemble_on_warpx.py')
-rw-r--r--Tools/LibEnsemble/run_libensemble_on_warpx.py23
1 files changed, 11 insertions, 12 deletions
diff --git a/Tools/LibEnsemble/run_libensemble_on_warpx.py b/Tools/LibEnsemble/run_libensemble_on_warpx.py
index d3f3deec0..dec8dfd54 100644
--- a/Tools/LibEnsemble/run_libensemble_on_warpx.py
+++ b/Tools/LibEnsemble/run_libensemble_on_warpx.py
@@ -20,32 +20,31 @@ generator_type = 'aposmm'
machine = 'local'
import sys
-import numpy as np
-from warpx_simf import run_warpx # Sim function from current directory
# Import libEnsemble modules
from libensemble.libE import libE
+import numpy as np
+from warpx_simf import run_warpx # Sim function from current directory
+
if generator_type == 'random':
- from libensemble.gen_funcs.sampling \
- import uniform_random_sample as gen_f
- from libensemble.alloc_funcs.give_sim_work_first\
- import give_sim_work_first as alloc_f
+ from libensemble.alloc_funcs.give_sim_work_first import \
+ give_sim_work_first as alloc_f
+ from libensemble.gen_funcs.sampling import uniform_random_sample as gen_f
elif generator_type == 'aposmm':
import libensemble.gen_funcs
libensemble.gen_funcs.rc.aposmm_optimizers = 'nlopt'
+ from libensemble.alloc_funcs.persistent_aposmm_alloc import \
+ persistent_aposmm_alloc as alloc_f
from libensemble.gen_funcs.persistent_aposmm import aposmm as gen_f
- from libensemble.alloc_funcs.persistent_aposmm_alloc \
- import persistent_aposmm_alloc as alloc_f
else:
print("you shouldn' hit that")
sys.exit()
-from libensemble.tools import parse_args, save_libE_output, \
- add_unique_random_streams
+import all_machine_specs
from libensemble import libE_logger
from libensemble.executors.mpi_executor import MPIExecutor
-
-import all_machine_specs
+from libensemble.tools import (add_unique_random_streams, parse_args,
+ save_libE_output)
# Import machine-specific run parameters
if machine == 'local':