Gentoo Archives: gentoo-commits

From: "Justin Bronder (jsbronder)" <jsbronder@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-cluster/mpe2: metadata.xml ChangeLog mpe2-1.0.6_p1.ebuild
Date: Tue, 29 Sep 2009 20:33:12
Message-Id: E1MsjNl-0001uS-TQ@stork.gentoo.org
1 jsbronder 09/09/29 20:33:09
2
3 Added: metadata.xml ChangeLog mpe2-1.0.6_p1.ebuild
4 Log:
5 Adding sys-cluster/mpe2 with support for either openmpi or mpich2
6 (Portage version: 2.2_rc40/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sys-cluster/mpe2/metadata.xml
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/mpe2/metadata.xml?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/mpe2/metadata.xml?rev=1.1&content-type=text/plain
13
14 Index: metadata.xml
15 ===================================================================
16 <?xml version="1.0" encoding="UTF-8"?>
17 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
18 <pkgmetadata>
19 <herd>hp-cluster</herd>
20 <maintainer>
21 <email>jsbronder@g.o</email>
22 <name>Justin Bronder</name>
23 </maintainer>
24 </pkgmetadata>
25
26
27
28
29 1.1 sys-cluster/mpe2/ChangeLog
30
31 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/mpe2/ChangeLog?rev=1.1&view=markup
32 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/mpe2/ChangeLog?rev=1.1&content-type=text/plain
33
34 Index: ChangeLog
35 ===================================================================
36 # ChangeLog for sys-cluster/mpe2
37 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
38 # $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpe2/ChangeLog,v 1.1 2009/09/29 20:33:09 jsbronder Exp $
39
40 *mpe2-1.0.6_p1 (29 Sep 2009)
41
42 29 Sep 2009; Justin Bronder <jsbronder@g.o> +mpe2-1.0.6_p1.ebuild,
43 +metadata.xml:
44 Adding sys-cluster/mpe2 with support for either openmpi or mpich2
45
46
47
48
49 1.1 sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild
50
51 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild?rev=1.1&view=markup
52 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild?rev=1.1&content-type=text/plain
53
54 Index: mpe2-1.0.6_p1.ebuild
55 ===================================================================
56 # Copyright 1999-2009 Gentoo Foundation
57 # Distributed under the terms of the GNU General Public License v2
58 # $Header: /var/cvsroot/gentoo-x86/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild,v 1.1 2009/09/29 20:33:09 jsbronder Exp $
59
60 EAPI=2
61 inherit fortran eutils java-utils-2
62
63 MY_P=${P/_/}
64 DESCRIPTION="MPI development tools"
65 HOMEPAGE="http://www-unix.mcs.anl.gov/perfvis/download/index.htm"
66 SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${PN%2}/${MY_P}.tar.gz"
67
68 LICENSE="as-is"
69 SLOT="0"
70 KEYWORDS="~amd64 ~x86"
71 IUSE="minimal fortran threads debug"
72
73 COMMON_DEPEND="!minimal? ( x11-libs/libXtst
74 x11-libs/libXi )
75 || ( sys-cluster/openmpi[fortran?,threads?]
76 sys-cluster/mpich2[fortran?,threads?] )"
77
78 DEPEND="!minimal? ( >=virtual/jdk-1.4 )
79 ${COMMON_DEPEND}"
80
81 RDEPEND="!minimal? ( >=virtual/jre-1.4 )
82 ${COMMON_DEPEND}"
83
84 S="${WORKDIR}"/${MY_P}
85 MPE_IMP=""
86
87 # README:
88 # This ebuild is created to handle building with both mpich2 and openmpi.
89 # However, without empi (in the science overlay), and some further
90 # conversion to use mpi.eclass, we can only handle one implementation
91 # at a time. I still believe it's better to have the ebuild setup
92 # correctly in preperation.
93
94 pkg_setup() {
95 local i
96
97 if has_version sys-cluster/openmpi; then
98 MPE_IMP=openmpi
99 elif has_version sys-cluster/mpich2; then
100 MPE_IMP=mpich2
101 else
102 die "Unknown MPI implementation"
103 fi
104
105 if use fortran ; then
106 FORTRAN="g77 gfortran ifort ifc"
107 fortran_pkg_setup
108 fi
109
110 export JFLAGS="${JFLAGS} $(java-pkg_javac-args)"
111
112 if [[ "${MPE_IMP}" == openmpi ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
113 elog ""
114 elog "Currently src_test fails on collchk with openmpi, hence"
115 elog "testing is disabled by default. If you would like to"
116 elog "force testing, please add MPE_FORCE_OPENMPI_TEST=1"
117 elog "to your environment."
118 elog ""
119 fi
120
121 einfo "Building with support for: sys-cluster/${MPE_IMP}"
122 }
123
124 src_prepare() {
125 # Don't assume path contains ./
126 sed -i 's,\($MPERUN\) $pgm,\1 ./$pgm,' sbin/mpetestexeclog.in
127 }
128
129 src_configure() {
130 local c="--with-mpicc=/usr/bin/mpicc"
131
132 if use fortran; then
133 c="${c} --with-mpif77=/usr/bin/mpif77"
134 export F77=${FORTRANC}
135 else
136 c="${c} --disable-f77"
137 fi
138
139 if use minimal; then
140 c="${c} --enable-slog2=no --disable-rlog --disable-sample"
141 else
142 c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build"
143 fi
144
145 if [[ "${MPE_IMP}" == openmpi ]]; then
146 c="${c} --disable-rlog --disable-sample"
147 fi
148
149 econf ${c} \
150 --sysconfdir=/etc/${PN} \
151 --datadir=/usr/share/${PN} \
152 --with-htmldir=/usr/share/${PN} \
153 --with-docdir=/usr/share/${PN} \
154 --enable-collchk \
155 --enable-wrappers \
156 $(use_enable !minimal graphics) \
157 $(use_enable threads threadlogging) \
158 $(use_enable debug g) \
159 || die
160 }
161
162 src_test() {
163 local rc
164
165 cd "${S}"
166 if [[ "${MPE_IMP}" == mpich2 ]]; then
167 echo "MPD_SECRETWORD=junk" > "${T}"/mpd.conf
168 chmod 600 "${T}"/mpd.conf
169 export MPD_CONF_FILE="${T}/mpd.conf"
170 "${ROOT}"usr/bin/mpd -d --pidfile="${T}"/mpd.pid
171 elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
172 elog
173 elog "Skipping tests for openmpi"
174 elog
175 return 0
176 fi
177
178 emake \
179 CC="${S}"/bin/mpecc \
180 FC="${S}"/bin/mpefc \
181 MPERUN="${ROOT}/usr/bin/mpiexec -n 4" \
182 CLOG2TOSLOG2="${S}/src/slog2sdk/bin/clog2TOslog2" \
183 check;
184 rc=${?}
185 if [[ "${MPE_IMP}" == mpich2 ]]; then
186 "${ROOT}"usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid)
187 fi
188
189 return ${rc}
190 }
191
192 src_install() {
193 emake DESTDIR="${D}" install || die
194 rm -f "${D}"/usr/sbin/mpeuninstall || die
195 }