aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <sebfabbro@gmail.com>2011-08-22 20:01:59 +0100
committerSébastien Fabbro <sebfabbro@gmail.com>2011-08-22 20:01:59 +0100
commitbe1a2fd0c77f5919dcadfc60b3f85d19d869a5d0 (patch)
tree36f3553c1d36c6f93c0c2097ad784b038d800c8d /sci-libs/scalapack
parentadded xblas (diff)
downloadsci-be1a2fd0c77f5919dcadfc60b3f85d19d869a5d0.tar.gz
sci-be1a2fd0c77f5919dcadfc60b3f85d19d869a5d0.tar.bz2
sci-be1a2fd0c77f5919dcadfc60b3f85d19d869a5d0.zip
added mpiblacs
Diffstat (limited to 'sci-libs/scalapack')
-rw-r--r--sci-libs/scalapack/ChangeLog13
-rw-r--r--sci-libs/scalapack/Manifest4
-rw-r--r--sci-libs/scalapack/metadata.xml12
-rw-r--r--sci-libs/scalapack/scalapack-1.8.0.ebuild103
4 files changed, 132 insertions, 0 deletions
diff --git a/sci-libs/scalapack/ChangeLog b/sci-libs/scalapack/ChangeLog
new file mode 100644
index 000000000..3e621fed7
--- /dev/null
+++ b/sci-libs/scalapack/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for sci-libs/scalapack
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 23 Feb 2011; Sébastien Fabbro <bicatali@gentoo.org> scalapack-1.8.0.ebuild:
+ Switched to alternatives-2 framework
+
+*scalapack-1.8.0 (08 Dec 2010)
+
+ 08 Dec 2010; Sébastien Fabbro <bicatali@gentoo.org> +scalapack-1.8.0.ebuild,
+ +metadata.xml:
+ Initial import
+
diff --git a/sci-libs/scalapack/Manifest b/sci-libs/scalapack/Manifest
new file mode 100644
index 000000000..56e519937
--- /dev/null
+++ b/sci-libs/scalapack/Manifest
@@ -0,0 +1,4 @@
+DIST scalapack-1.8.0.tgz 5006143 RMD160 4b0f607d18faa6b64415537124e89c4cb33bd06a SHA1 c185f71dda528e809e514dc02a3497817ce3af40 SHA256 e378dbedf67102cb7cc1a7991bb02bbe163aa91710dbeae2868ec781d3fc7a05
+EBUILD scalapack-1.8.0.ebuild 2878 RMD160 26c45388974f797f3d0d46ba123a366c6222a400 SHA1 51b2d8ad58056f51dabb38782ef2498e64bb6aa7 SHA256 2a8772989391a02627248022634f9a66f024060a1d4156c1fb210abecce97974
+MISC ChangeLog 385 RMD160 0b11683799e82701061101d65e484a845d15b88c SHA1 7646afff6226d595a1b34d9a75f27bb376b2d041 SHA256 f14c196af54d1f100ea96fbbff72af4ed7496d0c0a78350e04c99eef2f2b8041
+MISC metadata.xml 563 RMD160 d29391f1abe76c1663278ae6d35fe4128a9f511c SHA1 f794c3d2f48a908e306a05999b7264eccbb18da1 SHA256 1ee2c99e8e8d4f57ba1dce11797c19545734eb262725095909dcf3c80752fb3c
diff --git a/sci-libs/scalapack/metadata.xml b/sci-libs/scalapack/metadata.xml
new file mode 100644
index 000000000..baa3fe76f
--- /dev/null
+++ b/sci-libs/scalapack/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription lang="en">
+ The ScaLAPACK (or Scalable LAPACK) library includes a subset of LAPACK routines
+ redesigned for distributed memory MIMD parallel computers. It is currently
+ written in a Single-Program-Multiple-Data style using explicit message
+ passing for interprocessor communication. It assumes matrices are laid out
+ in a two-dimensional block cyclic decomposition.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-libs/scalapack/scalapack-1.8.0.ebuild b/sci-libs/scalapack/scalapack-1.8.0.ebuild
new file mode 100644
index 000000000..dc56152ef
--- /dev/null
+++ b/sci-libs/scalapack/scalapack-1.8.0.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+inherit eutils toolchain-funcs versionator alternatives-2
+
+DESCRIPTION="Subset of LAPACK routines redesigned for heterogenous computing"
+HOMEPAGE="http://www.netlib.org/scalapack/"
+SRC_URI="${HOMEPAGE}/${P}.tgz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs test"
+
+RDEPEND="virtual/blacs
+ virtual/lapack"
+DEPEND="${RDEPEND}
+ dev-util/pkgconfig"
+
+make_shared_lib() {
+ local libstatic=${1}
+ local soname=$(basename "${1%.a}").so.$(get_major_version)
+ shift
+ einfo "Making ${soname}"
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -shared -Wl,-soname="${soname}" \
+ -Wl,--whole-archive "${libstatic}" -Wl,--no-whole-archive \
+ "$@" -o $(dirname "${libstatic}")/"${soname}" || die "${soname} failed"
+ ln -s "${soname}" $(dirname "${libstatic}")/"${soname%.*}"
+}
+
+src_configure() {
+ sed -e "s:\(^home[[:space:]]*=\).*:\1${S}:" \
+ -e "s:\(^CDEFS[[:space:]]*=\).*:\1-DAdd_ -DNO_IEEE -DUsingMpiBlacs:" \
+ -e "s:\(^F77FLAGS[[:space:]]*=\).*:\1${FFLAGS}:" \
+ -e "s:\(^F77LOADFLAGS[[:space:]]*=\).*:\1${LDFLAGS}:" \
+ -e "s:\(^CCFLAGS[[:space:]]*=\).*:\1${CFLAGS}:" \
+ -e "s:\(^CCLOADFLAGS[[:space:]]*=\).*:\1${LDFLAGS}:" \
+ -e "s:\(^ARCH[[:space:]]*=\).*:\1$(tc-getAR):" \
+ -e "s:\(^RANLIB[[:space:]]*=\).*:\1$(tc-getRANLIB):" \
+ -e "s:\(^SMPLIB[[:space:]]*=\).*:\1:" \
+ -e "s:\(^BLACSFINIT[[:space:]]*=\).*:\1:" \
+ -e "s:\(^BLACSCINIT[[:space:]]*=\).*:\1:" \
+ -e "s:\(^BLACSLIB[[:space:]]*=\).*:\1$(pkg-config --libs blacs):" \
+ -e "s:\(^BLASLIB[[:space:]]*=\).*:\1$(pkg-config --libs blas):" \
+ -e "s:\(^LAPACKLIB[[:space:]]*=\).*:\1$(pkg-config --libs lapack):" \
+ SLmake.inc.example > SLmake.inc || die
+}
+
+src_compile() {
+ # removing -j1 is tricky because of race to create archive
+ emake -j1 \
+ NOOPT="-fPIC" \
+ F77FLAGS="${FFLAGS} -fPIC" \
+ CCFLAGS="${CFLAGS} -fPIC"
+ local l
+ LINK=mpicc make_shared_lib lib${PN}.a $(pkg-config --libs blas lapack blacs)
+ if use static-libs; then
+ emake cleanlib && rm lib*.a
+ emake -j1
+ fi
+}
+
+src_test() {
+ emake exe
+ cd TESTING
+ local x
+ for x in ./x*; do
+ mpirun -np 4 $x 2>&1 | tee $x.log
+ grep -q "\*\*\*" $x.log && die "$x failed"
+ done
+}
+
+src_install() {
+ cd LIB
+ dolib.so lib*.so*
+ use static-libs && dolib.a lib*.a
+ cd "${S}"
+ insinto /usr/include/${PN}
+ doins PBLAS/SRC/*.h || die
+
+ local pcfile=ref${PN}.pc
+ cat <<-EOF > ${pcfile}
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include
+ Name: ${PN}
+ Description: ${DESCRIPTION}
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} -l${PN}
+ Private: -lm
+ Cflags: -I\${includedir}/${PN}
+ Requires: blas lapack blacs
+ EOF
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${pcfile} || die
+ alternatives_for scalapack reference \
+ 0 "/usr/$(get_libdir)/pkgconfig/scalapack.pc" "${pcfile}"
+
+}