Skip to content

Commit 6b2d19f

Browse files
edgargabrielqkoziol
andcommitted
docs: add info on connect/accept
add verbage on how to connect multiple MPI jobs using Connect/Accept and use Publish/Lookup functionality in ompi v5.0 onward Co-authored-by: Quincey Koziol <[email protected]> Signed-off-by: Edgar Gabriel <[email protected]>
1 parent 64a9bed commit 6b2d19f

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

docs/launching-apps/unusual.rst

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,51 @@ where the file ``my_appfile`` contains the following:
114114
115115
This will result in the same behavior as running ``a.out`` and ``b.out``
116116
from the command line.
117+
118+
Connecting independent MPI applications
119+
---------------------------------------
120+
121+
In certain environments, Open MPI supports connecting multiple,
122+
independent MPI applications using mechanism defined in the MPI
123+
specification such as ``MPI_Comm_connect() / MPI_Comm_accept()`` and
124+
publishing connection information using ``MPI_Publish_name() /
125+
MPI_Lookup_name()``. These mechanisms require a centralized service
126+
to exchange contact information across multiple jobs.
127+
128+
Beginning with Open MPI v5.0.0 this can be achieved by starting an
129+
instance of the prte server with the ``report-uri`` option to
130+
display the contact information of the prte server. This information
131+
can then be used for launching subsequent MPI applications.
132+
133+
The following commands show an example for launching two MPI jobs
134+
that will connect to each other at runtime using the MPI-2 based
135+
functionality.
136+
137+
138+
Step 1: start the standalone prte server
139+
140+
.. code-block::
141+
142+
user@myhost:~/ompi-install/bin$ ./prte --report-uri <filename>
143+
DVM ready
144+
145+
Step 2: Launch the first MPI application providing the uri of the
146+
prte server
147+
148+
.. code-block::
149+
150+
user@myhost:~/app1-dir$ mpiexec --dvm file:<filename> -np 4 ./mpi_app_1
151+
152+
Step 3: Launch the second MPI application providing the uri of the
153+
prte server again
154+
155+
.. code-block::
156+
157+
user@myhost:~/app2-dir$ mpiexec --dvm file:<filename> -np 4 ./mpi_app_2
158+
159+
160+
In case the prte server has been started as a system server using the
161+
``--system-server`` argument (e.g. the nodes used by the MPI
162+
applications are not shared by multiple jobs), the sequence can be
163+
simplified by using ``mpiexec --dvm system`` or ``mpiexec --dvm
164+
system-first`` instead of the uri of the prte server.

0 commit comments

Comments
 (0)