/[gentoo-x86]/sys-cluster/openmpi/openmpi-1.6-r1.ebuild
Gentoo

Contents of /sys-cluster/openmpi/openmpi-1.6-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Mon Jun 25 18:28:11 2012 UTC (2 years, 5 months ago) by jsbronder
Branch: MAIN
Changes since 1.1: +1 -3 lines
Drop blockers (sys-cluster/mpich and sys-cluster/lam-mpi) that are no longer in the tree.

(Portage version: 2.1.10.57/cvs/Linux x86_64)

1 xarthisius 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.6-r1.ebuild,v 1.1 2012/06/10 06:38:46 xarthisius Exp $
4 xarthisius 1.1
5     EAPI=4
6     inherit eutils fortran-2 multilib flag-o-matic toolchain-funcs versionator
7    
8     MY_P=${P/-mpi}
9     S=${WORKDIR}/${MY_P}
10    
11     IUSE_OPENMPI_FABRICS="
12     openmpi_fabrics_dapl
13     openmpi_fabrics_ofed
14     openmpi_fabrics_knem
15     openmpi_fabrics_open-mx
16     openmpi_fabrics_psm
17     openmpi_fabrics_sctp"
18    
19     IUSE_OPENMPI_RM="
20     openmpi_rm_pbs
21     openmpi_rm_slurm"
22    
23     IUSE_OPENMPI_OFED_FEATURES="
24     openmpi_ofed_features_control-hdr-padding
25     openmpi_ofed_features_connectx-xrc
26     openmpi_ofed_features_rdmacm
27     openmpi_ofed_features_dynamic-sl
28     openmpi_ofed_features_failover
29     "
30    
31     DESCRIPTION="A high-performance message passing library (MPI)"
32     HOMEPAGE="http://www.open-mpi.org"
33     SRC_URI="http://www.open-mpi.org/software/ompi/v$(get_version_component_range 1-2)/downloads/${MY_P}.tar.bz2"
34     LICENSE="BSD"
35     SLOT="0"
36     KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux"
37     IUSE="+cxx elibc_FreeBSD fortran heterogeneous ipv6 mpi-threads romio threads vt
38     ${IUSE_OPENMPI_FABRICS} ${IUSE_OPENMPI_RM} ${IUSE_OPENMPI_OFED_FEATURES}"
39    
40     REQUIRED_USE="openmpi_rm_slurm? ( !openmpi_rm_pbs )
41     openmpi_rm_pbs? ( !openmpi_rm_slurm )
42     openmpi_fabrics_psm? ( openmpi_fabrics_ofed )
43     openmpi_ofed_features_control-hdr-padding? ( openmpi_fabrics_ofed )
44     openmpi_ofed_features_connectx-xrc? ( openmpi_fabrics_ofed )
45     openmpi_ofed_features_rdmacm? ( openmpi_fabrics_ofed )
46     openmpi_ofed_features_dynamic-sl? ( openmpi_fabrics_ofed )
47     openmpi_ofed_features_failover? ( openmpi_fabrics_ofed )"
48    
49     RDEPEND="
50     !sys-cluster/mpich2
51     !sys-cluster/mpiexec
52     >=sys-apps/hwloc-1.3
53     elibc_FreeBSD? ( dev-libs/libexecinfo )
54     openmpi_fabrics_dapl? ( sys-infiniband/dapl )
55     openmpi_fabrics_ofed? ( sys-infiniband/ofed )
56     openmpi_fabrics_knem? ( sys-cluster/knem )
57     openmpi_fabrics_open-mx? ( sys-cluster/open-mx )
58     openmpi_fabrics_psm? ( sys-infiniband/infinipath-psm )
59     openmpi_fabrics_sctp? ( net-misc/lksctp-tools )
60     openmpi_rm_pbs? ( sys-cluster/torque )
61     openmpi_rm_slurm? ( sys-cluster/slurm )
62     openmpi_ofed_features_rdmacm? ( sys-infiniband/librdmacm )
63     fortran? ( virtual/fortran )
64     vt? (
65     !dev-libs/libotf
66     !app-text/lcdf-typetools
67     )
68     "
69     DEPEND="${RDEPEND}"
70    
71     pkg_setup() {
72     use fortran && fortran-2_pkg_setup
73     if use mpi-threads; then
74     echo
75     ewarn "WARNING: use of MPI_THREAD_MULTIPLE is still disabled by"
76     ewarn "default and officially unsupported by upstream."
77     ewarn "You may stop now and set USE=-mpi-threads"
78     echo
79     fi
80    
81     echo
82     elog "OpenMPI has an overwhelming count of configuration options."
83     elog "Don't forget the EXTRA_ECONF environment variable can let you"
84     elog "specify configure options if you find them necessary."
85     echo
86     }
87    
88     src_prepare() {
89     epatch "${FILESDIR}"/${P}-hostfile.patch
90     # Necessary for scalibility, see
91     # http://www.open-mpi.org/community/lists/users/2008/09/6514.php
92     if use threads; then
93     echo 'oob_tcp_listen_mode = listen_thread' \
94     >> opal/etc/openmpi-mca-params.conf
95     fi
96     }
97    
98     src_configure() {
99     local myconf=(
100     --sysconfdir="${EPREFIX}/etc/${PN}"
101     --enable-pretty-print-stacktrace
102     --enable-orterun-prefix-by-default
103     --with-hwloc="${EPREFIX}/usr"
104     )
105    
106     if use mpi-threads; then
107     myconf+=(
108     --enable-mpi-thread-multiple
109     --enable-opal-multi-threads
110     )
111     fi
112    
113     if use fortran; then
114     if [[ $(tc-getFC) =~ g77 ]]; then
115     myconf+=(--disable-mpi-f90)
116     elif [[ $(tc-getFC) =~ if ]]; then
117     # Enabled here as gfortran compile times are huge with this enabled.
118     myconf+=(--with-mpi-f90-size=medium)
119     fi
120     else
121     myconf+=(--disable-mpi-f90 --disable-mpi-f77)
122     fi
123    
124     ! use vt && myconf+=(--enable-contrib-no-build=vt)
125    
126     econf "${myconf[@]}" \
127     $(use_enable cxx mpi-cxx) \
128     $(use_enable romio io-romio) \
129     $(use_enable heterogeneous) \
130     $(use_enable ipv6) \
131     $(use_with openmpi_fabrics_dapl udapl "${EPREFIX}"/usr) \
132     $(use_with openmpi_fabrics_ofed openib "${EPREFIX}"/usr) \
133     $(use_with openmpi_fabrics_knem knem "${EPREFIX}"/usr) \
134     $(use_with openmpi_fabrics_open-mx mx "${EPREFIX}"/usr) \
135     $(use_with openmpi_fabrics_psm psm "${EPREFIX}"/usr) \
136     $(use_enable openmpi_ofed_features_control-hdr-padding openib-control-hdr-padding) \
137     $(use_enable openmpi_ofed_features_connectx-xrc openib-connectx-xrc) \
138     $(use_enable openmpi_ofed_features_rdmacm openib-rdmacm) \
139     $(use_enable openmpi_ofed_features_dynamic-sl openib-dynamic-sl) \
140     $(use_enable openmpi_ofed_features_failover btl-openib-failover) \
141     $(use_with openmpi_fabrics_sctp sctp) \
142     $(use_with openmpi_rm_pbs tm) \
143     $(use_with openmpi_rm_slurm slurm)
144     }
145    
146     src_install () {
147     emake DESTDIR="${D}" install || die "make install failed"
148     # From USE=vt see #359917
149     rm "${ED}"/usr/share/libtool &> /dev/null
150     dodoc README AUTHORS NEWS VERSION || die
151     }
152    
153     src_test() {
154     # Doesn't work with the default src_test as the dry run (-n) fails.
155     emake -j1 check || die "emake check failed"
156     }

  ViewVC Help
Powered by ViewVC 1.1.20