1 |
commit: f6e611531d183fae2e185d8427ce058c95cbf628 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 4 00:28:08 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 4 01:16:55 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f6e61153 |
7 |
|
8 |
sys-cluster/openmpi: add 4.1.4 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
sys-cluster/openmpi/Manifest | 1 + |
13 |
sys-cluster/openmpi/openmpi-4.1.4.ebuild | 186 +++++++++++++++++++++++++++++++ |
14 |
2 files changed, 187 insertions(+) |
15 |
|
16 |
diff --git a/sys-cluster/openmpi/Manifest b/sys-cluster/openmpi/Manifest |
17 |
index 42c7707e372a..204d9ee2be6f 100644 |
18 |
--- a/sys-cluster/openmpi/Manifest |
19 |
+++ b/sys-cluster/openmpi/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST openmpi-4.1.2.tar.bz2 10084596 BLAKE2B 2e6fc12b4564a302d2c364528d0f6bea8b23f9b1cd6059763b8d5de583d86aae2812c239b1d0bb40c83f3c7682c8e666ce1de3112e95de54848169cb5e2805e8 SHA512 1958f96434cddbe525b4511fcf8d0cf8bf1ff376e024466219bd3a2092900e318f45a4b1e1a8ef6b03e350f46a71777fc7db82a7df711f12bb9758150d209aad |
22 |
+DIST openmpi-4.1.4.tar.bz2 10042839 BLAKE2B b020e3530ae5dde7b144e7c33b1a3f26f622526a4b48a97a0956fc6f49bbf9dfd5be9ebeeaf3bdc5168a307507408ba5dd8e2a537148821e1d476678177dc5d6 SHA512 c70a92c9b16b8c76a871183f9b180d60861186e64140da897d206d53bc06213f31ea93b31734645f580f4bf28dda5605d85dbce2417e4596955384d961bed653 |
23 |
|
24 |
diff --git a/sys-cluster/openmpi/openmpi-4.1.4.ebuild b/sys-cluster/openmpi/openmpi-4.1.4.ebuild |
25 |
new file mode 100644 |
26 |
index 000000000000..35d6f2a025ad |
27 |
--- /dev/null |
28 |
+++ b/sys-cluster/openmpi/openmpi-4.1.4.ebuild |
29 |
@@ -0,0 +1,186 @@ |
30 |
+# Copyright 1999-2022 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=7 |
34 |
+ |
35 |
+FORTRAN_NEEDED=fortran |
36 |
+ |
37 |
+inherit cuda fortran-2 java-pkg-opt-2 multilib-minimal |
38 |
+ |
39 |
+MY_P=${P/-mpi} |
40 |
+S=${WORKDIR}/${MY_P} |
41 |
+ |
42 |
+IUSE_OPENMPI_FABRICS=" |
43 |
+ openmpi_fabrics_ofed |
44 |
+ openmpi_fabrics_knem" |
45 |
+ |
46 |
+IUSE_OPENMPI_RM=" |
47 |
+ openmpi_rm_pbs |
48 |
+ openmpi_rm_slurm" |
49 |
+ |
50 |
+IUSE_OPENMPI_OFED_FEATURES=" |
51 |
+ openmpi_ofed_features_control-hdr-padding |
52 |
+ openmpi_ofed_features_udcm |
53 |
+ openmpi_ofed_features_rdmacm |
54 |
+ openmpi_ofed_features_dynamic-sl" |
55 |
+ |
56 |
+DESCRIPTION="A high-performance message passing library (MPI)" |
57 |
+HOMEPAGE="https://www.open-mpi.org" |
58 |
+SRC_URI="https://www.open-mpi.org/software/ompi/v$(ver_cut 1-2)/downloads/${MY_P}.tar.bz2" |
59 |
+ |
60 |
+LICENSE="BSD" |
61 |
+SLOT="0" |
62 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux" |
63 |
+IUSE="cma cuda cxx fortran ipv6 java libompitrace peruse romio |
64 |
+ ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}" |
65 |
+ |
66 |
+REQUIRED_USE=" |
67 |
+ openmpi_rm_slurm? ( !openmpi_rm_pbs ) |
68 |
+ openmpi_rm_pbs? ( !openmpi_rm_slurm ) |
69 |
+ openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed ) |
70 |
+ openmpi_ofed_features_udcm? ( openmpi_fabrics_ofed ) |
71 |
+ openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed ) |
72 |
+ openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed )" |
73 |
+ |
74 |
+CDEPEND=" |
75 |
+ !sys-cluster/mpich |
76 |
+ !sys-cluster/mpich2 |
77 |
+ !sys-cluster/nullmpi |
78 |
+ >=dev-libs/libevent-2.0.22:=[${MULTILIB_USEDEP},threads] |
79 |
+ dev-libs/libltdl:0[${MULTILIB_USEDEP}] |
80 |
+ >=sys-apps/hwloc-2.0.2:=[${MULTILIB_USEDEP}] |
81 |
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] |
82 |
+ cuda? ( >=dev-util/nvidia-cuda-toolkit-6.5.19-r1:= ) |
83 |
+ openmpi_fabrics_ofed? ( sys-cluster/rdma-core ) |
84 |
+ openmpi_fabrics_knem? ( sys-cluster/knem ) |
85 |
+ openmpi_rm_pbs? ( sys-cluster/torque ) |
86 |
+ openmpi_rm_slurm? ( sys-cluster/slurm ) |
87 |
+ openmpi_ofed_features_rdmacm? ( sys-cluster/rdma-core )" |
88 |
+ |
89 |
+RDEPEND="${CDEPEND} |
90 |
+ java? ( >=virtual/jre-1.8:* )" |
91 |
+ |
92 |
+DEPEND="${CDEPEND} |
93 |
+ java? ( >=virtual/jdk-1.8:* )" |
94 |
+ |
95 |
+MULTILIB_WRAPPED_HEADERS=( |
96 |
+ /usr/include/mpi.h |
97 |
+ /usr/include/openmpi/ompi/mpi/java/mpiJava.h |
98 |
+ /usr/include/openmpi/mpiext/mpiext_cuda_c.h |
99 |
+) |
100 |
+ |
101 |
+pkg_setup() { |
102 |
+ fortran-2_pkg_setup |
103 |
+ java-pkg-opt-2_pkg_setup |
104 |
+ |
105 |
+ elog |
106 |
+ elog "OpenMPI has an overwhelming count of configuration options." |
107 |
+ elog "Don't forget the EXTRA_ECONF environment variable can let you" |
108 |
+ elog "specify configure options if you find them necessary." |
109 |
+ elog |
110 |
+} |
111 |
+ |
112 |
+src_prepare() { |
113 |
+ default |
114 |
+ |
115 |
+ # Avoid test which ends up looking at system mounts |
116 |
+ echo "int main() { return 0; }" > test/util/opal_path_nfs.c || die |
117 |
+ |
118 |
+ # Necessary for scalibility, see |
119 |
+ # http://www.open-mpi.org/community/lists/users/2008/09/6514.php |
120 |
+ echo 'oob_tcp_listen_mode = listen_thread' \ |
121 |
+ >> opal/etc/openmpi-mca-params.conf || die |
122 |
+} |
123 |
+ |
124 |
+multilib_src_configure() { |
125 |
+ if use java; then |
126 |
+ # We must always build with the right -source and -target |
127 |
+ # flags. Passing flags to javac isn't explicitly supported here |
128 |
+ # but we can cheat by overriding the configure test for javac. |
129 |
+ export ac_cv_path_JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)" |
130 |
+ fi |
131 |
+ |
132 |
+ local myconf=( |
133 |
+ # configure takes a looooong time, but upstream currently force |
134 |
+ # constriants on caching: |
135 |
+ # https://github.com/open-mpi/ompi/blob/9eec56222a5c98d13790c9ee74877f1562ac27e8/config/opal_config_subdir.m4#L118 |
136 |
+ # so no --cache-dir for now. |
137 |
+ --enable-mpi-fortran=$(usex fortran all no) |
138 |
+ --enable-orterun-prefix-by-default |
139 |
+ --enable-pretty-print-stacktrace |
140 |
+ |
141 |
+ --sysconfdir="${EPREFIX}/etc/${PN}" |
142 |
+ |
143 |
+ --with-hwloc="${EPREFIX}/usr" |
144 |
+ --with-hwloc-libdir="${EPREFIX}/usr/$(get_libdir)" |
145 |
+ --with-libltdl="${EPREFIX}/usr" |
146 |
+ --with-libevent="${EPREFIX}/usr" |
147 |
+ --with-libevent-libdir="${EPREFIX}/usr/$(get_libdir)" |
148 |
+ |
149 |
+ # Re-enable for 5.0! |
150 |
+ # See https://github.com/open-mpi/ompi/issues/9697#issuecomment-1003746357 |
151 |
+ # and https://bugs.gentoo.org/828123#c14 |
152 |
+ --disable-heterogeneous |
153 |
+ |
154 |
+ $(use_enable cxx mpi-cxx) |
155 |
+ $(use_enable ipv6) |
156 |
+ $(use_enable libompitrace) |
157 |
+ $(use_enable peruse) |
158 |
+ $(use_enable romio io-romio) |
159 |
+ |
160 |
+ $(use_with cma) |
161 |
+ |
162 |
+ $(multilib_native_use_enable java mpi-java) |
163 |
+ $(multilib_native_use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) |
164 |
+ $(multilib_native_use_enable openmpi_ofed_features_rdmacm openib-rdmacm) |
165 |
+ $(multilib_native_use_enable openmpi_ofed_features_udcm openib-udcm) |
166 |
+ $(multilib_native_use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) |
167 |
+ |
168 |
+ $(multilib_native_use_with cuda cuda "${EPREFIX}"/opt/cuda) |
169 |
+ $(multilib_native_use_with openmpi_fabrics_ofed verbs "${EPREFIX}"/usr) |
170 |
+ $(multilib_native_use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) |
171 |
+ $(multilib_native_use_with openmpi_rm_pbs tm) |
172 |
+ $(multilib_native_use_with openmpi_rm_slurm slurm) |
173 |
+ ) |
174 |
+ |
175 |
+ CONFIG_SHELL="${BROOT}"/bin/bash ECONF_SOURCE="${S}" econf "${myconf[@]}" |
176 |
+} |
177 |
+ |
178 |
+multilib_src_compile() { |
179 |
+ emake V=1 |
180 |
+} |
181 |
+ |
182 |
+multilib_src_install() { |
183 |
+ default |
184 |
+ |
185 |
+ # fortran header cannot be wrapped (bug #540508), workaround part 1 |
186 |
+ if multilib_is_native_abi && use fortran; then |
187 |
+ mkdir "${T}"/fortran || die |
188 |
+ mv "${ED}"/usr/include/mpif* "${T}"/fortran || die |
189 |
+ else |
190 |
+ # some fortran files get installed unconditionally |
191 |
+ rm \ |
192 |
+ "${ED}"/usr/include/mpif* \ |
193 |
+ "${ED}"/usr/bin/mpif* \ |
194 |
+ || die |
195 |
+ fi |
196 |
+} |
197 |
+ |
198 |
+multilib_src_install_all() { |
199 |
+ # fortran header cannot be wrapped (bug #540508), workaround part 2 |
200 |
+ if use fortran; then |
201 |
+ mv "${T}"/fortran/mpif* "${ED}"/usr/include || die |
202 |
+ fi |
203 |
+ |
204 |
+ # Remove la files, no static libs are installed and we have pkg-config |
205 |
+ find "${ED}" -name '*.la' -delete || die |
206 |
+ |
207 |
+ if use java; then |
208 |
+ local mpi_jar="${ED}"/usr/$(get_libdir)/mpi.jar |
209 |
+ java-pkg_dojar "${mpi_jar}" |
210 |
+ # We don't want to install the jar file twice |
211 |
+ # so let's clean after ourselves. |
212 |
+ rm "${mpi_jar}" || die |
213 |
+ fi |
214 |
+ einstalldocs |
215 |
+} |