|
1 | 1 | Building Open MPI |
2 | 2 | ================= |
3 | 3 |
|
| 4 | +General |
| 5 | +------- |
| 6 | + |
4 | 7 | Once you have run ``autogen.pl`` successfully, you can configure and |
5 | 8 | build Open MPI just like end users do with official distribution Open |
6 | 9 | MPI tarballs. |
7 | 10 |
|
8 | 11 | See the :doc:`general "Install Open MPI" documentation for more |
9 | 12 | details. </installing-open-mpi/index>` |
| 13 | + |
| 14 | +Building Against External OpenPMIx / PRRTE |
| 15 | +------------------------------------------ |
| 16 | + |
| 17 | +One thing that developers and/or packagers may need to do is to build |
| 18 | +Open MPI against an external OpenPMIx and/or PRRTE source tree (i.e., |
| 19 | +an OpenPMIx and/or PRRTE installation that was not built from the |
| 20 | +embedded copies inside the Open MPI source tree / Git submodules). |
| 21 | + |
| 22 | +With regards to :doc:`Open MPI's required dependent libraries |
| 23 | +</installing-open-mpi/required-support-libraries>` (Hwloc, Libevent, |
| 24 | +OpenPMIx, and PRRTE), it generally is simplest to build Open MPI in |
| 25 | +one of two ways: |
| 26 | + |
| 27 | +#. Build and use all the **internal** copies of Open MPI's required |
| 28 | + dependent libraries. |
| 29 | + |
| 30 | + * Specifically: use the Hwloc, Libevent, OpenPMIx, and PRRTE source |
| 31 | + trees that are bundled in with Open MPI's source code. |
| 32 | + |
| 33 | +#. Build and use all **external** copies of Open MPI's required |
| 34 | + dependent libraries. |
| 35 | + |
| 36 | + * Specifically: ignore the Hwloc, Libevent, OpenPMIx, and PRRTE source |
| 37 | + trees that are bundled in with Open MPI's source code, and, |
| 38 | + instead, compile and link Open MPI against already-installed |
| 39 | + versions of these libraries. |
| 40 | + |
| 41 | +Other variations are possible, but can get tricky and complicated with |
| 42 | +subtle linker consequences, and are therefore not recommended. |
| 43 | + |
| 44 | +Some facts that are relevant to know when building against an external |
| 45 | +OpenPMIx / PRRTE: |
| 46 | + |
| 47 | +1. Open MPI, OpenPMIx, and PRRTE must all be built against the |
| 48 | + **same** installation of Hwloc and Libevent. Meaning: |
| 49 | + |
| 50 | + * Assumedly the external OpenPMIx and PRRTE were built against |
| 51 | + external Hwloc and Libevent. Open MPI **must** compile and link |
| 52 | + against the **same** Hwloc and Libevent that the external |
| 53 | + OpenPMIx and PRRTE were built against. |
| 54 | + |
| 55 | + .. admonition:: Critical |
| 56 | + :class: Danger |
| 57 | + |
| 58 | + Open MPI, OpenPMIx, and PRRTE must all use the same Hwloc and |
| 59 | + Libevent libraries at run time (e.g., they must all resolve to |
| 60 | + the same run-time loadable libraries at run time). |
| 61 | + |
| 62 | + .. important:: This statement applies regardless of whether |
| 63 | + Open MPI -- and/or the other libraries -- are |
| 64 | + built as static or dynamically-loadable |
| 65 | + libraries. |
| 66 | + |
| 67 | + * Unless you really know what you are doing, this usually means |
| 68 | + building and installing Open MPI against the same installation |
| 69 | + tree(s) of Hwloc and Libevent that OpenPMIx and PRRTE used to |
| 70 | + build themselves. |
| 71 | + |
| 72 | + For example, consider an environment where you install Hwloc, |
| 73 | + Libevent, OpenPMIx, and PRRTE via the operating system's package |
| 74 | + manager. Assuming that the package-manager installs of OpenPMIx |
| 75 | + and PRRTE were built against the package-manager-provider Hwloc |
| 76 | + and Libevent, then Open MPI will *also* need to be built against |
| 77 | + the package-manager-provided Hwloc and Libevent. To build Open |
| 78 | + MPI this way, you may need to install the package manager's |
| 79 | + "developer" Hwloc, Libevent, OpenPMIx, and/or PRRTE packages. |
| 80 | + |
| 81 | +1. Open MPI and PRRTE must be built against the **same** installation |
| 82 | + of OpenPMIx. |
| 83 | + |
| 84 | + .. important:: Similar to how OpenPMIx, PRRTE, and Open MPI, must |
| 85 | + be built against the same Hwloc and Libevent, PRRTE |
| 86 | + and Open MPI must be built against the same |
| 87 | + OpenPMIx. |
0 commit comments