| 1 |
ranger |
1.13 |
# Copyright 1999-2011 Gentoo Foundation |
| 2 |
jsbronder |
1.1 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
jlec |
1.15 |
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openmpi/openmpi-1.4.2.ebuild,v 1.14 2011/01/14 08:06:47 xarthisius Exp $ |
| 4 |
jsbronder |
1.1 |
|
| 5 |
|
|
EAPI=3 |
| 6 |
jlec |
1.15 |
inherit eutils fortran-2 multilib flag-o-matic toolchain-funcs |
| 7 |
jsbronder |
1.1 |
|
| 8 |
|
|
MY_P=${P/-mpi} |
| 9 |
|
|
S=${WORKDIR}/${MY_P} |
| 10 |
|
|
|
| 11 |
|
|
DESCRIPTION="A high-performance message passing library (MPI)" |
| 12 |
|
|
HOMEPAGE="http://www.open-mpi.org" |
| 13 |
|
|
SRC_URI="http://www.open-mpi.org/software/ompi/v1.4/downloads/${MY_P}.tar.bz2" |
| 14 |
|
|
LICENSE="BSD" |
| 15 |
|
|
SLOT="0" |
| 16 |
|
|
RESTRICT="mpi-threads? ( test )" |
| 17 |
xarthisius |
1.14 |
KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd" |
| 18 |
jsbronder |
1.1 |
IUSE="+cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads pbs romio threads vt" |
| 19 |
|
|
RDEPEND="pbs? ( sys-cluster/torque ) |
| 20 |
|
|
vt? ( |
| 21 |
|
|
!dev-libs/libotf |
| 22 |
|
|
!app-text/lcdf-typetools |
| 23 |
|
|
) |
| 24 |
|
|
elibc_FreeBSD? ( dev-libs/libexecinfo ) |
| 25 |
|
|
!sys-cluster/mpich |
| 26 |
|
|
!sys-cluster/lam-mpi |
| 27 |
|
|
!sys-cluster/mpich2 |
| 28 |
|
|
!sys-cluster/mpiexec" |
| 29 |
|
|
DEPEND="${RDEPEND}" |
| 30 |
|
|
|
| 31 |
|
|
pkg_setup() { |
| 32 |
jlec |
1.15 |
fortran-2_pkg_setup |
| 33 |
jsbronder |
1.1 |
if use mpi-threads; then |
| 34 |
xarthisius |
1.6 |
echo |
| 35 |
jsbronder |
1.1 |
ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by" |
| 36 |
|
|
ewarn "default and officially unsupported by upstream." |
| 37 |
|
|
ewarn "You may stop now and set USE=-mpi-threads" |
| 38 |
xarthisius |
1.6 |
echo |
| 39 |
jsbronder |
1.1 |
fi |
| 40 |
|
|
|
| 41 |
xarthisius |
1.6 |
echo |
| 42 |
jsbronder |
1.1 |
elog "OpenMPI has an overwhelming count of configuration options." |
| 43 |
|
|
elog "Don't forget the EXTRA_ECONF environment variable can let you" |
| 44 |
|
|
elog "specify configure options if you find them necessary." |
| 45 |
xarthisius |
1.6 |
echo |
| 46 |
jsbronder |
1.1 |
} |
| 47 |
|
|
|
| 48 |
|
|
src_prepare() { |
| 49 |
|
|
# Necessary for scalibility, see |
| 50 |
|
|
# http://www.open-mpi.org/community/lists/users/2008/09/6514.php |
| 51 |
|
|
if use threads; then |
| 52 |
|
|
echo 'oob_tcp_listen_mode = listen_thread' \ |
| 53 |
|
|
>> opal/etc/openmpi-mca-params.conf |
| 54 |
|
|
fi |
| 55 |
|
|
} |
| 56 |
|
|
|
| 57 |
|
|
src_configure() { |
| 58 |
jlec |
1.10 |
local myconf=( |
| 59 |
jlec |
1.11 |
--sysconfdir="${EPREFIX}/etc/${PN}" |
| 60 |
jsbronder |
1.1 |
--without-xgrid |
| 61 |
|
|
--enable-pretty-print-stacktrace |
| 62 |
|
|
--enable-orterun-prefix-by-default |
| 63 |
jlec |
1.10 |
--without-slurm) |
| 64 |
jsbronder |
1.1 |
|
| 65 |
|
|
if use mpi-threads; then |
| 66 |
jlec |
1.11 |
myconf+=(--enable-mpi-threads |
| 67 |
jlec |
1.10 |
--enable-progress-threads) |
| 68 |
jsbronder |
1.1 |
fi |
| 69 |
|
|
|
| 70 |
|
|
if use fortran; then |
| 71 |
jlec |
1.9 |
if [[ $(tc-getFC) =~ g77 ]]; then |
| 72 |
jlec |
1.11 |
myconf+=(--disable-mpi-f90) |
| 73 |
jlec |
1.9 |
elif [[ $(tc-getFC) =~ if ]]; then |
| 74 |
jsbronder |
1.1 |
# Enabled here as gfortran compile times are huge with this enabled. |
| 75 |
jlec |
1.11 |
myconf+=(--with-mpi-f90-size=medium) |
| 76 |
jsbronder |
1.1 |
fi |
| 77 |
|
|
else |
| 78 |
jlec |
1.11 |
myconf+=(--disable-mpi-f90 --disable-mpi-f77) |
| 79 |
jsbronder |
1.1 |
fi |
| 80 |
|
|
|
| 81 |
jlec |
1.11 |
! use vt && myconf+=(--enable-contrib-no-build=vt) |
| 82 |
jsbronder |
1.1 |
|
| 83 |
jlec |
1.12 |
econf "${myconf[@]}" \ |
| 84 |
jsbronder |
1.1 |
$(use_enable cxx mpi-cxx) \ |
| 85 |
|
|
$(use_enable romio io-romio) \ |
| 86 |
|
|
$(use_enable heterogeneous) \ |
| 87 |
|
|
$(use_with pbs tm) \ |
| 88 |
jlec |
1.10 |
$(use_enable ipv6) |
| 89 |
jsbronder |
1.1 |
} |
| 90 |
|
|
|
| 91 |
|
|
src_install () { |
| 92 |
|
|
emake DESTDIR="${D}" install || die "make install failed" |
| 93 |
jlec |
1.10 |
dodoc README AUTHORS NEWS VERSION || die |
| 94 |
jsbronder |
1.1 |
} |
| 95 |
|
|
|
| 96 |
|
|
src_test() { |
| 97 |
|
|
# Doesn't work with the default src_test as the dry run (-n) fails. |
| 98 |
|
|
cd "${S}" |
| 99 |
|
|
emake -j1 check || die "emake check failed" |
| 100 |
|
|
} |