| 1 |
jsbronder |
1.1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
|
|
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
jsbronder |
1.2 |
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openmpi/openmpi-1.4.4.ebuild,v 1.1 2012/02/03 20:44:18 jsbronder Exp $
|
| 4 |
jsbronder |
1.1 |
|
| 5 |
|
|
EAPI=3
|
| 6 |
|
|
inherit eutils fortran-2 multilib flag-o-matic toolchain-funcs
|
| 7 |
|
|
|
| 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 |
|
|
KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
|
| 18 |
|
|
IUSE="+cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads pbs romio threads vt"
|
| 19 |
|
|
RDEPEND="
|
| 20 |
|
|
fortran? ( virtual/fortran )
|
| 21 |
|
|
pbs? ( sys-cluster/torque )
|
| 22 |
|
|
vt? (
|
| 23 |
|
|
!dev-libs/libotf
|
| 24 |
|
|
!app-text/lcdf-typetools
|
| 25 |
|
|
)
|
| 26 |
|
|
elibc_FreeBSD? ( dev-libs/libexecinfo )
|
| 27 |
|
|
!sys-cluster/mpich2
|
| 28 |
|
|
!sys-cluster/mpiexec"
|
| 29 |
|
|
DEPEND="${RDEPEND}"
|
| 30 |
|
|
|
| 31 |
|
|
pkg_setup() {
|
| 32 |
|
|
use fortran && fortran-2_pkg_setup
|
| 33 |
|
|
if use mpi-threads; then
|
| 34 |
|
|
echo
|
| 35 |
|
|
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 |
|
|
echo
|
| 39 |
|
|
fi
|
| 40 |
|
|
|
| 41 |
|
|
echo
|
| 42 |
|
|
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 |
|
|
echo
|
| 46 |
|
|
}
|
| 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 |
|
|
local myconf=(
|
| 59 |
|
|
--sysconfdir="${EPREFIX}/etc/${PN}"
|
| 60 |
|
|
--enable-pretty-print-stacktrace
|
| 61 |
|
|
--enable-orterun-prefix-by-default
|
| 62 |
|
|
--without-slurm)
|
| 63 |
|
|
|
| 64 |
|
|
if use mpi-threads; then
|
| 65 |
|
|
myconf+=(--enable-mpi-threads
|
| 66 |
|
|
--enable-progress-threads)
|
| 67 |
|
|
fi
|
| 68 |
|
|
|
| 69 |
|
|
if use fortran; then
|
| 70 |
|
|
if [[ $(tc-getFC) =~ g77 ]]; then
|
| 71 |
|
|
myconf+=(--disable-mpi-f90)
|
| 72 |
|
|
elif [[ $(tc-getFC) =~ if ]]; then
|
| 73 |
|
|
# Enabled here as gfortran compile times are huge with this enabled.
|
| 74 |
|
|
myconf+=(--with-mpi-f90-size=medium)
|
| 75 |
|
|
fi
|
| 76 |
|
|
else
|
| 77 |
|
|
myconf+=(--disable-mpi-f90 --disable-mpi-f77)
|
| 78 |
|
|
fi
|
| 79 |
|
|
|
| 80 |
|
|
! use vt && myconf+=(--enable-contrib-no-build=vt)
|
| 81 |
|
|
|
| 82 |
|
|
econf "${myconf[@]}" \
|
| 83 |
|
|
$(use_enable cxx mpi-cxx) \
|
| 84 |
|
|
$(use_enable romio io-romio) \
|
| 85 |
|
|
$(use_enable heterogeneous) \
|
| 86 |
|
|
$(use_with pbs tm) \
|
| 87 |
|
|
$(use_enable ipv6)
|
| 88 |
|
|
}
|
| 89 |
|
|
|
| 90 |
|
|
src_install () {
|
| 91 |
|
|
emake DESTDIR="${D}" install || die "make install failed"
|
| 92 |
|
|
dodoc README AUTHORS NEWS VERSION || die
|
| 93 |
|
|
}
|
| 94 |
|
|
|
| 95 |
|
|
src_test() {
|
| 96 |
|
|
# Doesn't work with the default src_test as the dry run (-n) fails.
|
| 97 |
|
|
emake -j1 check || die "emake check failed"
|
| 98 |
|
|
}
|