Skip to content

Commit 8ca0f71

Browse files
committed
Add gen on manager option to forces tutorial
1 parent 8187461 commit 8ca0f71

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

docs/tutorials/executor_forces_tutorial.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,42 @@ These may require additional browsing of the documentation to complete.
334334
335335
...
336336
337+
Running the generator on the manager
338+
------------------------------------
339+
340+
As of version 1.3.0, the generator can be run on a thread on the manager,
341+
using the :ref:`libE_specs<datastruct-libe-specs>` option **gen_on_manager**.
342+
343+
Change the libE_specs as follows.
344+
345+
.. code-block:: python
346+
:linenos:
347+
:lineno-start: 28
348+
349+
nsim_workers = ensemble.nworkers
350+
351+
# Persistent gen does not need resources
352+
ensemble.libE_specs = LibeSpecs(
353+
gen_on_manager=True, sim_dirs_make=True, ensemble_dir_path="./test_executor_forces_tutorial"
354+
)
355+
356+
When running set ``nworkers`` to the number of workers desired for running simulations.
357+
E.g., Instead of:
358+
359+
.. code-block:: bash
360+
361+
python run_libe_forces.py --comms local --nworkers 5
362+
363+
use:
364+
365+
.. code-block:: bash
366+
367+
python run_libe_forces.py --comms local --nworkers 4
368+
369+
Note that as the generator random number seed will be zero instead of one, the checksum will change.
370+
371+
For more information see :ref:`Running generator on the manager<gen-on-manager>`.
372+
337373
.. _examples/tutorials/forces_with_executor: https://github.com/Libensemble/libensemble/tree/develop/examples/tutorials/forces_with_executor
338374
.. _forces_app: https://github.com/Libensemble/libensemble/tree/main/libensemble/tests/scaling_tests/forces/forces_app
339375
.. _forces_simple: https://github.com/Libensemble/libensemble/tree/main/libensemble/tests/scaling_tests/forces/forces_simple

0 commit comments

Comments
 (0)