Skip to content

Commit bfd4695

Browse files
authored
Merge pull request #11746 from hppritcha/slurm_srun_doc_update
docs: update verbiage for using srun
2 parents e1a244a + a524bd9 commit bfd4695

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

docs/launching-apps/slurm.rst

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,41 +61,42 @@ that information directly from Slurm at run time.
6161
Using Slurm's "direct launch" functionality
6262
-------------------------------------------
6363

64-
Assuming that Slurm installed its Open MPI plugin, you can use
64+
Assuming that Slurm was configured with its PMIx plugin, you can use
6565
``srun`` to "direct launch" Open MPI applications without the use of
6666
Open MPI's ``mpirun`` command.
6767

68-
.. note:: Using direct launch can be *slightly* faster when launching
69-
very, very large MPI processes (i.e., thousands or millions of MPI
70-
processes in a single job). But it has significantly fewer
71-
features than Open MPI's ``mpirun``.
68+
First, you must ensure that Slurm was built and installed with PMIx
69+
support. This can determined as shown below:
7270

73-
First, you must ensure that Slurm was built and installed with PMI-2
74-
support.
71+
.. code-block:: sh
72+
73+
shell$ srun --mpi=list
74+
MPI plugin types are...
75+
none
76+
pmi2
77+
pmix
78+
specific pmix plugin versions available: pmix_v4
7579
76-
.. note:: Please ask your friendly neighborhood Slurm developer to
77-
support PMIx. PMIx is the current generation of run-time
78-
support API; PMI-2 is the legacy / antiquated API. Open MPI
79-
*only* supports PMI-2 for Slurm.
80+
The output from ``srun`` may vary somewhat depending on the version of Slurm installed.
81+
If PMIx is not present in the output, then you will not be able to use srun
82+
to launch Open MPI applications.
8083

81-
Next, ensure that Open MPI was configured ``--with-pmi=DIR``, where
82-
``DIR`` is the path to the directory where Slurm's ``pmi2.h`` is
83-
located.
84+
.. note:: PMI-2 is not supported in Open MPI 5.0.0 and later releases.
8485

85-
Open MPI applications can then be launched directly via the ``srun``
86-
command. For example:
86+
Provided the Slurm installation includes the PMIx plugin, Open MPI applications
87+
can then be launched directly via the ``srun`` command. For example:
8788

8889
.. code-block:: sh
8990
90-
shell$ srun -N 4 mpi-hello-world
91+
shell$ srun -N 4 --mpi=pmix mpi-hello-world
9192
9293
Or you can use ``sbatch`` with a script:
9394

9495
.. code-block:: sh
9596
9697
shell$ cat my_script.sh
9798
#!/bin/sh
98-
srun mpi-hello-world
99+
srun --mpi=pmix mpi-hello-world
99100
shell$ sbatch -N 4 my_script.sh
100101
srun: jobid 1235 submitted
101102
shell$

0 commit comments

Comments
 (0)