Gentoo Archives: gentoo-commits

From: "罗百科" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-cluster/openmpi/
Date: Sun, 28 Feb 2021 11:27:54
Message-Id: 1614511668.0f6805dd9a20ae4b787b7544da8cb6020ee59da0.patrick@gentoo
1 commit: 0f6805dd9a20ae4b787b7544da8cb6020ee59da0
2 Author: Patrick Lauer <patrick <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 28 11:27:32 2021 +0000
4 Commit: 罗百科 <patrick <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 28 11:27:48 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f6805dd
7
8 sys-cluster/openmpi: Bump
9
10 Also fix dependencies to allow rdma-core instead of sys-fabric/*
11
12 Package-Manager: Portage-3.0.16, Repoman-3.0.2
13 Signed-off-by: Patrick Lauer <patrick <AT> gentoo.org>
14
15 sys-cluster/openmpi/Manifest | 1 +
16 sys-cluster/openmpi/openmpi-4.0.5.ebuild | 166 +++++++++++++++++++++++++++++++
17 2 files changed, 167 insertions(+)
18
19 diff --git a/sys-cluster/openmpi/Manifest b/sys-cluster/openmpi/Manifest
20 index 97fe13c0bcb..24ffd9a7c69 100644
21 --- a/sys-cluster/openmpi/Manifest
22 +++ b/sys-cluster/openmpi/Manifest
23 @@ -10,3 +10,4 @@ DIST openmpi-3.1.4.tar.bz2 9468371 BLAKE2B 70a93aa170086f43b2eb4f9b7c74673065bd3
24 DIST openmpi-4.0.2.tar.bz2 9819372 BLAKE2B 000faa8ff032f9aa6bf5f0a14fb9a363080cfcdd7c6f8ab90bc9507fd7a473d70502574ee1e75c88acecb06c516a643ef7b9e804fb580be9fc860b7b1fb1cc5d SHA512 634d45d989f1e0b8848bfb4eb4527c7edd76d4fccd77a5f8d85a46a5822f97ba653adf13df857c87ae56a8117b4ae2d45ec24249c6ee41a562446d4112ddb770
25 DIST openmpi-4.0.3.tar.bz2 9856669 BLAKE2B 571e8038cdf125bfb452fbee44d8397f8e724498971409fb25e11cc90ad4d7f9106f4ad093d4722754303808b82c58bf3b39a72a2567192efd1b98422f09160f SHA512 01f773064c575a0fe6ab081c20c5cf07ba1c9eada5ecfe520d14ce2b9fc6d021d0f56a0159fa354fd6c8e2bb7354a272aa8d0063b351f59251deb56474849acc
26 DIST openmpi-4.0.4.tar.bz2 9748444 BLAKE2B 3c3258b7cd71156deec317479ac1ea9766b09447b77174e448a63dab30f75a525c4142159ff58ad0b6208282e36d568e4cd4e7cc1f8b9b34cad8561ce2969a72 SHA512 6c193b4b5cbfd9d48fa5efcef01372c424b51ae5e9727ccf4235e3b14556dfeb010865e41a9473419ccda16559139aa469086b1fff9abfd337e87387fdec1c64
27 +DIST openmpi-4.0.5.tar.bz2 9752045 BLAKE2B 9709dc8c251d4f2be14d0ab498c5d0d0e59f95db98fb16d9e84fe3d30af5a8e2f9636bbceaf7ae4086a3312bcd6299f0e9e1ca609d658930a1f5abe1018311e1 SHA512 b7a1a5ccfc0eaa0f0504ff770b550480f7ae6727fa891e3310d9340a0d844a2ceddf62c2e59efd047ab9416b24c829919bbccd29606ca0e0d7a0569dad800011
28
29 diff --git a/sys-cluster/openmpi/openmpi-4.0.5.ebuild b/sys-cluster/openmpi/openmpi-4.0.5.ebuild
30 new file mode 100644
31 index 00000000000..6f6f5b1017c
32 --- /dev/null
33 +++ b/sys-cluster/openmpi/openmpi-4.0.5.ebuild
34 @@ -0,0 +1,166 @@
35 +# Copyright 1999-2021 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +FORTRAN_NEEDED=fortran
41 +
42 +inherit cuda flag-o-matic fortran-2 java-pkg-opt-2 toolchain-funcs multilib multilib-minimal
43 +
44 +MY_P=${P/-mpi}
45 +S=${WORKDIR}/${MY_P}
46 +
47 +IUSE_OPENMPI_FABRICS="
48 + openmpi_fabrics_ofed
49 + openmpi_fabrics_knem
50 + openmpi_fabrics_psm"
51 +
52 +IUSE_OPENMPI_RM="
53 + openmpi_rm_pbs
54 + openmpi_rm_slurm"
55 +
56 +IUSE_OPENMPI_OFED_FEATURES="
57 + openmpi_ofed_features_control-hdr-padding
58 + openmpi_ofed_features_udcm
59 + openmpi_ofed_features_rdmacm
60 + openmpi_ofed_features_dynamic-sl"
61 +
62 +DESCRIPTION="A high-performance message passing library (MPI)"
63 +HOMEPAGE="https://www.open-mpi.org"
64 +SRC_URI="https://www.open-mpi.org/software/ompi/v$(ver_cut 1-2)/downloads/${MY_P}.tar.bz2"
65 +LICENSE="BSD"
66 +SLOT="0"
67 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux"
68 +IUSE="cma cuda cxx fortran heterogeneous ipv6 java romio
69 + ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}"
70 +
71 +REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs )
72 + openmpi_rm_pbs? ( !openmpi_rm_slurm )
73 + openmpi_fabrics_psm? ( openmpi_fabrics_ofed )
74 + openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed )
75 + openmpi_ofed_features_udcm? ( openmpi_fabrics_ofed )
76 + openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed )
77 + openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed )"
78 +
79 +CDEPEND="
80 + !sys-cluster/mpich
81 + !sys-cluster/mpich2
82 + !sys-cluster/nullmpi
83 + >=dev-libs/libevent-2.0.22:=[${MULTILIB_USEDEP},threads]
84 + dev-libs/libltdl:0[${MULTILIB_USEDEP}]
85 + >=sys-apps/hwloc-2.0.2[${MULTILIB_USEDEP}]
86 + >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
87 + cuda? ( >=dev-util/nvidia-cuda-toolkit-6.5.19-r1:= )
88 + openmpi_fabrics_ofed? ( || ( sys-cluster/rdma-core sys-fabric/ofed:* ) )
89 + openmpi_fabrics_knem? ( sys-cluster/knem )
90 + openmpi_fabrics_psm? ( sys-fabric/infinipath-psm:* )
91 + openmpi_rm_pbs? ( sys-cluster/torque )
92 + openmpi_rm_slurm? ( sys-cluster/slurm )
93 + openmpi_ofed_features_rdmacm? ( || ( sys-cluster/rdma-core sys-fabric/librdmacm:* ) )"
94 +
95 +RDEPEND="${CDEPEND}
96 + java? ( >=virtual/jre-1.6 )"
97 +
98 +DEPEND="${CDEPEND}
99 + java? ( >=virtual/jdk-1.6 )"
100 +
101 +MULTILIB_WRAPPED_HEADERS=(
102 + /usr/include/mpi.h
103 + /usr/include/openmpi/ompi/mpi/java/mpiJava.h
104 +)
105 +
106 +pkg_setup() {
107 + fortran-2_pkg_setup
108 + java-pkg-opt-2_pkg_setup
109 +
110 + elog
111 + elog "OpenMPI has an overwhelming count of configuration options."
112 + elog "Don't forget the EXTRA_ECONF environment variable can let you"
113 + elog "specify configure options if you find them necessary."
114 + elog
115 +}
116 +
117 +src_prepare() {
118 + default
119 +
120 + # Necessary for scalibility, see
121 + # http://www.open-mpi.org/community/lists/users/2008/09/6514.php
122 + echo 'oob_tcp_listen_mode = listen_thread' \
123 + >> opal/etc/openmpi-mca-params.conf || die
124 +}
125 +
126 +multilib_src_configure() {
127 + if use java; then
128 + # We must always build with the right -source and -target
129 + # flags. Passing flags to javac isn't explicitly supported here
130 + # but we can cheat by overriding the configure test for javac.
131 + export ac_cv_path_JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
132 + fi
133 +
134 + ECONF_SOURCE=${S} econf \
135 + --sysconfdir="${EPREFIX}/etc/${PN}" \
136 + --enable-pretty-print-stacktrace \
137 + --enable-orterun-prefix-by-default \
138 + --with-hwloc="${EPREFIX}/usr" \
139 + --with-hwloc-libdir="${EPREFIX}/usr/$(get_libdir)" \
140 + --with-libltdl="${EPREFIX}/usr" \
141 + --with-libevent="${EPREFIX}/usr" \
142 + --with-libevent-libdir="${EPREFIX}/usr/$(get_libdir)" \
143 + --enable-mpi-fortran=$(usex fortran all no) \
144 + $(use_enable cxx mpi-cxx) \
145 + $(use_with cma) \
146 + $(multilib_native_use_with cuda cuda "${EPREFIX}"/opt/cuda) \
147 + $(use_enable romio io-romio) \
148 + $(use_enable heterogeneous) \
149 + $(use_enable ipv6) \
150 + $(multilib_native_use_enable java mpi-java) \
151 + $(multilib_native_use_with openmpi_fabrics_ofed verbs "${EPREFIX}"/usr) \
152 + $(multilib_native_use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) \
153 + $(multilib_native_use_with openmpi_fabrics_psm psm "${EPREFIX}"/usr) \
154 + $(multilib_native_use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) \
155 + $(multilib_native_use_enable openmpi_ofed_features_rdmacm openib-rdmacm) \
156 + $(multilib_native_use_enable openmpi_ofed_features_udcm openib-udcm) \
157 + $(multilib_native_use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \
158 + $(multilib_native_use_with openmpi_rm_pbs tm) \
159 + $(multilib_native_use_with openmpi_rm_slurm slurm)
160 +}
161 +
162 +multilib_src_test() {
163 + # Doesn't work with the default src_test as the dry run (-n) fails.
164 + emake -j1 check
165 +}
166 +
167 +multilib_src_install() {
168 + default
169 +
170 + # fortran header cannot be wrapped (bug #540508), workaround part 1
171 + if multilib_is_native_abi && use fortran; then
172 + mkdir "${T}"/fortran || die
173 + mv "${ED}"/usr/include/mpif* "${T}"/fortran || die
174 + else
175 + # some fortran files get installed unconditionally
176 + rm \
177 + "${ED}"/usr/include/mpif* \
178 + "${ED}"/usr/bin/mpif* \
179 + || die
180 + fi
181 +}
182 +
183 +multilib_src_install_all() {
184 + # fortran header cannot be wrapped (bug #540508), workaround part 2
185 + if use fortran; then
186 + mv "${T}"/fortran/mpif* "${ED}"/usr/include || die
187 + fi
188 +
189 + # Remove la files, no static libs are installed and we have pkg-config
190 + find "${ED}" -name '*.la' -delete || die
191 +
192 + if use java; then
193 + local mpi_jar="${ED}"/usr/$(get_libdir)/mpi.jar
194 + java-pkg_dojar "${mpi_jar}"
195 + # We don't want to install the jar file twice
196 + # so let's clean after ourselves.
197 + rm "${mpi_jar}" || die
198 + fi
199 + einstalldocs
200 +}