public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sebastien Fabbro" <bicatali@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/mumps/
Date: Mon, 12 Mar 2012 16:35:51 +0000 (UTC)	[thread overview]
Message-ID: <1331570136.a5ae217a4042f08588e657bdf9414a12597bd1fe.bicatali@gentoo> (raw)

commit:     a5ae217a4042f08588e657bdf9414a12597bd1fe
Author:     Sébastien Fabbro <sebfabbro <AT> gmail <DOT> com>
AuthorDate: Mon Mar 12 16:35:36 2012 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Mon Mar 12 16:35:36 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a5ae217a

imported mumps

---
 sci-libs/mumps/ChangeLog           |   14 ++++
 sci-libs/mumps/metadata.xml        |   13 ++++
 sci-libs/mumps/mumps-4.10.0.ebuild |  141 ++++++++++++++++++++++++++++++++++++
 3 files changed, 168 insertions(+), 0 deletions(-)

diff --git a/sci-libs/mumps/ChangeLog b/sci-libs/mumps/ChangeLog
new file mode 100644
index 0000000..66ba813
--- /dev/null
+++ b/sci-libs/mumps/ChangeLog
@@ -0,0 +1,14 @@
+# ChangeLog for sci-libs/mumps
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+  12 Mar 2012; Sébastien Fabbro <bicatali@gentoo.org> +mumps-4.10.0.ebuild,
+  +metadata.xml:
+  metis-mpi is now parmetis
+
+*mumps-4.10.0 (01 Jun 2011)
+
+  01 Jun 2011; Sébastien Fabbro <bicatali@gentoo.org> +mumps-4.10.0.ebuild,
+  +metadata.xml:
+  Initial import
+

diff --git a/sci-libs/mumps/metadata.xml b/sci-libs/mumps/metadata.xml
new file mode 100644
index 0000000..e9804fe
--- /dev/null
+++ b/sci-libs/mumps/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>sci</herd>
+<longdescription lang='en'>
+  MUltifrontal Massively Parallel sparse direct Solver implements a
+  direct solver for large sparse linear systems, with a particular
+  focus on symmetric positive definite matrices. It can operate on
+  distributed matrices e.g. over a cluster. It has Fortran and C
+  interfaces, and can interface with ordering tools such 
+  as Scotch or Metis.
+</longdescription>
+</pkgmetadata>

diff --git a/sci-libs/mumps/mumps-4.10.0.ebuild b/sci-libs/mumps/mumps-4.10.0.ebuild
new file mode 100644
index 0000000..e1c5015
--- /dev/null
+++ b/sci-libs/mumps/mumps-4.10.0.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+inherit eutils toolchain-funcs flag-o-matic versionator
+
+MYP=MUMPS_${PV}
+
+DESCRIPTION="MUltifrontal Massively Parallel sparse direct matrix Solver"
+HOMEPAGE="http://mumps.enseeiht.fr/"
+SRC_URI="${HOMEPAGE}${MYP}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples metis mpi +scotch static-libs"
+
+RDEPEND="virtual/blas
+   sci-libs/parmetis[mpi?]
+   scotch? ( sci-libs/scotch[mpi?] )
+   mpi? ( virtual/scalapack )"
+
+DEPEND="${RDEPEND}
+	dev-util/pkgconfig"
+
+S="${WORKDIR}/${MYP}"
+
+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_prepare() {
+	sed -e "s:^\(CC\s*=\).*:\1$(tc-getCC):" \
+		-e "s:^\(FC\s*=\).*:\1$(tc-getFC):" \
+		-e "s:^\(FL\s*=\).*:\1$(tc-getFC):" \
+		-e "s:^\(AR\s*=\).*:\1$(tc-getAR) rv :" \
+		-e "s:^\(RANLIB\s*=\).*:\1$(tc-getRANLIB):" \
+		-e "s:^\(LIBBLAS\s*=\).*:\1$(pkg-config --libs blas):" \
+		-e "s:^\(INCPAR\s*=\).*:\1:" \
+		-e 's:^\(LIBPAR\s*=\).*:\1$(SCALAP):' \
+		-e "s:^\(OPTF\s*=\).*:\1${FFLAGS} -DALLOW_NON_INIT \$(PIC):" \
+		-e "s:^\(OPTC\s*=\).*:\1${CFLAGS} \$(PIC):" \
+		-e "s:^\(OPTL\s*=\).*:\1${LDFLAGS}:" \
+		Make.inc/Makefile.inc.generic > Makefile.inc || die
+}
+
+src_configure() {
+	LIBADD="$(pkg-config --libs blas) -Llib -lpord"
+	local ord="-Dpord"
+	if use metis && use mpi; then
+		sed -i \
+			-e "s:#\s*\(LMETIS\s*=\).*:\1$(pkg-config --libs parmetis):" \
+			-e "s:#\s*\(IMETIS\s*=\).*:\1$(pkg-config --cflags parmetis):" \
+			Makefile.inc || die
+		LIBADD="${LIBADD} $(pkg-config --libs parmetis)"
+		ord="${ord} -Dparmetis"
+	elif use metis; then
+		sed -i \
+			-e "s:#\s*\(LMETIS\s*=\).*:\1$(pkg-config --libs metis):" \
+			-e "s:#\s*\(IMETIS\s*=\).*:\1$(pkg-config --cflags metis):" \
+			Makefile.inc || die
+		LIBADD="${LIBADD} $(pkg-config --libs metis)"
+		ord="${ord} -Dmetis"
+	fi
+	if use scotch && use mpi; then
+		sed -i \
+			-e "s:#\s*\(LSCOTCH\s*=\).*:\1-lptesmumps -lptscotch -lptscotcherr:" \
+			-e "s:#\s*\(ISCOTCH\s*=\).*:\1-I${EROOT}usr/include/scotch:" \
+			Makefile.inc || die
+		LIBADD="${LIBADD} -lptesmumps -lptscotch -lptscotcherr"
+		ord="${ord} -Dptscotch"
+	elif use scotch; then
+		sed -i \
+			-e "s:#\s*\(LSCOTCH\s*=\).*:\1-lesmumps -lscotch -lscotcherr:" \
+			-e "s:#\s*\(ISCOTCH\s*=\).*:\1-I${EROOT}usr/include/scotch:" \
+			Makefile.inc || die
+		LIBADD="${LIBADD} -lesmumps -lscotch -lscotcherr"
+		ord="${ord} -Dscotch"
+	fi
+	if use mpi; then
+		sed -i \
+			-e "s:^\(CC\s*=\).*:\1mpicc:" \
+			-e "s:^\(FC\s*=\).*:\1mpif90:" \
+			-e "s:^\(FL\s*=\).*:\1mpif90:" \
+			-e "s:^\(SCALAP\s*=\).*:\1$(pkg-config --libs scalapack):" \
+			Makefile.inc || die
+		export LINK=mpif90
+		LIBADD="${LIBADD} $(pkg-config --libs scalapack)"
+	fi
+	sed -i -e "s:^\s*\(ORDERINGSF\s*=\).*:\1 ${ord}:" Makefile.inc || die
+}
+
+src_compile() {
+	emake alllib PIC="-fPIC"
+	make_shared_lib lib/libmumps_common.a ${LIBADD}
+	local i
+	for i in c d s z; do
+		make_shared_lib lib/lib${i}mumps.a -Llib -lmumps_common
+	done
+	if use static-libs; then
+		emake clean
+		emake alllib
+	fi
+}
+
+src_test() {
+	emake all
+	local dotest
+	use mpi && dotest="mpirun -np 2"
+	cd examples
+	${dotest} ./ssimpletest < input_simpletest_real || die
+	${dotest} ./dsimpletest < input_simpletest_real || die
+	${dotest} ./csimpletest < input_simpletest_cmplx || die
+	${dotest} ./zsimpletest < input_simpletest_cmplx || die
+	einfo "The solutions should be close to (1,2,3,4,5)"
+	${dotest} ./c_example || die
+	einfo "The solution should be close to (1,2)"
+	make clean
+}
+
+src_install() {
+	dolib.so lib/lib*.so*
+	use static-libs && dolib.a lib/lib*.a
+	insinto /usr
+	doins -r include
+	dodoc README ChangeLog VERSION
+	use doc && dodoc doc/*.pdf
+	if use examples; then
+		insinto /usr/share/doc/${PF}
+		doins -r examples
+	fi
+}



             reply	other threads:[~2012-03-12 16:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12 16:35 Sebastien Fabbro [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-03-13  0:56 [gentoo-commits] proj/sci:master commit in: sci-libs/mumps/ Sebastien Fabbro
2012-03-13  0:56 Sebastien Fabbro
2012-07-12 20:43 Sebastien Fabbro
2012-07-12 20:43 Sebastien Fabbro
2012-07-13  4:45 Sebastien Fabbro
2012-07-15 20:19 Sebastien Fabbro
2012-07-15 20:19 Sebastien Fabbro
2012-12-11 20:11 Sebastien Fabbro
2013-06-18  9:07 Justin Lecher
2014-05-12 19:25 Sebastien Fabbro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331570136.a5ae217a4042f08588e657bdf9414a12597bd1fe.bicatali@gentoo \
    --to=bicatali@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox