@@ -344,6 +344,28 @@ The ensemble system uses Dask for distributed computing:
344344- **Memory **: Automatically managed by Dask scheduler and the underlying cluster job scheduler (e.g., SLURM, PBS)
345345- **Load Balancing **: Dask handles work distribution and load balancing
346346
347+ MPI resources are specified both for the ensemble and for tasks submitted by
348+ components within each running ensemble instance:
349+
350+ - Pass ``cores_per_instance `` to :meth: `ServicesProxy.run_ensemble ` to set each
351+ instance's core budget. The generated platform configuration sets both
352+ ``CORES_PER_NODE `` and ``PROCS_PER_NODE `` to this value (or 1 if omitted), with
353+ ``NODES = 1 ``. Thus, ``num_nodes `` distributes ensemble instances across nodes;
354+ each instance's MPI tasks must fit on a single node.
355+ - For individual MPI tasks, call :meth: `ServicesProxy.launch_task ` with
356+ ``nproc `` set to the required number of MPI processes, then use
357+ :meth: `ServicesProxy.wait_task ` to wait for completion. A component can, for
358+ example, pass ``int(self.NPROC) `` as ``nproc `` to use the ``NPROC `` value from
359+ its section of the ensemble template, or specify the process count directly.
360+ - For a pool of MPI tasks, use :meth: `ServicesProxy.create_task_pool ` and
361+ :meth: `ServicesProxy.add_task `, specifying ``nproc `` for each task, then call
362+ :meth: `ServicesProxy.submit_tasks ` with ``use_dask=False ``. These tasks use the
363+ instance's IPS resource manager and the Open MPI DVM launcher (``prun ``).
364+ Size ``cores_per_instance `` for the largest task if tasks run sequentially,
365+ or for the sum of process counts of tasks intended to run concurrently
366+ (assuming one core per MPI process). For example, two concurrent four-process
367+ tasks need a budget of at least eight cores per instance.
368+
347369Portal
348370------
349371
0 commit comments