alloc_specs

Allocation function specifications to be set in the user calling script and passed to main libE() routine:

alloc_specs: [dict, optional]:

    'alloc_f' [func]:
        Default: give_sim_work_first
    'in' [list of strings]:
        Default: None
    'out' [list of tuples]:
        Default: [('allocated',bool)]
    'user' [dict]:
        Default: {'batch_mode': True}

Note

  • The tuples defined in the ‘out’ list are entered into the master history array.

  • libEnsemble uses the following defaults if the user doesn’t provide their own alloc_specs:

/libensemble/alloc_funcs/defaults.py
from libensemble.alloc_funcs.give_sim_work_first import give_sim_work_first

alloc_specs = {
    'alloc_f': give_sim_work_first,
    'user': {
        'num_active_gens': 1}, }
  • Users can import and adjust these defaults using:

from libensemble.alloc_funcs import defaults
alloc_specs = defaults.alloc_specs

See also

alloc_specs = {
    'alloc_f': give_sim_work_first,  # Allocation function
    'out': [],  # Output fields (included in History)
    'user': {
        'stop_on_NaNs': True,  # Should alloc preempt evals
        'batch_mode': True,  # Wait until all sim evals are done
        'num_active_gens': 1,  # Only allow one active generator
        'stop_partial_fvec_eval': True,  # Should alloc preempt evals
    },
}