diff options
Diffstat (limited to 'sci-libs/magma')
-rw-r--r-- | sci-libs/magma/Manifest | 7 | ||||
-rw-r--r-- | sci-libs/magma/magma-1.4.0.ebuild | 124 | ||||
-rw-r--r-- | sci-libs/magma/magma-1.4.1.ebuild | 124 | ||||
-rw-r--r-- | sci-libs/magma/metadata.xml | 18 |
4 files changed, 273 insertions, 0 deletions
diff --git a/sci-libs/magma/Manifest b/sci-libs/magma/Manifest new file mode 100644 index 000000000000..1f8df26743f5 --- /dev/null +++ b/sci-libs/magma/Manifest @@ -0,0 +1,7 @@ +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 +EBUILD magma-1.4.0.ebuild 3172 SHA256 d7f1f4e6eb8876d618d159701714175af956acae230ddc0fc54dcb266b7e8195 SHA512 464e3a905cc216908f69384ef4038813bd30be4f06493966bff0cc593d841ca3b3f38e48c51cc03e8efe78e5ccc66a2d04ddefd1a725cabfba48182a8dab161c WHIRLPOOL 85c9fd39798be47adc949ca3bfd1b7f484125cd10fc05a3ede13abe5d95db5c8f37beb9321e0fd5ab357fc0a05a944a5ffcfbb6d56c00a5ff839001f3ca5787b +EBUILD magma-1.4.1.ebuild 3172 SHA256 d7f1f4e6eb8876d618d159701714175af956acae230ddc0fc54dcb266b7e8195 SHA512 464e3a905cc216908f69384ef4038813bd30be4f06493966bff0cc593d841ca3b3f38e48c51cc03e8efe78e5ccc66a2d04ddefd1a725cabfba48182a8dab161c WHIRLPOOL 85c9fd39798be47adc949ca3bfd1b7f484125cd10fc05a3ede13abe5d95db5c8f37beb9321e0fd5ab357fc0a05a944a5ffcfbb6d56c00a5ff839001f3ca5787b +MISC ChangeLog 2870 SHA256 83bc77d53fd7ec73868f6ef720795e175d960b549c9d251f980f40461cbe35b9 SHA512 aaf13117211c1db178456957a99d9fb5d1c584502780acb390cad4e5d63e135ebaa0e216a35691437a7422d64ef2936943786b5e48e8e642adcd6b86c3a7f9f1 WHIRLPOOL 1ad3663d18462af363f95767f39cb3981e7d50467dc5a5ecb881b8db72f61b93a6db70a5161b0eab58dd92733a2fe50fa175004c9d81b5cbbda6bd0bb1c9a484 +MISC ChangeLog-2015 601 SHA256 69771f17e7f193c7b09efec671f2f6a3743d8bddd34afdafb145ee9de6c8ef5a SHA512 6b52d723cfc90e73e1931366e83b7001217ae40c926520536d000f55f88012844f483c672210bcaffc6cda0f446676bf6276b7aa45a644c6627acb7579a7b0b2 WHIRLPOOL 49781d31fe202e2ac518ea03a904a23fe349ff591ca158c4ff47c27c7090759dedee3ffc6624ccc005ae368638af8fcffc1f4823eec6912440bcf3193cdff07e +MISC metadata.xml 712 SHA256 eebe645fa61b4e76ff1a3dfb8d1e3e422ec7c72e7cc8f1a270f5260292432631 SHA512 27a54732753e5a772d40323c4571cbe43b3a9aec5243063e2e37fc9939a0fcf4810e8f91364145ab8982a385bbcdebcb468abbab917a074416fd8818943b5ec0 WHIRLPOOL 42123a2a96cd93f292af642d54944b851ec73cca9d7080a0a70e13e955c5d82306dbfb3d54da3bc84530d7997fe349e2f6a7526067e221b9a44ca0dedd8d5e67 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..33d1cd70c243 --- /dev/null +++ b/sci-libs/magma/magma-1.4.0.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 ~amd64-linux" +IUSE="fermi kepler static-libs test" + +REQUIRED_USE="?? ( fermi kepler )" + +RDEPEND=" + dev-util/nvidia-cuda-toolkit + virtual/cblas + 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..33d1cd70c243 --- /dev/null +++ b/sci-libs/magma/magma-1.4.1.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +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 ~amd64-linux" +IUSE="fermi kepler static-libs test" + +REQUIRED_USE="?? ( fermi kepler )" + +RDEPEND=" + dev-util/nvidia-cuda-toolkit + virtual/cblas + 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..63989ce9caba --- /dev/null +++ b/sci-libs/magma/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <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> |