aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsbronder <jsbronder@32389bae-6d03-0410-99cf-db05cde120eb>2008-11-05 02:07:43 +0000
committerjsbronder <jsbronder@32389bae-6d03-0410-99cf-db05cde120eb>2008-11-05 02:07:43 +0000
commit6e627a2fcd4b94c16df688de42b8363911adb5fa (patch)
tree78c3ecc38dca38e6ecca4c664f4a73657680e094 /sys-cluster/mpe2
parentAdd empi-capable mpich2 (diff)
downloadsci-6e627a2fcd4b94c16df688de42b8363911adb5fa.tar.gz
sci-6e627a2fcd4b94c16df688de42b8363911adb5fa.tar.bz2
sci-6e627a2fcd4b94c16df688de42b8363911adb5fa.zip
Add empi-capable mpe2, tests pass with mpich2, some issues with openmpi
git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@1332 32389bae-6d03-0410-99cf-db05cde120eb
Diffstat (limited to 'sys-cluster/mpe2')
-rw-r--r--sys-cluster/mpe2/Manifest2
-rw-r--r--sys-cluster/mpe2/metadata.xml10
-rw-r--r--sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild151
3 files changed, 163 insertions, 0 deletions
diff --git a/sys-cluster/mpe2/Manifest b/sys-cluster/mpe2/Manifest
new file mode 100644
index 000000000..f55138df4
--- /dev/null
+++ b/sys-cluster/mpe2/Manifest
@@ -0,0 +1,2 @@
+DIST mpe2-1.0.6p1.tar.gz 9313216 RMD160 1c52f379c3fff4bac5c68505ca657584d8092f7f SHA1 bc810c7a1f3ef5b9cf2563278053afadbc2029f2 SHA256 23cfef2b8a0a27408b5bdadeb216ba3adb3b02bf40d0fa6fc0a110cefd8c5863
+EBUILD mpe2-1.0.6_p1.ebuild 3549 RMD160 cefa6f9b5158bc3066971a88d782aa3aa8c70913 SHA1 8cf1e319fbeba326f0bcaf7a19508b12d294f6de SHA256 8f1c9a813584af23ce957a71a1fbdb76c986af2a1af60d6b803f5769b98f97c5
diff --git a/sys-cluster/mpe2/metadata.xml b/sys-cluster/mpe2/metadata.xml
new file mode 100644
index 000000000..a9bd7f630
--- /dev/null
+++ b/sys-cluster/mpe2/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>hp-cluster</herd>
+ <maintainer>
+ <email>jsbronder@gentoo.org</email>
+ <name>Justin Bronder</name>
+ </maintainer>
+</pkgmetadata>
+
diff --git a/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild b/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild
new file mode 100644
index 000000000..67c113a93
--- /dev/null
+++ b/sys-cluster/mpe2/mpe2-1.0.6_p1.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit fortran eutils java-utils-2 mpi
+
+MY_P=${P/_/}
+DESCRIPTION="MPI development tools"
+HOMEPAGE="http://www-unix.mcs.anl.gov/perfvis/download/index.htm"
+SRC_URI="ftp://ftp.mcs.anl.gov/pub/mpi/${PN%2}/${MY_P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="minimal fortran threads debug"
+
+MPI_EMPI_COMPAT="openmpi mpich2"
+
+COMMON_DEPEND="$(mpi_pkg_deplist)
+ !minimal? ( x11-libs/libXtst
+ x11-libs/libXi )"
+
+DEPEND="!minimal? ( >=virtual/jdk-1.4 )
+ ${COMMON_DEPEND}"
+
+RDEPEND="!minimal? ( >=virtual/jre-1.4 )
+ ${COMMON_DEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+MPE_IMP=""
+
+
+# README:
+# This ebuild is created to handle building with both mpich2 and openmpi.
+# However, without empi (in the science overlay), and some further
+# conversion to use mpi.eclass, we can only handle one implementation
+# at a time. I still believe it's better to have the ebuild setup
+# correctly in preperation.
+
+pkg_setup() {
+ local i
+
+ mpi_pkg_setup
+ MPE_IMP=$(mpi_built_with)
+
+ if use fortran ; then
+ FORTRAN="g77 gfortran ifort ifc"
+ fortran_pkg_setup
+ fi
+
+ if use threads; then
+ if ! built_with_use ${CATEGORY}/${MPE_IMP} threads; then
+ eerror "Thread logging support in ${P} requires you build"
+ eerror "${CATEGORY}/${MPE_IMP} with threading support."
+ die "Fix your USE flags."
+ fi
+ fi
+
+ export JFLAGS="${JFLAGS} $(java-pkg_javac-args)"
+
+ if [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
+ elog ""
+ elog "Currently src_test fails on collchk with openmpi, hence"
+ elog "testing is disabled by default. If you would like to"
+ elog "force testing, please add MPE_FORCE_OPENMPI_TEST=1"
+ elog "to your environment."
+ elog ""
+ fi
+
+ einfo "Building with support for: ${CATEGORY}/${MPE_IMP}"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Don't assume path contains ./
+ sed -i 's,\($MPERUN\) $pgm,\1 ./$pgm,' sbin/mpetestexeclog.in
+}
+
+src_compile() {
+ local c="--with-mpicc=$(get_eselect_var MPI_CC)"
+ local d=$(get_mpi_dir)
+
+ if [ -n "${FORTRANC}" ]; then
+ c="${c} --with-mpif77=$(get_eselect_var MPI_F77)"
+ export F77=${FORTRANC}
+ else
+ c="${c} --disable-f77"
+ fi
+
+ if use minimal; then
+ c="${c} --enable-slog2=no --disable-rlog --disable-sample"
+ else
+ c="${c} --with-java2=$(java-config --jdk-home) --enable-slog2=build"
+ fi
+
+ if [[ "${MPE_IMP}" == openmpi* ]]; then
+ c="${c} --disable-rlog --disable-sample"
+ fi
+
+ mpi_conf_args="${c}
+ --sysconfdir=/etc/${PN}
+ --with-htmldir=${d}/usr/share/${PN}
+ --with-docdir=${d}/usr/share/${PN}
+ --enable-collchk
+ --enable-wrappers
+ $(use_enable !minimal graphics)
+ $(use_enable threads threadlogging )
+ $(use_enable debug g)"
+ mpi_src_compile
+
+#--with-mpicc=/usr/bin/mpicc \
+#--with-mpif77=/usr/bin/mpif77 \
+}
+
+src_test() {
+ local rc
+ local d=$(get_mpi_dir)
+
+ cd "${S}"
+
+ if [[ "${MPE_IMP}" == mpich2* ]]; then
+ "${ROOT}"${d}/usr/bin/mpd -d --pidfile="${T}"/mpd.pid
+ elif [[ "${MPE_IMP}" == openmpi* ]] && [ -z "${MPE2_FORCE_OPENMPI_TEST}" ]; then
+ elog
+ elog "Skipping tests for openmpi"
+ elog
+ return 0
+ fi
+
+ emake \
+ CC="${S}"/bin/mpecc \
+ FC="${S}"/bin/mpefc \
+ MPERUN="${ROOT}${d}/usr/bin/mpiexec -n 4" \
+ CLOG2TOSLOG2="${S}/src/slog2sdk/bin/clog2TOslog2" \
+ check;
+ rc=${?}
+ if [[ "${MPE_IMP}" == mpich2* ]]; then
+ "${ROOT}"${d}/usr/bin/mpdallexit || kill $(<"${T}"/mpd.pid)
+ fi
+
+ return ${rc}
+}
+
+src_install() {
+ local d=$(get_mpi_dir)
+ cd "${S}"
+ emake DESTDIR="${D}" install || die
+ rm -f "${D}"/${d}/usr/sbin/mpeuninstall
+}