| 1 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/hpl/hpl-2.0-r1.ebuild,v 1.1 2011/02/01 18:27:08 jsbronder Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
inherit eutils
|
| 7 |
|
| 8 |
DESCRIPTION="A Portable Implementation of the High-Performance Linpack Benchmark for Distributed-Memory Computers"
|
| 9 |
HOMEPAGE="http://www.netlib.org/benchmark/hpl/"
|
| 10 |
SRC_URI="http://www.netlib.org/benchmark/hpl/hpl-${PV}.tar.gz"
|
| 11 |
LICENSE="HPL"
|
| 12 |
SLOT="0"
|
| 13 |
KEYWORDS="~x86 ~amd64"
|
| 14 |
|
| 15 |
IUSE="doc"
|
| 16 |
DEPEND="virtual/mpi
|
| 17 |
virtual/blas
|
| 18 |
virtual/lapack"
|
| 19 |
RDEPEND="${DEPEND}"
|
| 20 |
|
| 21 |
src_prepare() {
|
| 22 |
cp setup/Make.Linux_PII_FBLAS Make.gentoo_hpl_fblas_x86
|
| 23 |
sed -i \
|
| 24 |
-e "/^TOPdir/s,= .*,= ${S}," \
|
| 25 |
-e '/^HPL_OPTS\>/s,=,= -DHPL_DETAILED_TIMING -DHPL_COPY_L,' \
|
| 26 |
-e '/^ARCH\>/s,= .*,= gentoo_hpl_fblas_x86,' \
|
| 27 |
-e '/^MPdir\>/s,= .*,=,' \
|
| 28 |
-e '/^MPlib\>/s,= .*,=,' \
|
| 29 |
-e "/^LAlib\>/s,= .*,= /usr/$(get_libdir)/libblas.so /usr/$(get_libdir)/liblapack.so," \
|
| 30 |
-e '/^LINKER\>/s,= .*,= mpicc,' \
|
| 31 |
-e '/^CC\>/s,= .*,= mpicc,' \
|
| 32 |
-e "/^LINKFLAGS\>/s|= .*|= ${LDFLAGS}|" \
|
| 33 |
Make.gentoo_hpl_fblas_x86 || die
|
| 34 |
}
|
| 35 |
|
| 36 |
src_compile() {
|
| 37 |
# parallel make failure â bug #321539
|
| 38 |
HOME=${WORKDIR} emake -j1 arch=gentoo_hpl_fblas_x86
|
| 39 |
}
|
| 40 |
|
| 41 |
src_install() {
|
| 42 |
dobin bin/gentoo_hpl_fblas_x86/xhpl
|
| 43 |
dolib lib/gentoo_hpl_fblas_x86/libhpl.a
|
| 44 |
dodoc INSTALL BUGS COPYRIGHT HISTORY README TUNING \
|
| 45 |
bin/gentoo_hpl_fblas_x86/HPL.dat
|
| 46 |
doman man/man3/*.3
|
| 47 |
if use doc; then
|
| 48 |
dohtml -r www/*
|
| 49 |
fi
|
| 50 |
}
|
| 51 |
|
| 52 |
pkg_postinst() {
|
| 53 |
einfo "Remember to copy /usr/share/hpl/HPL.dat to your working directory"
|
| 54 |
einfo "before running xhpl. Typically one may run hpl by executing:"
|
| 55 |
einfo "\"mpiexec -np 4 /usr/bin/xhpl\""
|
| 56 |
einfo "where -np specifies the number of processes."
|
| 57 |
}
|