@@ -11,8 +11,8 @@ the available nodes.
1111The :doc: `Forces tutorial <../../tutorials/executor_forces_tutorial >` gives an
1212example with a simple MPI application.
1313
14- Central Mode
15- ------------
14+ Centralized Running
15+ -------------------
1616
1717The default communications scheme places the manager and workers on the first node.
1818The :doc: `MPI Executor<../executor/mpi_executor> ` can then be invoked on each
@@ -24,50 +24,76 @@ The generator will run on a worker by default, but if running a single generator
2424the :ref: `libE_specs<datastruct-libe-specs> ` option **gen_on_manager ** is recommended,
2525which runs the generator on the manager (using a thread) as below.
2626
27- .. image :: ../images/centralized_gen_on_manager.png
28- :alt: centralized
29- :scale: 55
30- :align: center
27+ .. list-table ::
28+ :widths: 60 40
3129
32- .. code-block :: python
30+ * - .. image:: ../images/centralized_gen_on_manager.png
31+ :alt: centralized
32+ :scale: 55
3333
34- ensemble.libE_specs = LibeSpecs(
35- gen_on_manager = True ,
36- )
34+ - In calling script:
35+
36+ .. code-block :: python
37+ :linenos:
38+
39+ ensemble.libE_specs = LibeSpecs(
40+ gen_on_manager = True ,
41+ )
42+
43+ A SLURM batch script may include:
3744
38- When using **gen_on_manager **, set ``nworkers `` to the number of workers desired for running
39- simulations. A batch script may include:
4045
41- .. code-block :: bash
46+ .. code-block :: bash
4247
43- # SBATCH --nodes 3
48+ # SBATCH --nodes 3
4449
45- python run_libe_forces.py --nworkers 3
50+ python run_libe_forces.py --nworkers 3
51+
52+
53+ When using **gen_on_manager **, set ``nworkers `` to the number of workers desired for running simulations.
54+
55+ Dedicated Mode
56+ ^^^^^^^^^^^^^^
4657
4758If the :ref: `libE_specs<datastruct-libe-specs> ` option **dedicated_mode ** is set to
4859True, the MPI executor will not launch applications on nodes where libEnsemble Python
4960processes (manager and workers) are running. Worker’s launch applications onto the
5061remaining nodes in the allocation.
5162
52- .. image :: ../images/centralized_dedicated.png
53- :alt: centralized
54- :scale: 30
55- :align: center
5663
57- Note that **gen_on_manager ** is not set in the above example.
64+ .. list-table ::
65+ :widths: 60 40
5866
59- .. code-block :: python
67+ * - .. image:: ../images/centralized_dedicated.png
68+ :alt: centralized dedicated mode
69+ :scale: 30
70+
71+ - In calling script:
72+
73+ .. code-block :: python
74+ :linenos:
75+
76+ ensemble.libE_specs = LibeSpecs(
77+ dedicated_mode = True ,
78+ )
79+
80+ A SLURM batch script may include:
6081
61- ensemble.libE_specs = LibeSpecs(
62- dedicated_mode = True ,
63- )
6482
83+ .. code-block :: bash
84+
85+ # SBATCH --nodes 3
86+
87+ python run_libe_forces.py --nworkers 3
88+
89+
90+ Note that **gen_on_manager ** is not set in the above example.
6591
6692Note that while these diagrams show one application being run per node, configurations
6793with **multiple nodes per worker ** or **multiple workers per node ** are both common use cases.
6894
69- Distributed Mode
70- ----------------
95+ Distributed Running
96+ --------------------
7197
7298In the **distributed ** approach, libEnsemble can be run using the **mpi4py **
7399communicator, with workers distributed across nodes to be co-located with their tasks.
0 commit comments