diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2014-01-07 22:17:59 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2014-01-07 22:17:59 +0000 |
commit | f52f350d0e02c85a81fcd2b96ba8aee1456d7bb3 (patch) | |
tree | 50c42f1c7b248d2de478cdeb25724e6b284fc13c /sci-libs | |
parent | version bump (diff) | |
download | gentoo-2-f52f350d0e02c85a81fcd2b96ba8aee1456d7bb3.tar.gz gentoo-2-f52f350d0e02c85a81fcd2b96ba8aee1456d7bb3.tar.bz2 gentoo-2-f52f350d0e02c85a81fcd2b96ba8aee1456d7bb3.zip |
Initial import into main tree
(Portage version: 2.2.7-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/magma/ChangeLog | 9 | ||||
-rw-r--r-- | sci-libs/magma/Manifest | 3 | ||||
-rw-r--r-- | sci-libs/magma/magma-1.4.0.ebuild | 126 | ||||
-rw-r--r-- | sci-libs/magma/metadata.xml | 15 |
4 files changed, 153 insertions, 0 deletions
diff --git a/sci-libs/magma/ChangeLog b/sci-libs/magma/ChangeLog new file mode 100644 index 000000000000..f0f893641105 --- /dev/null +++ b/sci-libs/magma/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for sci-libs/magma +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/magma/ChangeLog,v 1.1 2014/01/07 22:17:59 bicatali Exp $ + +*magma-1.4.0 (07 Jan 2014) + + 07 Jan 2014; Sébastien Fabbro <bicatali@gentoo.org> +magma-1.4.0.ebuild, + +metadata.xml: + Initial import into main tree diff --git a/sci-libs/magma/Manifest b/sci-libs/magma/Manifest new file mode 100644 index 000000000000..948f2a24b5c2 --- /dev/null +++ b/sci-libs/magma/Manifest @@ -0,0 +1,3 @@ +DIST magma-1.4.0.tar.gz 3557459 SHA256 bd767d7676c3953722eb75928300c162a2c9e0c35791a5427b58a069241f8a58 SHA512 9857ac544cc1657ab7d2f6e8c9700facb7fa38278dbfbfeecc3656434de4bd5b96c268f1a98c9ffa823775aa64c315bd63e577b4d475e104311e09d3e5c3ca15 WHIRLPOOL 99c16d35f2711b3e5f81f2f5c46e434b6e3d8a0bc0ffe7e63bbfe683d75b2cdd99d3a06fd19b2d61f8d98d0fcdfcfe2e2f7d8ec3d0e918fd31e27aa4c818a196 +EBUILD magma-1.4.0.ebuild 3224 SHA256 1629e0f8484d5b84cdd577155bda7168b634a8dc70b27b3e8d81aa8171cfc8c4 SHA512 5b2469edf236cdb2df233696a5bd1a0abb64b73342ac9a21394db9662c7d8be409bab428e5179a3e62acd33722ec28259af877ca1b8a6b5740417fc25074bc0b WHIRLPOOL dde3d1f3489b186a36ae9d1ddb10c6ac5dc99f8e1d6f9a7789a496f742d8932d1f9d311069938a4f51c8d02e91e2715ecc867bfa1ed0fa4126ff8628dcf9fb79 +MISC metadata.xml 599 SHA256 a09e7d87f032e6247935748fb19889c49c23f2e26a13203ace4ec79cb72db224 SHA512 f3b7bced45c3f91b5a93e1d8abb1bf07ee776f096d0f9e640416c94434acd40204bfb308b731d654e1560f2e104944baee66239cc37f03d1c24546f513e7017a WHIRLPOOL ca683ab972150926c8798c7496e83cf21609fd9006d18b2010cf473f75a5c8d665ba0d7f20116df9a837ecf1ea52e2da02fbfe8a822a0558a2a3274abd62200d 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..605dbfeaaca2 --- /dev/null +++ b/sci-libs/magma/magma-1.4.0.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/magma/magma-1.4.0.ebuild,v 1.1 2014/01/07 22:17:59 bicatali Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python{2_6,2_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> |