1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils multilib
9 DESCRIPTION="A Portable Implementation of the High-Performance Linpack Benchmark for Distributed-Memory Computers"
10 HOMEPAGE="http://www.netlib.org/benchmark/hpl/"
11 SRC_URI="http://www.netlib.org/benchmark/hpl/hpl-${PV}.tar.gz"
15 KEYWORDS="~x86 ~amd64"
27 local locallib="${EPREFIX}/usr/$(get_libdir)/lib"
28 local localblas="$(for i in $($(tc-getPKG_CONFIG) --libs-only-l blas lapack);do a="${a} ${i/-l/${locallib}}.so "; done; echo ${a})"
30 cp setup/Make.Linux_PII_FBLAS Make.gentoo_hpl_fblas_x86 || die
32 -e "/^TOPdir/s,= .*,= ${S}," \
33 -e '/^HPL_OPTS\>/s,=,= -DHPL_DETAILED_TIMING -DHPL_COPY_L,' \
34 -e '/^ARCH\>/s,= .*,= gentoo_hpl_fblas_x86,' \
35 -e '/^MPdir\>/s,= .*,=,' \
36 -e '/^MPlib\>/s,= .*,=,' \
37 -e "/^LAlib\>/s,= .*,= ${localblas}," \
38 -e '/^LINKER\>/s,= .*,= mpicc,' \
39 -e '/^CC\>/s,= .*,= mpicc,' \
40 -e '/^CCFLAGS\>/s|= .*|= $(HPL_DEFS) ${CFLAGS}|' \
41 -e "/^LINKFLAGS\>/s|= .*|= ${LDFLAGS}|" \
42 Make.gentoo_hpl_fblas_x86 || die
46 # parallel make failure bug #321539
47 HOME=${WORKDIR} emake -j1 arch=gentoo_hpl_fblas_x86
51 dobin bin/gentoo_hpl_fblas_x86/xhpl
52 dolib lib/gentoo_hpl_fblas_x86/libhpl.a
53 dodoc INSTALL BUGS COPYRIGHT HISTORY README TUNING \
54 bin/gentoo_hpl_fblas_x86/HPL.dat
62 einfo "Remember to copy /usr/share/hpl/HPL.dat to your working directory"
63 einfo "before running xhpl. Typically one may run hpl by executing:"
64 einfo "\"mpiexec -np 4 /usr/bin/xhpl\""
65 einfo "where -np specifies the number of processes."