Skip to content

Latest commit

 

History

History
78 lines (56 loc) · 3.09 KB

persis_info.rst

File metadata and controls

78 lines (56 loc) · 3.09 KB

persis_info

Holds persistent information that can be updated during the ensemble.

An initialized persis_info dictionary can be provided to the libE() call or as an attribute of the Ensemble class.

Dictionary keys that have an integer value contain entries that are passed to and from the corresponding workers. These are received in the persis_info argument of user functions, and returned as the optional second return value.

A typical example is a random number generator stream to be used in consecutive calls to a generator (see add_unique_random_streams()<tools.add_unique_random_streams>)

All other entries persist on the manager and can be updated in the calling script between ensemble invocations, or in the allocation function.

Examples:

RNG or reusable structures

../../libensemble/gen_funcs/sampling.py

Incrementing indexes or process counts

../../libensemble/alloc_funcs/fast_alloc.py

Tracking running generators

../../libensemble/alloc_funcs/start_only_persistent.py

Allocation function triggers shutdown

../../libensemble/alloc_funcs/start_only_persistent.py

When there are repeated calls to libE() or ensemble.run(), users may need to modify or reset the contents of persis_info in some cases.

From: support.py

../../libensemble/tests/regression_tests/support.py