Skip to content

Commit

Permalink
start changes on aposmm calling script
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxThevenet committed Apr 6, 2020
1 parent 29e8ad8 commit 1a5e129
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions libensemble/tests/scaling_tests/warpx/run_libE_on_warpX_aposmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
from libensemble import libE_logger
from libensemble.executors.mpi_executor import MPIExecutor

from MaxenceLocalIMac import machine_specs

libE_logger.set_level('INFO')

nworkers, is_master, libE_specs, _ = parse_args()

# Set to full path of warp executable
sim_app = '$HOME/warpx/Bin/main2d.gnu.TPROF.MPI.CUDA.ex'
sim_app = machine_specs['sim_app']

n = 5 # Problem dimension
exctr = MPIExecutor(central_mode=True)
Expand All @@ -33,15 +35,16 @@
# State the objective function, its arguments, output, and necessary parameters (and their sizes)
sim_specs = {'sim_f': run_warpX, # Function whose output is being minimized
'in': ['x'], # Name of input for sim_f
'out': [('f', float), # Name, type of output from sim_f. 'f' stores emittance
('fvec', float, 3)], # 'fvec' stores the three quantities used to calculate emittance
'user': {'nodes': 2,
'ranks_per_node': 6,
'out': [('energy_std', float), # Name, type of output from sim_f.
('energy_avg', float),
('charge', float)],
'user': {'nodes': machine_specs['nodes'],
'ranks_per_node': machine_specs['ranks_per_node'],
'input_filename': 'inputs',
'sim_kill_minutes': 10.0} # Timeout for sim ....
}

gen_out = [('x', float, n), ('x_on_cube', float, n), ('sim_id', int),
gen_out = [('x', float, (n,)), ('x_on_cube', float, (n,)), ('sim_id', int),
('local_min', bool), ('local_pt', bool)]

# State the generating function, its arguments, output, and necessary parameters.
Expand All @@ -52,8 +55,8 @@
'localopt_method': 'LN_BOBYQA',
'xtol_abs': 1e-6,
'ftol_abs': 1e-6,
'lb': np.zeros(n), # Lower bound for the n parameters
'ub': 10*np.ones(n), # Upper bound for the n parameters
'lb': np.ones(n)*-1.e-13, # Lower bound for the n parameters
'ub': np.ones(n)*-3.e-12, # Upper bound for the n parameters
}
}

Expand Down

1 comment on commit 1a5e129

@jmlarson1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Max. So you know. APOSMM looks to optimize a float f. So that should be an output of your sim.

Please sign in to comment.