diff options
author | Markus Dittrich <markusle@gentoo.org> | 2008-06-06 22:35:17 +0000 |
---|---|---|
committer | Markus Dittrich <markusle@gentoo.org> | 2008-06-06 22:35:17 +0000 |
commit | 2341825932fb7620ee79075132f8240a90236dfd (patch) | |
tree | 8cfa54584d9bd61ea48d53b3af58faee393e584a /sci-libs/blas-atlas | |
parent | Initial commit for bug 162260. Ebuild partly by Mark Silinio. (diff) | |
download | historical-2341825932fb7620ee79075132f8240a90236dfd.tar.gz historical-2341825932fb7620ee79075132f8240a90236dfd.tar.bz2 historical-2341825932fb7620ee79075132f8240a90236dfd.zip |
New revision with added performance critical upstream patch.
Package-Manager: portage-2.1.5.4
Diffstat (limited to 'sci-libs/blas-atlas')
-rw-r--r-- | sci-libs/blas-atlas/ChangeLog | 8 | ||||
-rw-r--r-- | sci-libs/blas-atlas/Manifest | 4 | ||||
-rw-r--r-- | sci-libs/blas-atlas/blas-atlas-3.8.1-r1.ebuild | 222 | ||||
-rw-r--r-- | sci-libs/blas-atlas/files/blas-atlas-3.8.1-gemm-perf-fix.patch | 14 |
4 files changed, 246 insertions, 2 deletions
diff --git a/sci-libs/blas-atlas/ChangeLog b/sci-libs/blas-atlas/ChangeLog index ed5b1f609bac..0e49d8734db9 100644 --- a/sci-libs/blas-atlas/ChangeLog +++ b/sci-libs/blas-atlas/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/blas-atlas # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/ChangeLog,v 1.78 2008/06/04 13:09:55 markusle Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/ChangeLog,v 1.79 2008/06/06 22:35:16 markusle Exp $ + +*blas-atlas-3.8.1-r1 (06 Jun 2008) + + 06 Jun 2008; Markus Dittrich <markusle@gentoo.org> + +files/blas-atlas-3.8.1-gemm-perf-fix.patch, +blas-atlas-3.8.1-r1.ebuild: + New revision with added performance critical upstream patch. 04 Jun 2008; Markus Dittrich <markusle@gentoo.org> blas-atlas-3.8.1.ebuild: diff --git a/sci-libs/blas-atlas/Manifest b/sci-libs/blas-atlas/Manifest index 53d694ee3902..aaee657a5bb7 100644 --- a/sci-libs/blas-atlas/Manifest +++ b/sci-libs/blas-atlas/Manifest @@ -4,6 +4,7 @@ AUX 3.7.11-ppc-configure.patch 467 RMD160 677632d42ad38c49aec1584fab8f4f5609b55f AUX atlas-3.7.39-decl-fix.patch 2791 RMD160 b84743fb2f255719197f7481c8826e7b2360044f SHA1 80008056fcafdbefb9e3538ef962c93d5a0df1ca SHA256 d5a8c69c2e196e946c61003b6bf3088b05a6b13b428efa8be8ef7eb54bdf3670 AUX atlas-asm-gentoo.patch 408 RMD160 3cea2f4a5a96ec22a4d0cfc78d691198a2d1a0da SHA1 493d066be68c66cca1f0c906d588da8983ec7afa SHA256 00f9247d422c758ef8ff43446a36a6dbb7962f94e5d01307318c87a90a78355b AUX blas-atlas-3.8.1-gemm-fix.patch 632 RMD160 bbc3e9db1d8b8e7199d65ecc04ca98ce73694d42 SHA1 43d4c86a065a8da760a8ff06bf9b969043329b96 SHA256 50a6fce8c3e712130c3de9cb97f796862ff6df72f2659232c3e0bf871c2fe49d +AUX blas-atlas-3.8.1-gemm-perf-fix.patch 527 RMD160 b9edf7508bdcdd3084ac594f826e9adb04220d42 SHA1 5119041fe772fe214685261e9a1fdb30fadd4d14 SHA256 cef6f99d8946a2c04ce08d9136fc034ffa36ed8b90b9698833c31fc9a771a802 AUX blas.pc.in 301 RMD160 e82627c38aa09c8eb2581a4dd8a38c1670ed6098 SHA1 e8c80353ba72bee2848767b70f7575b723b84f15 SHA256 cb993e61b03514c4c69fac43540e45e759cf57635e2a8d6900118543d06ff433 AUX c-ATLAS 497 RMD160 1bca887c53b7132f434a8e6e023721a7a7d6e567 SHA1 8dc57e828646aaa1d2de089a187c7b69973bd9b4 SHA256 4d135a53bf4bce2a373f2154286876bbba5a78ccab48834e3db3a83714f224c8 AUX c-threaded-ATLAS 563 RMD160 410a2f15c4d0c210df778ef53cd15c2400b6a3d7 SHA1 b1e8b5cc85173cd2f5131836897f8b91b2b19e40 SHA256 d3334c1f222589c0ca7794576819b0d9c791d3c37ffac61a2270cb06aa3a8229 @@ -33,6 +34,7 @@ EBUILD blas-atlas-3.6.0-r2.ebuild 5012 RMD160 0daf679b711b18503ac70006a6f7210d89 EBUILD blas-atlas-3.7.11-r1.ebuild 5680 RMD160 66aea21ca1e39e2286f037a6f3471fa8d5232ea4 SHA1 22f6f2d9a5a26a86da185dd2c8be03d17f64449d SHA256 985af8fb77ab73ed6d1037a37a90ea063ffbab1ddd3b2e07ffc90366af389038 EBUILD blas-atlas-3.7.11.ebuild 5048 RMD160 c286cdd38ee471c6243495f78df23df1e835d1f0 SHA1 b45489f4818aa09fd63d355bc3ae18dd6fce3938 SHA256 460202e681da98b1d76fb2a64abbc6a4771e6e05d60ec4fdabb83bbea8643422 EBUILD blas-atlas-3.8.0.ebuild 6843 RMD160 1e105707051e2653aa7bd941f1f1192acda207f7 SHA1 ab4c92fdb97a9a46946948c0ca6287c8ad27a014 SHA256 fcabb010ad4c78711dd6ebaa932be315071ce465657106ee4cc122e14977672e +EBUILD blas-atlas-3.8.1-r1.ebuild 6776 RMD160 3ed14b318a241c04ec25edeae63300f9e0b7cc31 SHA1 3a6005c58749145cba60ea23e5ddd83ad1d72841 SHA256 9173e103f4cf94e0e0034b18ecf879c87e8c9418366d6a8e5af9f8a9164c7d47 EBUILD blas-atlas-3.8.1.ebuild 6726 RMD160 1fd8c7a473a171cb34f946a0c7e602e663ce8b1d SHA1 db9d580f1e5d664d826490e05b455ff120f4836d SHA256 696facd1cb59b25ee99359f5acf8b16f7ff54e4ab32c868f8010f047f82c50e0 -MISC ChangeLog 16268 RMD160 f5062b86e74331ebc78d1e7c3b124cedc2a6786f SHA1 c00cbc25c2cdb7437968e524f4add50327afd6ba SHA256 7cd784094396c01912839670b343d529280b9c49528508dceff4cbacb3f7b236 +MISC ChangeLog 16497 RMD160 3583f4e72d4788972a888f06d388137b2e3f5a05 SHA1 0c9357e387815454a098c70a74fa7fadad0d897c SHA256 561b4cf80f01ad4d4e059045766b298ba02142899ce3cec0db6666357aca9122 MISC metadata.xml 156 RMD160 dc078172bfebcb25d69bdf8731714f9cce9d3e36 SHA1 da2b240a255820145b7c83a5c48e45b96b7e9ee6 SHA256 5d22100902db7507a5b5493dd4a66cdb08025faf80a2c0b75e6392315c47f900 diff --git a/sci-libs/blas-atlas/blas-atlas-3.8.1-r1.ebuild b/sci-libs/blas-atlas/blas-atlas-3.8.1-r1.ebuild new file mode 100644 index 000000000000..f8b38b1f4d26 --- /dev/null +++ b/sci-libs/blas-atlas/blas-atlas-3.8.1-r1.ebuild @@ -0,0 +1,222 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/blas-atlas/blas-atlas-3.8.1-r1.ebuild,v 1.1 2008/06/06 22:35:16 markusle Exp $ + +inherit eutils toolchain-funcs fortran multilib + +PATCH_V="3.7.39" + +DESCRIPTION="Automatically Tuned Linear Algebra Software BLAS implementation" +HOMEPAGE="http://math-atlas.sourceforge.net/" +MY_PN=${PN/blas-/} +SRC_URI="mirror://sourceforge/math-atlas/${MY_PN}${PV}.tar.bz2 + mirror://gentoo/${MY_PN}-${PATCH_V}-shared-libs.patch.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" +IUSE="doc" + +RDEPEND="app-admin/eselect-blas + app-admin/eselect-cblas + doc? ( app-doc/blas-docs )" +DEPEND="app-admin/eselect-blas + app-admin/eselect-cblas + >=sys-devel/libtool-1.5" + +S="${WORKDIR}/ATLAS" + +pkg_setup() { + # icc won't compile (as of icc-10.0.026) + # and will blow out $PORTAGE_TMPDIR + if [[ $(tc-getCC) = icc* ]]; then + eerror "icc compiler is not supported with sci-libs/blas-atlas" + die "blas-atlas won't compile with icc" + fi + + FORTRAN="g77 gfortran ifc" + fortran_pkg_setup + echo + ewarn "Please make sure to disable CPU throttling completely" + ewarn "during the compile of blas-atlas. Otherwise, all atlas" + ewarn "generated timings will be completely random and the" + ewarn "performance of the resulting libraries will be degraded" + ewarn "considerably." + echo + ewarn "For users of <=gcc-4.1.1 only:" + ewarn "If you experience failing SANITY tests during" + ewarn "atlas' compile please try passing -mfpmath=387; this" + ewarn "option might also result in much better performance" + ewarn "than using then sse instruction set depending on your" + ewarn "CPU." + echo + epause 10 +} + +src_unpack() { + unpack ${A} + + cd "${S}" + epatch "${DISTDIR}"/${MY_PN}-${PATCH_V}-shared-libs.patch.bz2 + epatch "${FILESDIR}"/${MY_PN}-asm-gentoo.patch + epatch "${FILESDIR}"/${MY_PN}-${PATCH_V}-decl-fix.patch + epatch "${FILESDIR}"/${P}-gemm-fix.patch + epatch "${FILESDIR}"/${P}-gemm-perf-fix.patch + + BLD_DIR="${S}"/gentoo-build + mkdir "${BLD_DIR}" || die "failed to generate build directory" + cd "${BLD_DIR}" + cp "${FILESDIR}"/war . && chmod a+x war || die "failed to install war" + + local archselect= + if use amd64 || use ppc64; then + archselect="-b 64" + elif use alpha; then + archselect="" + else + archselect="-b 32" + fi + + ../configure \ + --cc="$(tc-getCC)" \ + --cflags="${CFLAGS}" \ + --prefix="${D}/${DESTTREE}" \ + --libdir="${D}/${DESTTREE}"/$(get_libdir)/atlas \ + --incdir="${D}/${DESTTREE}"/include \ + -C ac "$(tc-getCC)" -F ac "${CFLAGS}" \ + -C if ${FORTRANC} -F if "${FFLAGS:-'-O2'}" \ + -Ss pmake "\$(MAKE) ${MAKEOPTS}" \ + -Si cputhrchk 0 ${archselect} \ + || die "configure failed" +} + +src_compile() { + cd "${BLD_DIR}" + + # atlas does its own parallel builds + emake -j1 || die "emake failed" + + RPATH="${DESTTREE}"/$(get_libdir)/blas + make \ + LIBDIR=$(get_libdir) \ + RPATH="${RPATH}"/atlas \ + shared || die "failed to build shared libraries" + + # build shared libraries of threaded libraries if applicable + if [[ -d gentoo/libptcblas.a ]]; then + make \ + LIBDIR=$(get_libdir) \ + RPATH="${RPATH}"/threaded-atlas \ + ptshared || die "failed to build threaded shared libraries" + fi +} + +src_test() { + # make check does not work because + # we don't build lapack libs + for i in F77 C; do + einfo "Testing ${i} interface" + cd "${BLD_DIR}"/interfaces/blas/${i}/testing + make sanity_test || die "emake tests for ${i} failed" + if [[ -d "${BLD_DIR}"/gentoo/libptf77blas.a ]]; then + make ptsanity_test || die "emake tests threaded for ${i}failed" + fi + done + echo "Timing ATLAS" + cd "${BLD_DIR}" + emake time || die "emake time failed" +} + +src_install () { + dodir "${RPATH}"/atlas + cd "${BLD_DIR}"/gentoo/libs + cp -P libatlas* "${D}/${DESTTREE}"/$(get_libdir) \ + || die "Failed to install libatlas" + + # pkgconfig files + local extlibs="-lm" + local threadlibs + [[ ${FORTRANC} == gfortran ]] && extlibs="${extlibs} -lgfortran" + [[ ${FORTRANC} == g77 ]] && extlibs="${extlibs} -lg2c" + cp "${FILESDIR}"/blas.pc.in blas.pc + cp "${FILESDIR}"/cblas.pc.in cblas.pc + sed -i \ + -e "s:@LIBDIR@:$(get_libdir):" \ + -e "s:@PV@:${PV}:" \ + -e "s:@EXTLIBS@:${extlibs}:g" \ + -e "s:@THREADLIBS@:${threadlibs}:g" \ + *blas.pc || die "sed *blas.pc failed" + + cp -P *blas* "${D}/${RPATH}"/atlas \ + || die "Failed to install blas/cblas" + + ESELECT_PROF=atlas + eselect blas add $(get_libdir) "${FILESDIR}"/eselect.blas.atlas ${ESELECT_PROF} + eselect cblas add $(get_libdir) "${FILESDIR}"/eselect.cblas.atlas ${ESELECT_PROF} + + if [[ -d "${BLD_DIR}"/gentoo/threaded-libs ]]; then + dodir "${RPATH}"/threaded-atlas + cd "${BLD_DIR}"/gentoo/threaded-libs + + # pkgconfig files + cp "${FILESDIR}"/blas.pc.in blas.pc + cp "${FILESDIR}"/cblas.pc.in cblas.pc + threadlibs="-lpthread" + sed -i \ + -e "s:@LIBDIR@:$(get_libdir):" \ + -e "s:@PV@:${PV}:" \ + -e "s:@EXTLIBS@:${extlibs}:g" \ + -e "s:@THREADLIBS@:${threadlibs}:g" \ + *blas.pc || die "sed *blas.pc failed" + + cp -P * "${D}/${RPATH}"/threaded-atlas \ + || die "Failed to install threaded atlas" + ESELECT_PROF=atlas-threads + + eselect blas add $(get_libdir) "${FILESDIR}"/eselect.blas.threaded-atlas ${ESELECT_PROF} + eselect cblas add $(get_libdir) "${FILESDIR}"/eselect.cblas.threaded-atlas ${ESELECT_PROF} + fi + + insinto "${DESTTREE}"/include/atlas + doins \ + "${S}"/include/cblas.h \ + "${S}"/include/atlas_misc.h \ + "${S}"/include/atlas_enum.h \ + || die "failed to install headers" + + # These headers contain the architecture-specific + # optimizations determined by ATLAS. The atlas-lapack build + # is much shorter if they are available, so save them: + doins "${BLD_DIR}"/include/*.h \ + || die "failed to install timing headers" + + # some docs + cd "${S}"/doc + dodoc INDEX.txt AtlasCredits.txt ChangeLog || die "dodoc failed" + # atlas specific doc (blas generic docs installed by blas-docs) + if use doc; then + insinto /usr/share/doc/${PF} + doins atlas*pdf cblasqref.pdf || die "doins docs failed" + fi +} + +pkg_postinst() { + for p in blas cblas; do + local current_p=$(eselect ${p} show | cut -d' ' -f2) + # this snippet works around the eselect bug #189942 and makes + # sure that users upgrading from a previous blas-atlas + # version pick up the new pkg-config files + if [[ ${current_p} == ${ESELECT_PROF} \ + || ${current_p} == "threaded-atlas" \ + || -z ${current_p} ]]; then + local configfile="${ROOT}"/etc/env.d/${p}/$(get_libdir)/config + [[ -e ${configfile} ]] && rm -f ${configfile} + eselect ${p} set ${ESELECT_PROF} + elog "${p} has been eselected to ${ESELECT_PROF}" + else + elog "Current eselected ${p} is ${current_p}" + elog "To use the ${p} ${ESELECT_PROF} implementation, you have to issue (as root):" + elog "\t eselect ${p} set ${ESELECT_PROF}" + fi + done +} diff --git a/sci-libs/blas-atlas/files/blas-atlas-3.8.1-gemm-perf-fix.patch b/sci-libs/blas-atlas/files/blas-atlas-3.8.1-gemm-perf-fix.patch new file mode 100644 index 000000000000..8afa7c7692c9 --- /dev/null +++ b/sci-libs/blas-atlas/files/blas-atlas-3.8.1-gemm-perf-fix.patch @@ -0,0 +1,14 @@ +diff -Naur ATLAS/src/blas/gemm/ATL_gemmXX.c ATLAS.new/src/blas/gemm/ATL_gemmXX.c +--- ATLAS/src/blas/gemm/ATL_gemmXX.c 2008-02-22 11:38:58.000000000 -0500 ++++ ATLAS.new/src/blas/gemm/ATL_gemmXX.c 2008-06-06 16:32:31.000000000 -0400 +@@ -188,10 +188,6 @@ + mm2 = mm1; + mm1 = Mjoin(PATL,mmJITcp); + } +- { +- mm2 = mm1; +- mm1 = Mjoin(PATL,mmJITcp); +- } + #endif + #ifdef SMALLK_MM + if (ATL_OOM Mjoin(PATL,mmJKI)(ETA, ETB, M, N, K, alpha, A, lda, B, ldb, |