summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-libs/magma
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-libs/magma')
-rw-r--r--sci-libs/magma/Manifest2
-rw-r--r--sci-libs/magma/magma-1.4.0.ebuild126
-rw-r--r--sci-libs/magma/magma-1.4.1.ebuild126
-rw-r--r--sci-libs/magma/metadata.xml15
4 files changed, 269 insertions, 0 deletions
diff --git a/sci-libs/magma/Manifest b/sci-libs/magma/Manifest
new file mode 100644
index 000000000000..fa1f0deb9302
--- /dev/null
+++ b/sci-libs/magma/Manifest
@@ -0,0 +1,2 @@
+DIST magma-1.4.0.tar.gz 3557459 SHA256 bd767d7676c3953722eb75928300c162a2c9e0c35791a5427b58a069241f8a58 SHA512 9857ac544cc1657ab7d2f6e8c9700facb7fa38278dbfbfeecc3656434de4bd5b96c268f1a98c9ffa823775aa64c315bd63e577b4d475e104311e09d3e5c3ca15 WHIRLPOOL 99c16d35f2711b3e5f81f2f5c46e434b6e3d8a0bc0ffe7e63bbfe683d75b2cdd99d3a06fd19b2d61f8d98d0fcdfcfe2e2f7d8ec3d0e918fd31e27aa4c818a196
+DIST magma-1.4.1.tar.gz 3765589 SHA256 f1b87238e0e6f794510538e001be89e6d79198084223ea3024dee438060f065b SHA512 d283b59b75ca35c8206c07eff97caf28f07ab598955c84a90d795d46905d879d0f1d7e6a2cb080dad74710255b28999e5ce9708e4f0f53a4adba50724fc5ef71 WHIRLPOOL c38eddd259788f9c143f8828df8acb12da7c7f571e19b01231b38271c37f2753c245dcca1e9b35e3f3ef5688f738477f22b929dcd01347cd867be04f1de6d481
diff --git a/sci-libs/magma/magma-1.4.0.ebuild b/sci-libs/magma/magma-1.4.0.ebuild
new file mode 100644
index 000000000000..1cbf68fa4da5
--- /dev/null
+++ b/sci-libs/magma/magma-1.4.0.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+FORTRAN_STANDARD="77 90"
+
+inherit cuda eutils flag-o-matic fortran-2 multilib toolchain-funcs versionator python-any-r1
+
+DESCRIPTION="Matrix Algebra on GPU and Multicore Architectures"
+HOMEPAGE="http://icl.cs.utk.edu/magma/"
+SRC_URI="http://icl.cs.utk.edu/projectsfiles/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="fermi kepler static-libs test"
+
+REQUIRED_USE="?? ( fermi kepler )"
+
+RDEPEND="
+ dev-util/nvidia-cuda-toolkit
+ virtual/cblas
+ virtual/fortran
+ virtual/lapack"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )"
+
+# We have to have write acccess /dev/nvidia0 and /dev/nvidiactl and the portage
+# user is (usually) not in the video group
+RESTRICT="userpriv"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # distributed pc file not so useful so replace it
+ cat <<-EOF > ${PN}.pc
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include/${PN}
+ Name: ${PN}
+ Description: ${DESCRIPTION}
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} -lmagma
+ Libs.private: -lm -lpthread -ldl -lcublas -lcudart
+ Cflags: -I\${includedir}
+ Requires: cblas lapack
+ EOF
+
+ if [[ $(tc-getCC) =~ gcc ]]; then
+ local eopenmp=-fopenmp
+ elif [[ $(tc-getCC) =~ icc ]]; then
+ local eopenmp=-openmp
+ else
+ elog "Cannot detect compiler type so not setting openmp support"
+ fi
+ append-flags -fPIC ${eopenmp}
+ append-ldflags -Wl,-soname,lib${PN}.so.1.4 ${eopenmp}
+
+ cuda_src_prepare
+}
+
+src_configure() {
+ cat <<-EOF > make.inc
+ ARCH = $(tc-getAR)
+ ARCHFLAGS = cr
+ RANLIB = $(tc-getRANLIB)
+ NVCC = nvcc
+ CC = $(tc-getCXX)
+ FORT = $(tc-getFC)
+ INC = -I"${EPREFIX}/opt/cuda/include" -DADD_ -DCUBLAS_GFORTRAN
+ OPTS = ${CFLAGS} -fPIC
+ FOPTS = ${FFLAGS} -fPIC -x f95-cpp-input
+ F77OPTS = ${FFLAGS} -fPIC
+ NVOPTS = -DADD_ -DUNIX ${NVCCFLAGS}
+ LDOPTS = ${LDFLAGS}
+ LOADER = $(tc-getFC)
+ LIBBLAS = $($(tc-getPKG_CONFIG) --libs cblas)
+ LIBLAPACK = $($(tc-getPKG_CONFIG) --libs lapack)
+ CUDADIR = ${EPREFIX}/opt/cuda
+ LIBCUDA = -L\$(CUDADIR)/$(get_libdir) -lcublas -lcudart
+ LIB = -pthread -lm -ldl \$(LIBCUDA) \$(LIBBLAS) \$(LIBLAPACK) -lstdc++
+ EOF
+ if use kepler; then
+ echo >> make.inc "GPU_TARGET = Kepler"
+ elif use fermi; then
+ echo >> make.inc "GPU_TARGET = Fermi"
+ else # See http://icl.cs.utk.edu/magma/forum/viewtopic.php?f=2&t=227
+ echo >> make.inc "GPU_TARGET = Tesla"
+ fi
+}
+
+src_compile() {
+ emake lib
+ emake shared
+ mv lib/lib${PN}.so{,.1.4} || die
+ ln -sf lib${PN}.so.1.4 lib/lib${PN}.so.1 || die
+ ln -sf lib${PN}.so.1.4 lib/lib${PN}.so || die
+}
+
+src_test() {
+ emake test lapacktest
+ cd testing/lin || die
+ # we need to access this while running the tests
+ addwrite /dev/nvidiactl
+ addwrite /dev/nvidia0
+ LD_LIBRARY_PATH="${S}"/lib ${EPYTHON} lapack_testing.py || die
+}
+
+src_install() {
+ dolib.so lib/lib*$(get_libname)*
+ use static-libs && dolib.a lib/lib*.a
+ insinto /usr/include/${PN}
+ doins include/*.h
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+ dodoc README ReleaseNotes
+}
diff --git a/sci-libs/magma/magma-1.4.1.ebuild b/sci-libs/magma/magma-1.4.1.ebuild
new file mode 100644
index 000000000000..1cbf68fa4da5
--- /dev/null
+++ b/sci-libs/magma/magma-1.4.1.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+FORTRAN_STANDARD="77 90"
+
+inherit cuda eutils flag-o-matic fortran-2 multilib toolchain-funcs versionator python-any-r1
+
+DESCRIPTION="Matrix Algebra on GPU and Multicore Architectures"
+HOMEPAGE="http://icl.cs.utk.edu/magma/"
+SRC_URI="http://icl.cs.utk.edu/projectsfiles/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="fermi kepler static-libs test"
+
+REQUIRED_USE="?? ( fermi kepler )"
+
+RDEPEND="
+ dev-util/nvidia-cuda-toolkit
+ virtual/cblas
+ virtual/fortran
+ virtual/lapack"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( ${PYTHON_DEPS} )"
+
+# We have to have write acccess /dev/nvidia0 and /dev/nvidiactl and the portage
+# user is (usually) not in the video group
+RESTRICT="userpriv"
+
+pkg_setup() {
+ fortran-2_pkg_setup
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ # distributed pc file not so useful so replace it
+ cat <<-EOF > ${PN}.pc
+ prefix=${EPREFIX}/usr
+ libdir=\${prefix}/$(get_libdir)
+ includedir=\${prefix}/include/${PN}
+ Name: ${PN}
+ Description: ${DESCRIPTION}
+ Version: ${PV}
+ URL: ${HOMEPAGE}
+ Libs: -L\${libdir} -lmagma
+ Libs.private: -lm -lpthread -ldl -lcublas -lcudart
+ Cflags: -I\${includedir}
+ Requires: cblas lapack
+ EOF
+
+ if [[ $(tc-getCC) =~ gcc ]]; then
+ local eopenmp=-fopenmp
+ elif [[ $(tc-getCC) =~ icc ]]; then
+ local eopenmp=-openmp
+ else
+ elog "Cannot detect compiler type so not setting openmp support"
+ fi
+ append-flags -fPIC ${eopenmp}
+ append-ldflags -Wl,-soname,lib${PN}.so.1.4 ${eopenmp}
+
+ cuda_src_prepare
+}
+
+src_configure() {
+ cat <<-EOF > make.inc
+ ARCH = $(tc-getAR)
+ ARCHFLAGS = cr
+ RANLIB = $(tc-getRANLIB)
+ NVCC = nvcc
+ CC = $(tc-getCXX)
+ FORT = $(tc-getFC)
+ INC = -I"${EPREFIX}/opt/cuda/include" -DADD_ -DCUBLAS_GFORTRAN
+ OPTS = ${CFLAGS} -fPIC
+ FOPTS = ${FFLAGS} -fPIC -x f95-cpp-input
+ F77OPTS = ${FFLAGS} -fPIC
+ NVOPTS = -DADD_ -DUNIX ${NVCCFLAGS}
+ LDOPTS = ${LDFLAGS}
+ LOADER = $(tc-getFC)
+ LIBBLAS = $($(tc-getPKG_CONFIG) --libs cblas)
+ LIBLAPACK = $($(tc-getPKG_CONFIG) --libs lapack)
+ CUDADIR = ${EPREFIX}/opt/cuda
+ LIBCUDA = -L\$(CUDADIR)/$(get_libdir) -lcublas -lcudart
+ LIB = -pthread -lm -ldl \$(LIBCUDA) \$(LIBBLAS) \$(LIBLAPACK) -lstdc++
+ EOF
+ if use kepler; then
+ echo >> make.inc "GPU_TARGET = Kepler"
+ elif use fermi; then
+ echo >> make.inc "GPU_TARGET = Fermi"
+ else # See http://icl.cs.utk.edu/magma/forum/viewtopic.php?f=2&t=227
+ echo >> make.inc "GPU_TARGET = Tesla"
+ fi
+}
+
+src_compile() {
+ emake lib
+ emake shared
+ mv lib/lib${PN}.so{,.1.4} || die
+ ln -sf lib${PN}.so.1.4 lib/lib${PN}.so.1 || die
+ ln -sf lib${PN}.so.1.4 lib/lib${PN}.so || die
+}
+
+src_test() {
+ emake test lapacktest
+ cd testing/lin || die
+ # we need to access this while running the tests
+ addwrite /dev/nvidiactl
+ addwrite /dev/nvidia0
+ LD_LIBRARY_PATH="${S}"/lib ${EPYTHON} lapack_testing.py || die
+}
+
+src_install() {
+ dolib.so lib/lib*$(get_libname)*
+ use static-libs && dolib.a lib/lib*.a
+ insinto /usr/include/${PN}
+ doins include/*.h
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins ${PN}.pc
+ dodoc README ReleaseNotes
+}
diff --git a/sci-libs/magma/metadata.xml b/sci-libs/magma/metadata.xml
new file mode 100644
index 000000000000..70c7d66f8550
--- /dev/null
+++ b/sci-libs/magma/metadata.xml
@@ -0,0 +1,15 @@
+<?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 Matrix Algebra on GPU and Multicore Architectures
+ project aims to develop a dense linear algebra library
+ similar to LAPACK but for heterogeneous/hybrid architectures, starting
+ with current "Multicore+GPU" systems.
+</longdescription>
+<use>
+ <flag name="fermi">Compile for GPU NVIDIA Fermi family (2.x cards)</flag>
+ <flag name="kepler">Compile for GPU NVIDIA Kepler family (GF 6xx cards)</flag>
+</use>
+</pkgmetadata>