5.11. Advice for packagers
5.11.1. Components (“plugins”): DSO or no?
PMIx contains a large number of components (sometimes called “plugins”) to effect different types of functionality in PMIx. For example, some components provide support for networks and may link against specialized libraries to do so.
PMIx v5.0.3rc1 has two configure
-time defaults regarding the
treatment of components that may be of interest to packagers:
PMIx’s libraries default to building as shared libraries (vs. static libraries). For example, on Linux, PMIx will default to building
libpmix.so
(vs.libpmix.a
).Note
See the descriptions of
--disable-shared
and--enable-static
in this section for more details about how to change this default.Also be sure to see this warning about building static apps.
PMIx will default to including its components in its libraries (as opposed to being compiled as dynamic shared objects, or DSOs). For example,
libpmix.so
on Linux systems will contain the OPA PNET component, instead of the OPA PNET being compiled intomca_pnet_opa.so
and dynamically opened at run time viadlopen(3)
.Note
See the descriptions of
--enable-mca-dso
and--enable-mca-static
in this section for more details about how to change this defaults.
A side effect of these two defaults is that all the components
included in the PMIx libraries will bring their dependencies with
them. For example (on Linux), if the XYZ PNET component
requires libXYZ.so
, then these defaults mean that
libpmix.so
will depend on libXYZ.so
. This dependency will
likely be telegraphed into the PMIx binary package that includes
libpmix.so
.
Conversely, if the XYZ PNET component was built as a DSO, then —
assuming no other parts of PMIx require libXYZ.so
—
libpmix.so
would not be dependent on libXYZ.so
. Instead, the
mca_pnet_xyz.so
DSO would have the dependency upon libXYZ.so
.
Packagers can use these facts to potentially create multiple binary
PMIx packages, each with different dependencies by, for example,
using --enable-mca-dso
to selectively build some components as
DSOs and leave the others included in their respective PMIx
libraries.
# Build all the "pnet" components as DSOs (all other
# components will default to being built in their respective
# libraries)
shell$ ./configure --enable-mca-dso=pnet ...
This allows packaging $libdir
as part of the “main” PMIx
binary package, but then packaging
$libdir/pmix/mca_pnet_*.so
as sub-packages. These
sub-packages may inherit dependencies on their own.
Users can always install the “main” PMIx
binary package, and can install the additional “pnet” PMIx
binary sub-package if they actually have network hardware
installed (which will cause the installation of additional
dependencies).