Gentoo Archives: gentoo-commits

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