Skip to content

Commit cc4f992

Browse files
authored
Merge pull request #12040 from jsquyres/pr/docs-moar-random-updates
More updates for the docs
2 parents 329f558 + 340f8f0 commit cc4f992

File tree

8 files changed

+206
-55
lines changed

8 files changed

+206
-55
lines changed

docs/installing-open-mpi/configure-cli-options/installation.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ be used with ``configure``:
174174
These two options, along with ``--enable-mca-no-build``, govern the
175175
behavior of how Open MPI's frameworks and components are built.
176176

177+
.. tip::
178+
179+
:ref:`See this section <label-install-packagers-dso-or-not>` for
180+
advice to packagers about these CLI options.
181+
177182
The ``--enable-mca-dso`` option specifies which frameworks and/or
178183
components are built as Dynamic Shared Objects (DSOs).
179184
Specifically, DSOs are built as "plugins" outside of the core Open
@@ -222,7 +227,7 @@ be used with ``configure``:
222227
.. note:: As of Open MPI |ompi_ver|, ``configure``'s global default
223228
is to build all components as static (i.e., part of the
224229
Open MPI core libraries, not as DSOs). Prior to Open MPI
225-
5.0.0, the global default behavior was to build
230+
v5.0.0, the global default behavior was to build
226231
most components as DSOs.
227232

228233
.. important:: If the ``--disable-dlopen`` option is specified, then
@@ -267,11 +272,6 @@ be used with ``configure``:
267272

268273
shell$ ./configure --enable-mca-dso=btl-tcp --enable-mca-static=btl-tcp
269274

270-
.. tip::
271-
272-
:ref:`See this section <label-install-packagers-dso-or-not>` for
273-
advice to packagers about this CLI option.
274-
275275
* ``--enable-mca-no-build=LIST``: Comma-separated list of
276276
``<framework>-<component>`` pairs that will not be built. For
277277
example, ``--enable-mca-no-build=threads-qthreads,pml-monitoring`` will

docs/installing-open-mpi/packagers.rst

Lines changed: 179 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,78 @@ running Open MPI's ``configure`` script.
8080

8181
.. _label-install-packagers-dso-or-not:
8282

83-
Components ("plugins"): DSO or no?
84-
----------------------------------
83+
Components ("plugins"): static or DSO?
84+
--------------------------------------
8585

8686
Open MPI contains a large number of components (sometimes called
8787
"plugins") to effect different types of functionality in MPI. For
8888
example, some components effect Open MPI's networking functionality:
8989
they may link against specialized libraries to provide
9090
highly-optimized network access.
9191

92+
Open MPI can build its components as Dynamic Shared Objects (DSOs) or
93+
statically included in core libraries (regardless of whether those
94+
libraries are built as shared or static libraries).
95+
96+
.. note:: As of Open MPI |ompi_ver|, ``configure``'s global default is
97+
to build all components as static (i.e., part of the Open
98+
MPI core libraries, not as DSOs). Prior to Open MPI v5.0.0,
99+
the global default behavior was to build most components as
100+
DSOs.
101+
102+
Why build components as DSOs?
103+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104+
105+
There are advantages to building components as DSOs:
106+
107+
* Open MPI's core libraries |mdash| and therefore MPI applications
108+
|mdash| will have very few dependencies. For example, if you build
109+
Open MPI with support for a specific network stack, the libraries in
110+
that network stack will be dependencies of the DSOs, not Open MPI's
111+
core libraries (or MPI applications).
112+
113+
* Removing Open MPI functionality that you do not want is as simple as
114+
removing a DSO from ``$libdir/open-mpi``.
115+
116+
Why build components as part of Open MPI's core libraries?
117+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118+
119+
The biggest advantage to building the components as part of Open MPI's
120+
core libraries is when running at (very) large scales when Open MPI is
121+
installed on a network filesystem (vs. being installed on a local
122+
filesystem).
123+
124+
For example, consider launching a single MPI process on each of 1,000
125+
nodes. In this scenario, the following is accessed from the network
126+
filesystem:
127+
128+
#. The MPI application
129+
#. The core Open MPI libraries and their dependencies (e.g.,
130+
``libmpi``)
131+
132+
* Depending on your configuration, this is probably on the order of
133+
10-20 library files.
134+
135+
#. All DSO component files and their dependencies
136+
137+
* Depending on your configuration, this can be 200+ component
138+
files.
139+
140+
If all components are physically located in the libraries, then the
141+
third step loads zero DSO component files. When using a networked
142+
filesystem while launching at scale, this can translate to large
143+
performance savings.
144+
145+
.. note:: If not using a networked filesystem, or if not launching at
146+
scale, loading a large number of DSO files may not consume a
147+
noticeable amount of time during MPI process launch. Put
148+
simply: loading DSOs as indvidual files generally only
149+
matters when using a networked filesystem while launching at
150+
scale.
151+
152+
Direct controls for building components as DSOs or not
153+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
154+
92155
Open MPI |ompi_ver| has two ``configure``-time defaults regarding the
93156
treatment of components that may be of interest to packagers:
94157

@@ -135,19 +198,121 @@ using ``--enable-mca-dso`` to selectively build some components as
135198
DSOs and leave the others included in their respective Open MPI
136199
libraries.
137200

201+
:ref:`See the section on building accelerator support
202+
<label-install-packagers-building-accelerator-support-as-dsos>` for a
203+
practical example where this can be useful.
204+
205+
.. _label-install-packagers-gnu-libtool-dependency-flattening:
206+
207+
GNU Libtool dependency flattening
208+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
209+
210+
When compiling Open MPI's components statically as part of Open MPI's
211+
core libraries, `GNU Libtool <https://www.gnu.org/software/libtool/>`_
212+
|mdash| which is used as part of Open MPI's build system |mdash| will
213+
attempt to "flatten" dependencies.
214+
215+
For example, the :ref:`ompi_info(1) <man1-ompi_info>` command links
216+
against the Open MPI core library ``libopen-pal``. This library will
217+
have dependencies on various HPC-class network stack libraries. For
218+
simplicity, the discussion below assumes that Open MPI was built with
219+
support for `Libfabric <https://libfabric.org/>`_ and `UCX
220+
<https://openucx.org/>`_, and therefore ``libopen-pal`` has direct
221+
dependencies on ``libfabric`` and ``libucx``.
222+
223+
In this scenario, GNU Libtool will automatically attempt to "flatten"
224+
these dependencies by linking :ref:`ompi_info(1) <man1-ompi_info>`
225+
directly to ``libfabric`` and ``libucx`` (vs. letting ``libopen-pal``
226+
pull the dependencies in at run time).
227+
228+
* In some environments (e.g., Ubuntu 22.04), the compiler and/or
229+
linker will automatically utilize the linker CLI flag
230+
``-Wl,--as-needed``, which will effectively cause these dependencies
231+
to *not* be flattened: :ref:`ompi_info(1) <man1-ompi_info>` will
232+
*not* have a direct dependencies on either ``libfabric`` or
233+
``libucx``.
234+
235+
* In other environments (e.g., Fedora 38), the compiler and linker
236+
will *not* utilize the ``-Wl,--as-needed`` linker CLI flag. As
237+
such, :ref:`ompi_info(1) <man1-ompi_info>` will show direct
238+
dependencies on ``libfabric`` and ``libucx``.
239+
240+
**Just to be clear:** these flattened dependencies *are not a
241+
problem*. Open MPI will function correctly with or without the
242+
flattened dependencies. There is no performance impact associated
243+
with having |mdash| or not having |mdash| the flattened dependencies.
244+
We mention this situation here in the documentation simply because it
245+
surprised some Open MPI downstream package managers to see that
246+
:ref:`ompi_info(1) <man1-ompi_info>` in Open MPI |ompi_ver| had more
247+
shared library dependencies than it did in prior Open MPI releases.
248+
249+
If packagers want :ref:`ompi_info(1) <man1-ompi_info>` to not have
250+
these flattened dependencies, use either of the following mechanisms:
251+
252+
#. Use ``--enable-mca-dso`` to force all components to be built as
253+
DSOs (this was actually the default behavior before Open MPI v5.0.0).
254+
255+
#. Add ``LDFLAGS=-Wl,--as-needed`` to the ``configure`` command line
256+
when building Open MPI.
257+
258+
.. note:: The Open MPI community specifically chose not to
259+
automatically utilize this linker flag for the following
260+
reasons:
261+
262+
#. Having the flattened dependencies does not cause any
263+
correctness or performance problems.
264+
#. There's multiple mechanisms (see above) for users or
265+
packagers to change this behavior, if desired.
266+
#. Certain environments have chosen to have |mdash| or
267+
not have |mdash| this flattened dependency behavior.
268+
It is not Open MPI's place to override these choices.
269+
#. In general, Open MPI's ``configure`` script only
270+
utilizes compiler and linker flags if they are
271+
*needed*. All other flags should be the user's /
272+
packager's choice.
273+
274+
.. _label-install-packagers-building-accelerator-support-as-dsos:
275+
276+
Building accelerator support as DSOs
277+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
278+
279+
If you are building a package that includes support for one or more
280+
accelerators, it may be desirable to build accelerator-related
281+
components as DSOs (see the :ref:`static or DSO?
282+
<label-install-packagers-dso-or-not>` section for details).
283+
284+
.. admonition:: Rationale
285+
:class: tip
286+
287+
Accelerator hardware is expensive, and may only be present on some
288+
compute nodes in an HPC cluster. Specifically: there may not be
289+
any accelerator hardware on "head" or compile nodes in an HPC
290+
cluster. As such, invoking Open MPI commands on a "head" node with
291+
an MPI that was built with static accelerator support but no
292+
accelerator hardware may fail to launch because of run-time linker
293+
issues (because the accelerator hardware support libraries are
294+
likely not present).
295+
296+
Building Open MPI's accelerator-related components as DSOs allows
297+
Open MPI to *try* opening the accelerator components, but proceed
298+
if those DSOs fail to open due to the lack of support libraries.
299+
300+
Use the ``--enable-mca-dso`` command line parameter to Open MPI's
301+
``configure`` command can allow packagers to build all
302+
accelerator-related components as DSO. For example:
303+
138304
.. code:: sh
139305
140-
# Build all the "accelerator" components as DSOs (all other
306+
# Build all the accelerator-related components as DSOs (all other
141307
# components will default to being built in their respective
142308
# libraries)
143-
shell$ ./configure --enable-mca-dso=accelerator ...
144-
145-
This allows packaging ``$libdir`` as part of the "main" Open MPI
146-
binary package, but then packaging
147-
``$libdir/openmpi/mca_accelerator_*.so`` as sub-packages. These
148-
sub-packages may inherit dependencies on the CUDA and/or ROCM
149-
packages, for example. User can always install the "main" Open MPI
150-
binary package, and can install the additional "accelerator" Open MPI
151-
binary sub-package if they actually have accelerator hardware
152-
installed (which will cause the installation of additional
153-
dependencies).
309+
shell$ ./configure --enable-mca-dso=btl-smcuda,rcache-rgpusm,rcache-gpusm,accelerator
310+
311+
Per the example above, this allows packaging ``$libdir`` as part of
312+
the "main" Open MPI binary package, but then packaging
313+
``$libdir/openmpi/mca_accelerator_*.so`` and the other named
314+
components as sub-packages. These sub-packages may inherit
315+
dependencies on the CUDA and/or ROCM packages, for example. The
316+
"main" package can be installed on all nodes, and the
317+
accelerator-specific subpackage can be installed on only the nodes
318+
with accelerator hardware and support libraries.

docs/man-openmpi/man1/mpisync.1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
.. _mpisync:
1+
.. _man1-mpisync:
22

33

44
mpisync
55
=======
66

77
.. include_body
88
9-
Open MPI timing tools
9+
mpisync |mdash| Open MPI timing tools
1010

1111

1212
SYNTAX

docs/man-openmpi/man1/ompi-wrapper-compiler.1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Open MPI Wrapper Compilers
99

1010
.. include_body
1111
12-
mpicc, mpic++, mpicxx, mpifort, mpijavac -- Open MPI wrapper compilers
12+
mpicc, mpic++, mpicxx, mpifort, mpijavac |mdash| Open MPI wrapper compilers
1313

1414
SYNTAX
1515
------

docs/man-openmpi/man1/ompi_info.1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ompi_info
66

77
.. include_body
88
9-
ompi_info - Display information about the Open MPI installation
9+
ompi_info |mdash| Display information about the Open MPI installation
1010

1111

1212
SYNOPSIS

docs/man-openmpi/man1/opal_wrapper.1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ opal_wrapper
66

77
.. include_body
88
9-
opal_wrapper - Back-end Open MPI wrapper command
9+
opal_wrapper |mdash| Back-end Open MPI wrapper command
1010

1111

1212
DESCRIPTION

docs/news/index.rst

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,6 @@ This file contains the main features as well as overviews of specific
1010
bug fixes (and other actions) for each version of Open MPI since
1111
version 1.0.
1212

13-
.. error:: GP - move elsewhere and refer to software versioning here.
14-
15-
As more fully described in the "Software Version Number" section in
16-
the README file, Open MPI typically releases two separate version
17-
series simultaneously. Since these series have different goals and
18-
are semi-independent of each other, a single NEWS-worthy item may be
19-
introduced into different series at different times. For example,
20-
feature F was introduced in the vA.B series at version vA.B.C, and was
21-
later introduced into the vX.Y series at vX.Y.Z.
22-
23-
The first time feature F is released, the item will be listed in the
24-
vA.B.C section, denoted as:
25-
26-
(** also to appear: X.Y.Z) -- indicating that this item is also
27-
likely to be included in future release
28-
version vX.Y.Z.
29-
30-
When vX.Y.Z is later released, the same NEWS-worthy item will also be
31-
included in the vX.Y.Z section and be denoted as:
32-
33-
(** also appeared: A.B.C) -- indicating that this item was previously
34-
included in release version vA.B.C.
35-
3613
:ref:`search`
3714

3815
.. toctree::

docs/news/news-v5.0.x.rst

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,19 @@ Open MPI version 5.0.0
221221
- The default atomics have been changed to be GCC, with C11 as a
222222
fallback. C11 atomics incurs sequential memory ordering, which
223223
in most cases is not desired.
224+
- The default build mode has changed from building Open MPI's
225+
components as Dynamic Shared Objects (DSOs) to being statically
226+
included in their respective libraries.
227+
228+
.. important:: This has consequences for packagers. Be sure to
229+
read the :ref:`GNU Libtool dependency flattening
230+
<label-install-packagers-gnu-libtool-dependency-flattening>`
231+
subsection.
232+
224233
- Various datatype bugfixes and performance improvements.
225234
- Various pack/unpack bugfixes and performance improvements.
226235
- Various OSHMEM bugfixes and performance improvements.
227-
- Thanks to Jeff Hammond, Pak Lui, Felix Uhl, Naribayashi Akira,
236+
- Thanks to Jeff Hammond, Pak Lui, Felix Uhl, Naribayashi Akira,
228237
Julien Emmanuel, and Yaz Saito for their invaluable contributions.
229238

230239
- Documentation updates and improvements:
@@ -242,9 +251,12 @@ Open MPI version 5.0.0
242251
directory.
243252

244253
- Many, many people from the Open MPI community contributed to the
245-
overall documentation effort |mdash| not only those who are
246-
listed in the Git commit logs |mdash| including (but not limited
247-
to):
254+
overall documentation effort |mdash| not just those who are
255+
listed in the Git commit logs. Indeed, many Open MPI core
256+
developers contributed their time and effort, as did a fairly
257+
large group of non-core developers (e.g., those who participated
258+
just to help the documentation revamp), including (but not
259+
limited to):
248260

249261
- Lachlan Bell
250262
- Simon Byrne
@@ -254,7 +266,6 @@ Open MPI version 5.0.0
254266
- Sophia Fang
255267
- Rick Gleitz
256268
- Colton Kammes
257-
- Quincey Koziol
258269
- Robert Langfield
259270
- Nick Papior
260271
- Luz Paz
@@ -265,5 +276,3 @@ Open MPI version 5.0.0
265276
- Fangcong Yin
266277
- Seth Zegelstein
267278
- Yixin Zhang
268-
- William Zhang
269-

0 commit comments

Comments
 (0)