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