* [gentoo-commits] proj/sci:master commit in: sci-libs/magma/
@ 2013-01-03 0:20 Sebastien Fabbro
0 siblings, 0 replies; 5+ messages in thread
From: Sebastien Fabbro @ 2013-01-03 0:20 UTC (permalink / raw
To: gentoo-commits
commit: a513b8f9516ed9e75a4245444d510d9bcc9c5061
Author: Olivier Huber <olivier.huber <AT> inria <DOT> fr>
AuthorDate: Fri Dec 28 17:56:03 2012 +0000
Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Fri Dec 28 18:05:10 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=a513b8f9
sci-libs/magma: Bump
---
sci-libs/magma/ChangeLog | 6 ++
sci-libs/magma/magma-1.3.0.ebuild | 141 +++++++++++++++++++++++++++++++++++++
sci-libs/magma/metadata.xml | 1 +
3 files changed, 148 insertions(+), 0 deletions(-)
diff --git a/sci-libs/magma/ChangeLog b/sci-libs/magma/ChangeLog
index 97d8d1a..0039878 100644
--- a/sci-libs/magma/ChangeLog
+++ b/sci-libs/magma/ChangeLog
@@ -2,6 +2,12 @@
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*magma-1.3.0 (28 Dec 2012)
+
+ 28 Dec 2012; Olivier Huber <oli.huber@gmail.com> +magma-1.3.0.ebuild,
+ metadata.xml:
+ sci-libs/magma Bump
+
24 Nov 2012; Olivier Huber <oli.huber@gmail.com> magma-1.2.1.ebuild,
metadata.xml:
Fix shared lib creation, fix tests and remove the tesla useflag, since this
diff --git a/sci-libs/magma/magma-1.3.0.ebuild b/sci-libs/magma/magma-1.3.0.ebuild
new file mode 100644
index 0000000..7a413f5
--- /dev/null
+++ b/sci-libs/magma/magma-1.3.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
+
+FORTRAN_STANDARD="77 90"
+inherit eutils fortran-2 toolchain-funcs versionator multilib
+
+DESCRIPTION="Matrix Algebra on GPU and Multicore Architectures"
+HOMEPAGE="http://icl.cs.utk.edu/magma/"
+SRC_URI="http://icl.cs.utk.edu/projectsfiles/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="fermi kepler static-libs"
+
+RDEPEND="dev-util/nvidia-cuda-toolkit
+ virtual/cblas
+ virtual/fortran
+ virtual/lapack"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+# We have to have write acccess /dev/nvidia0 and /dev/nvidiactl and the portage
+# user is (usually) not in the video group
+RESTRICT="userpriv"
+
+static_to_shared() {
+ local libstatic=${1}; shift
+ local libname=$(basename ${libstatic%.a})
+ local soname=${libname}$(get_libname $(get_version_component_range 1-2))
+ local libdir=$(dirname ${libstatic})
+
+ einfo "Making ${soname} from ${libstatic}"
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
+ -Wl,-all_load -Wl,${libstatic} \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ else
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -shared -Wl,-soname=${soname} \
+ -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ [[ $(get_version_component_count) -gt 1 ]] && \
+ ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version))
+ ln -s ${soname} ${libdir}/${libname}$(get_libname)
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.2.1-no-cuda-driver.patch
+
+ # http://icl.cs.utk.edu/magma/forum/viewtopic.php?f=2&t=789
+ sed -i -e 's/void magmaSetDevice/static void magmaSetDevice/' src/*getrf2_mgpu.cpp
+
+ # 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 -lmagmablas
+ Libs.private: -lm -lpthread -ldl -lcublas -lcudart
+ Cflags: -I\${includedir}
+ Requires: cblas lapack
+ EOF
+}
+
+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_ --compiler-options '-fPIC ${CFLAGS}' -DUNIX
+ LOADER = $(tc-getFC)
+ LIBBLAS = $(pkg-config --libs cblas)
+ LIBLAPACK = $(pkg-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
+
+ # see http://icl.cs.utk.edu/magma/forum/viewtopic.php?f=2&t=532
+# sed -i -e 's:[cz]heevd_m.cpp::g' src/Makefile.src src/Makefile
+ sed -i -e 's:[cz]hegvd_m.cpp::g' src/Makefile.src src/Makefile
+}
+
+src_compile() {
+ # restrict to -j1 otherwise the static archive is not complete
+ emake -j1 lib
+ LINK=$(tc-getFC) static_to_shared lib/libmagmablas.a -lm -lpthread -ldl \
+ -lcublas -lcudart -L"${EPREFIX}"/opt/cuda/$(get_libdir) -lstdc++ \
+ $(pkg-config --libs cblas) $(pkg-config --libs lapack)
+ static_to_shared lib/libmagma.a -lm -lpthread -ldl -lcublas -lcudart \
+ -L"${EPREFIX}"/opt/cuda/$(get_libdir) -lmagmablas \
+ -Llib $(pkg-config --libs cblas) $(pkg-config --libs lapack)
+ if use static-libs; then
+ emake cleanall
+ sed 's/-fPIC//g' make.inc
+ emake lib
+ fi
+}
+
+src_test() {
+ emake test lapacktest
+ cd testing/lin
+ # we need to access this while running the tests
+ addwrite /dev/nvidiactl
+ addwrite /dev/nvidia0
+ LD_LIBRARY_PATH=${S}/lib python 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
index ef88ac6..70c7d66 100644
--- a/sci-libs/magma/metadata.xml
+++ b/sci-libs/magma/metadata.xml
@@ -10,5 +10,6 @@
</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>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-libs/magma/
@ 2013-12-28 18:59 Justin Lecher
0 siblings, 0 replies; 5+ messages in thread
From: Justin Lecher @ 2013-12-28 18:59 UTC (permalink / raw
To: gentoo-commits
commit: 0d0221742da92ce829e7b6cead68a420619408d3
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 28 18:56:32 2013 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Dec 28 18:56:32 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=0d022174
sci-libs/magma: Respect LDFLAGS and set soname, gh#166; use cuda support correctly; use openmp uspport correctly; add missing quotes and die
Package-Manager: portage-2.2.7
---
sci-libs/magma/ChangeLog | 10 +++
sci-libs/magma/magma-1.3.0.ebuild | 142 --------------------------------------
sci-libs/magma/magma-1.4.0.ebuild | 62 +++++++++--------
3 files changed, 43 insertions(+), 171 deletions(-)
diff --git a/sci-libs/magma/ChangeLog b/sci-libs/magma/ChangeLog
index 1ad76a6..fb815ca 100644
--- a/sci-libs/magma/ChangeLog
+++ b/sci-libs/magma/ChangeLog
@@ -2,6 +2,16 @@
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 28 Dec 2013; Justin Lecher <jlec@gentoo.org> -magma-1.3.0.ebuild,
+ magma-1.4.0.ebuild:
+ Respect LDFLAGS and set soname, gh#166; use cuda support correctly; use
+ openmp uspport correctly; add missing quotes and die
+
+ 28 Dec 2013; Justin Lecher <jlec@gentoo.org> -magma-1.3.0.ebuild,
+ magma-1.4.0.ebuild:
+ Respect LDFLAGS and set soname, gh#166; use cuda support correctly; use
+ openmp uspport correctly; add missing quotes and die
+
22 Feb 2013; Justin Lecher <jlec@gentoo.org> -magma-1.2.1.ebuild,
-files/magma-1.2.1-duplicate-symbols.patch, magma-1.3.0.ebuild, metadata.xml:
Use tc-getPKG_CONFIG from toolchain-funcs.eclass instead of plain pkg-config;
diff --git a/sci-libs/magma/magma-1.3.0.ebuild b/sci-libs/magma/magma-1.3.0.ebuild
deleted file mode 100644
index 37e7949..0000000
--- a/sci-libs/magma/magma-1.3.0.ebuild
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=4
-
-FORTRAN_STANDARD="77 90"
-inherit eutils fortran-2 multilib toolchain-funcs versionator
-
-DESCRIPTION="Matrix Algebra on GPU and Multicore Architectures"
-HOMEPAGE="http://icl.cs.utk.edu/magma/"
-SRC_URI="http://icl.cs.utk.edu/projectsfiles/${PN}/pubs/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
-IUSE="fermi kepler static-libs"
-
-RDEPEND="
- dev-util/nvidia-cuda-toolkit
- virtual/cblas
- virtual/fortran
- virtual/lapack"
-DEPEND="${RDEPEND}
- virtual/pkgconfig"
-
-# We have to have write acccess /dev/nvidia0 and /dev/nvidiactl and the portage
-# user is (usually) not in the video group
-RESTRICT="userpriv"
-
-static_to_shared() {
- local libstatic=${1}; shift
- local libname=$(basename ${libstatic%.a})
- local soname=${libname}$(get_libname $(get_version_component_range 1-2))
- local libdir=$(dirname ${libstatic})
-
- einfo "Making ${soname} from ${libstatic}"
- if [[ ${CHOST} == *-darwin* ]] ; then
- ${LINK:-$(tc-getCC)} ${LDFLAGS} \
- -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
- -Wl,-all_load -Wl,${libstatic} \
- "$@" -o ${libdir}/${soname} || die "${soname} failed"
- else
- ${LINK:-$(tc-getCC)} ${LDFLAGS} \
- -shared -Wl,-soname=${soname} \
- -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
- "$@" -o ${libdir}/${soname} || die "${soname} failed"
- [[ $(get_version_component_count) -gt 1 ]] && \
- ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version))
- ln -s ${soname} ${libdir}/${libname}$(get_libname)
- fi
-}
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-1.2.1-no-cuda-driver.patch
-
- # http://icl.cs.utk.edu/magma/forum/viewtopic.php?f=2&t=789
- sed -i -e 's/void magmaSetDevice/static void magmaSetDevice/' src/*getrf2_mgpu.cpp
-
- # 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 -lmagmablas
- Libs.private: -lm -lpthread -ldl -lcublas -lcudart
- Cflags: -I\${includedir}
- Requires: cblas lapack
- EOF
-}
-
-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_ --compiler-options '-fPIC ${CFLAGS}' -DUNIX
- 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
-
- # see http://icl.cs.utk.edu/magma/forum/viewtopic.php?f=2&t=532
-# sed -i -e 's:[cz]heevd_m.cpp::g' src/Makefile.src src/Makefile
- sed -i -e 's:[cz]hegvd_m.cpp::g' src/Makefile.src src/Makefile
-}
-
-src_compile() {
- # restrict to -j1 otherwise the static archive is not complete
- emake -j1 lib
- LINK=$(tc-getFC) static_to_shared lib/libmagmablas.a -lm -lpthread -ldl \
- -lcublas -lcudart -L"${EPREFIX}"/opt/cuda/$(get_libdir) -lstdc++ \
- $($(tc-getPKG_CONFIG) --libs cblas) $($(tc-getPKG_CONFIG) --libs lapack)
- static_to_shared lib/libmagma.a -lm -lpthread -ldl -lcublas -lcudart \
- -L"${EPREFIX}"/opt/cuda/$(get_libdir) -lmagmablas \
- -Llib $($(tc-getPKG_CONFIG) --libs cblas) $($(tc-getPKG_CONFIG) --libs lapack)
- if use static-libs; then
- emake cleanall
- sed 's/-fPIC//g' make.inc
- emake lib
- fi
-}
-
-src_test() {
- emake test lapacktest
- cd testing/lin
- # we need to access this while running the tests
- addwrite /dev/nvidiactl
- addwrite /dev/nvidia0
- LD_LIBRARY_PATH=${S}/lib python 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.0.ebuild b/sci-libs/magma/magma-1.4.0.ebuild
index b17c326..8d1eaf7 100644
--- a/sci-libs/magma/magma-1.4.0.ebuild
+++ b/sci-libs/magma/magma-1.4.0.ebuild
@@ -2,10 +2,13 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-EAPI=4
+EAPI=5
+
+PYTHON_COMPAT=( python{2_6,2_7} )
FORTRAN_STANDARD="77 90"
-inherit eutils fortran-2 multilib toolchain-funcs versionator
+
+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/"
@@ -14,7 +17,9 @@ 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"
+IUSE="fermi kepler static-libs test"
+
+REQUIRED_USE="?? ( fermi kepler )"
RDEPEND="
dev-util/nvidia-cuda-toolkit
@@ -22,33 +27,16 @@ RDEPEND="
virtual/fortran
virtual/lapack"
DEPEND="${RDEPEND}
- virtual/pkgconfig"
+ 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"
-static_to_shared() {
- local libstatic=${1}; shift
- local libname=$(basename ${libstatic%.a})
- local soname=${libname}$(get_libname $(get_version_component_range 1-2))
- local libdir=$(dirname ${libstatic})
-
- einfo "Making ${soname} from ${libstatic}"
- if [[ ${CHOST} == *-darwin* ]] ; then
- ${LINK:-$(tc-getCC)} ${LDFLAGS} \
- -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
- -Wl,-all_load -Wl,${libstatic} \
- "$@" -o ${libdir}/${soname} || die "${soname} failed"
- else
- ${LINK:-$(tc-getCC)} ${LDFLAGS} \
- -shared -Wl,-soname=${soname} \
- -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
- "$@" -o ${libdir}/${soname} || die "${soname} failed"
- [[ $(get_version_component_count) -gt 1 ]] && \
- ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version))
- ln -s ${soname} ${libdir}/${libname}$(get_libname)
- fi
+pkg_setup() {
+ fortran-2_pkg_setup
+ use test && python-any-r1_pkg_setup
}
src_prepare() {
@@ -61,11 +49,23 @@ src_prepare() {
Description: ${DESCRIPTION}
Version: ${PV}
URL: ${HOMEPAGE}
- Libs: -L\${libdir} -lmagma -lmagmablas
+ 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() {
@@ -80,7 +80,8 @@ src_configure() {
OPTS = ${CFLAGS} -fPIC
FOPTS = ${FFLAGS} -fPIC -x f95-cpp-input
F77OPTS = ${FFLAGS} -fPIC
- NVOPTS = -DADD_ --compiler-options '-fPIC ${CFLAGS}' -DUNIX
+ NVOPTS = -DADD_ -DUNIX ${NVCCFLAGS}
+ LDOPTS = ${LDFLAGS}
LOADER = $(tc-getFC)
LIBBLAS = $($(tc-getPKG_CONFIG) --libs cblas)
LIBLAPACK = $($(tc-getPKG_CONFIG) --libs lapack)
@@ -100,15 +101,18 @@ src_configure() {
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
+ cd testing/lin || die
# we need to access this while running the tests
addwrite /dev/nvidiactl
addwrite /dev/nvidia0
- LD_LIBRARY_PATH=${S}/lib python lapack_testing.py || die
+ LD_LIBRARY_PATH="${S}"/lib ${EPYTHON} lapack_testing.py || die
}
src_install() {
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-libs/magma/
@ 2013-11-18 8:01 Justin Lecher
0 siblings, 0 replies; 5+ messages in thread
From: Justin Lecher @ 2013-11-18 8:01 UTC (permalink / raw
To: gentoo-commits
commit: d05d18d95b0b154f3446f832f25fd6a0c5c3d3b8
Author: Andreas Schäfer <gentryx <AT> gmx <DOT> de>
AuthorDate: Sun Nov 17 20:35:00 2013 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Nov 17 20:35:00 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=d05d18d9
added Magma 1.4.0 ebuild
---
sci-libs/magma/magma-1.4.0.ebuild | 122 ++++++++++++++++++++++++++++++++++++++
1 file changed, 122 insertions(+)
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 0000000..b17c326
--- /dev/null
+++ b/sci-libs/magma/magma-1.4.0.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+FORTRAN_STANDARD="77 90"
+inherit eutils fortran-2 multilib toolchain-funcs versionator
+
+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"
+
+RDEPEND="
+ dev-util/nvidia-cuda-toolkit
+ virtual/cblas
+ virtual/fortran
+ virtual/lapack"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+# We have to have write acccess /dev/nvidia0 and /dev/nvidiactl and the portage
+# user is (usually) not in the video group
+RESTRICT="userpriv"
+
+static_to_shared() {
+ local libstatic=${1}; shift
+ local libname=$(basename ${libstatic%.a})
+ local soname=${libname}$(get_libname $(get_version_component_range 1-2))
+ local libdir=$(dirname ${libstatic})
+
+ einfo "Making ${soname} from ${libstatic}"
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
+ -Wl,-all_load -Wl,${libstatic} \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ else
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -shared -Wl,-soname=${soname} \
+ -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ [[ $(get_version_component_count) -gt 1 ]] && \
+ ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version))
+ ln -s ${soname} ${libdir}/${libname}$(get_libname)
+ fi
+}
+
+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 -lmagmablas
+ Libs.private: -lm -lpthread -ldl -lcublas -lcudart
+ Cflags: -I\${includedir}
+ Requires: cblas lapack
+ EOF
+}
+
+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_ --compiler-options '-fPIC ${CFLAGS}' -DUNIX
+ 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
+}
+
+src_test() {
+ emake test lapacktest
+ cd testing/lin
+ # we need to access this while running the tests
+ addwrite /dev/nvidiactl
+ addwrite /dev/nvidia0
+ LD_LIBRARY_PATH=${S}/lib python 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
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-libs/magma/
@ 2013-01-03 0:20 Sebastien Fabbro
0 siblings, 0 replies; 5+ messages in thread
From: Sebastien Fabbro @ 2013-01-03 0:20 UTC (permalink / raw
To: gentoo-commits
commit: 65ab29bccf9dbc4128c79f678ca38ac3d20e81e6
Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 3 00:19:20 2013 +0000
Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Thu Jan 3 00:19:20 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=65ab29bc
sci-libs/magma: Fixed URL, thanks James Cloos
Package-Manager: portage-2.2.01.21476-prefix
---
sci-libs/magma/ChangeLog | 5 ++++-
sci-libs/magma/magma-1.3.0.ebuild | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/sci-libs/magma/ChangeLog b/sci-libs/magma/ChangeLog
index 0039878..ac3ec70 100644
--- a/sci-libs/magma/ChangeLog
+++ b/sci-libs/magma/ChangeLog
@@ -1,7 +1,10 @@
# ChangeLog for sci-libs/magma
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 03 Jan 2013; Sébastien Fabbro <bicatali@gentoo.org> magma-1.3.0.ebuild:
+ sci-libs/magma: Fixed URL, thanks James Cloos
+
*magma-1.3.0 (28 Dec 2012)
28 Dec 2012; Olivier Huber <oli.huber@gmail.com> +magma-1.3.0.ebuild,
diff --git a/sci-libs/magma/magma-1.3.0.ebuild b/sci-libs/magma/magma-1.3.0.ebuild
index 7a413f5..1e645c1 100644
--- a/sci-libs/magma/magma-1.3.0.ebuild
+++ b/sci-libs/magma/magma-1.3.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
@@ -9,7 +9,7 @@ inherit eutils fortran-2 toolchain-funcs versionator multilib
DESCRIPTION="Matrix Algebra on GPU and Multicore Architectures"
HOMEPAGE="http://icl.cs.utk.edu/magma/"
-SRC_URI="http://icl.cs.utk.edu/projectsfiles/${PN}/${P}.tar.gz"
+SRC_URI="http://icl.cs.utk.edu/projectsfiles/${PN}/pubs/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] proj/sci:master commit in: sci-libs/magma/
@ 2012-07-12 20:43 Sebastien Fabbro
0 siblings, 0 replies; 5+ messages in thread
From: Sebastien Fabbro @ 2012-07-12 20:43 UTC (permalink / raw
To: gentoo-commits
commit: ae684d0dec8e6746c5e3ce7e685fe4019b32163d
Author: Sebastien Fabbro <sfabbro <AT> uvic <DOT> ca>
AuthorDate: Thu Jul 12 19:03:37 2012 +0000
Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Thu Jul 12 19:03:37 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=ae684d0d
sci-libs/magma: Shared library fixes, prefix love and ebuild cleanup
(Portage version: 2.2.01.20757-prefix/git/Linux x86_64, RepoMan options: --force, unsigned Manifest commit)
---
sci-libs/magma/ChangeLog | 4 ++-
sci-libs/magma/magma-1.2.1.ebuild | 41 +++++++++++++++++++++++-------------
2 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/sci-libs/magma/ChangeLog b/sci-libs/magma/ChangeLog
index 460bde8..fce27ef 100644
--- a/sci-libs/magma/ChangeLog
+++ b/sci-libs/magma/ChangeLog
@@ -2,6 +2,9 @@
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 12 Jul 2012; Sébastien Fabbro <bicatali@gentoo.org> magma-1.2.1.ebuild:
+ sci-libs/magma: Shared library fixes, prefix love and ebuild cleanup
+
*magma-1.2.1 (03 Jul 2012)
03 Jul 2012; Sébastien Fabbro <bicatali@gentoo.org>
@@ -18,4 +21,3 @@
+files/magma-1.2.0-duplicate-symbols.patch, +magma-1.2.0.ebuild,
+metadata.xml:
sci-libs/magma: Initial import
-
diff --git a/sci-libs/magma/magma-1.2.1.ebuild b/sci-libs/magma/magma-1.2.1.ebuild
index 65b822c..9710870 100644
--- a/sci-libs/magma/magma-1.2.1.ebuild
+++ b/sci-libs/magma/magma-1.2.1.ebuild
@@ -5,7 +5,7 @@
EAPI=4
FORTRAN_STANDARD="77 90"
-inherit eutils fortran-2 toolchain-funcs versionator
+inherit eutils fortran-2 toolchain-funcs versionator multilib
DESCRIPTION="Matrix Algebra on GPU and Multicore Architectures"
HOMEPAGE="http://icl.cs.utk.edu/magma/"
@@ -18,21 +18,32 @@ IUSE="fermi static-libs tesla"
RDEPEND="dev-util/nvidia-cuda-toolkit
virtual/cblas
+ virtual/fortran
virtual/lapack"
DEPEND="${RDEPEND}
virtual/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%.*}"
+static_to_shared() {
+ local libstatic=${1}; shift
+ local libname=$(basename ${libstatic%.a})
+ local soname=${libname}$(get_libname $(get_version_component_range 1-2))
+ local libdir=$(dirname ${libstatic})
+
+ einfo "Making ${soname} from ${libstatic}"
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
+ -Wl,-all_load -Wl,${libstatic} \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ else
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} \
+ -shared -Wl,-soname=${soname} \
+ -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
+ "$@" -o ${libdir}/${soname} || die "${soname} failed"
+ [[ $(get_version_component_count) -gt 1 ]] && \
+ ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version))
+ ln -s ${soname} ${libdir}/${libname}$(get_libname)
+ fi
}
src_prepare() {
@@ -85,8 +96,8 @@ src_configure() {
src_compile() {
emake lib
- make_shared_lib lib/libmagma.a
- make_shared_lib lib/libmagmablas.a
+ static_to_shared lib/libmagma.a -lm -lpthread -ldl -lcublas -lcudart
+ LINK=$(tc-getFC) static_to_shared lib/libmagmablas.a -lm -lpthread -ldl -lcublas -lcudart
if use static-libs; then
emake cleanall
sed 's/-fPIC//g' make.inc
@@ -101,7 +112,7 @@ src_test() {
}
src_install() {
- dolib.so lib/lib*.so*
+ dolib.so lib/lib*$(get_libname)*
use static-libs && dolib.a lib/lib*.a
insinto /usr/include/${PN}
doins include/*.h
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-12-28 18:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-03 0:20 [gentoo-commits] proj/sci:master commit in: sci-libs/magma/ Sebastien Fabbro
-- strict thread matches above, loose matches on Subject: below --
2013-12-28 18:59 Justin Lecher
2013-11-18 8:01 Justin Lecher
2013-01-03 0:20 Sebastien Fabbro
2012-07-12 20:43 Sebastien Fabbro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox