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