From 50ba968aa7ad832b5f7b3b6cf29550ad3b0f0711 Mon Sep 17 00:00:00 2001 From: Sebastien Fabbro Date: Thu, 21 Aug 2008 16:20:31 +0000 Subject: Version bump. Removed mpi tests, buggy with GNU compilers. Package-Manager: portage-2.2_rc8/cvs/Linux 2.6.23-gentoo-r9 x86_64 --- sci-libs/mkl/ChangeLog | 9 +- sci-libs/mkl/Manifest | 16 +- sci-libs/mkl/metadata.xml | 20 +- sci-libs/mkl/mkl-10.0.2.018-r1.ebuild | 333 --------------------------------- sci-libs/mkl/mkl-10.0.3.020-r2.ebuild | 333 --------------------------------- sci-libs/mkl/mkl-10.0.4.023.ebuild | 343 ++++++++++++++++++++++++++++++++++ 6 files changed, 368 insertions(+), 686 deletions(-) delete mode 100644 sci-libs/mkl/mkl-10.0.2.018-r1.ebuild delete mode 100644 sci-libs/mkl/mkl-10.0.3.020-r2.ebuild create mode 100644 sci-libs/mkl/mkl-10.0.4.023.ebuild (limited to 'sci-libs/mkl') diff --git a/sci-libs/mkl/ChangeLog b/sci-libs/mkl/ChangeLog index 0f85c13432a3..1507279cd2ab 100644 --- a/sci-libs/mkl/ChangeLog +++ b/sci-libs/mkl/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-libs/mkl # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/ChangeLog,v 1.34 2008/08/07 08:52:52 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/ChangeLog,v 1.35 2008/08/21 16:20:31 bicatali Exp $ + +*mkl-10.0.4.023 (21 Aug 2008) + + 21 Aug 2008; Sébastien Fabbro + -mkl-10.0.2.018-r1.ebuild, -mkl-10.0.3.020-r2.ebuild, + +mkl-10.0.4.023.ebuild: + Version bump. Removed mpi tests, buggy with GNU compilers. 07 Aug 2008; Ulrich Mueller metadata.xml: Add USE flag description to metadata wrt GLEP 56. diff --git a/sci-libs/mkl/Manifest b/sci-libs/mkl/Manifest index c6d20226f638..01fe74e5a087 100644 --- a/sci-libs/mkl/Manifest +++ b/sci-libs/mkl/Manifest @@ -9,18 +9,18 @@ AUX mkl-10.0.2.018-tests.patch 528 RMD160 15f11a38567bd533626008fce62e6021372bfc DIST l_mkl_enh_p_9.1.023.tgz 316915220 RMD160 afdcb8ef28053e9ee5b1a3f8b9e6126c58b94f4b SHA1 9b03333627ab69cf9139838444e6e43d0b7404c8 SHA256 609ba57261b4959dfc8e6e56959f93ff7dba7b568ca5c80e09f4013df0207106 DIST l_mkl_p_10.0.2.018.tgz 227440983 RMD160 0c28416597ef917328193fa0c6403d7c0e7b971d SHA1 1aa8c47701b142ab52ebcda27fdda4c5d0903471 SHA256 311d2885a33d553a2d1b1370eed1e3e9bccc246f2dcd20e3558ed492443ba20f DIST l_mkl_p_10.0.3.020.tgz 229735507 RMD160 305b6e5ad2e85434ffc1ad6c317bf20aca4d6a44 SHA1 9e2eba991ad74c336002a27e85b5ec17611ae02b SHA256 5d2ec881db3fd33e6ada301a7a13b435be23aa5b0a81858d9c143207411fe17c +DIST l_mkl_p_10.0.4.023.tgz 230397555 RMD160 408b537c82cb5b252c04273fbe1c4afab851305e SHA1 17658e75eda6104c9460423c473ee73aae5f26e0 SHA256 ba227e84bc3d959d4fa49f74f7abed81ba610c6c24349e3868e309aba918b4eb DIST l_mkl_p_9.1.023.tgz 155907883 RMD160 f5d34a170c77fe9929daf6a83bade6d845ada2ad SHA1 52693b9aca15d43a890af92e0686b651834baace SHA256 7315e35a48b8cbe5af4cdcd24b2ccbd3971048b40e965ccaf9b4d655d98bdecd -EBUILD mkl-10.0.2.018-r1.ebuild 9310 RMD160 29c384751d12d9901ab11df602a26a9c986fd16e SHA1 2d72f894f63a9f161796bf5741a6fec3caa46b7e SHA256 80129db3bc3b5e98c3d92ee792f639d1fa3bcc9247f5e2cf8d4d0b69d742656b EBUILD mkl-10.0.2.018-r2.ebuild 9793 RMD160 73a4ac6389095c39aebe06651cc8430de725aef1 SHA1 c63e309a05bfba3dc1bc4ade4792080b4201ac57 SHA256 8953adb2c868835258cef8fc584c92e2496db6ec60d3fb662bb499ff3cc07652 -EBUILD mkl-10.0.3.020-r2.ebuild 9335 RMD160 08cc2c34425facf2d49c8eab6b723030b3d4d64b SHA1 eef042c0224341746331c233808191c98ec082b0 SHA256 15d43aec314ca4a639a04f640a3b85f4577b1d7a333257cae8ca8cb3902d3241 EBUILD mkl-10.0.3.020-r3.ebuild 9818 RMD160 c69c6660f484b75334f78ec57d2fcd23f7f2fb13 SHA1 793f4780b3ef00b1e9b3f5bf7817c8062c26cf46 SHA256 1d182fea0285615cd04248990274d92431fefbbd6d92c214dca35c694e8599fd +EBUILD mkl-10.0.4.023.ebuild 9772 RMD160 06bc5438e9db6e4d3f6a618f165f7fa8bac238b8 SHA1 48c2ea6f3f5053e9a245e208ad452bc06c1bcfe4 SHA256 32003c833df66a7e5bf78723fe9e050ce065ab415f6fff1467fb86fdc21194aa EBUILD mkl-9.1.023.ebuild 8872 RMD160 3539b73652a2e379eef8efe63a0b64268fcc5b20 SHA1 57325ba951894aa29062430afa615e19aa541c4c SHA256 b4f582c99b7cda4e26b329a19a9300416c3fc2a5295dde3c22233aff6732857b -MISC ChangeLog 7651 RMD160 d0d28bac71c4a50e74e21d3e6041303faaa03581 SHA1 6be2d499edfa61ad931c65a7b0ae1d395145099c SHA256 bc346f72d19d585f7079b7f84aa54af435b126790c2f823e14b234f74d6ee6b3 -MISC metadata.xml 896 RMD160 35f80f26dc8de59f763d564fc33e1ed27b8228c8 SHA1 2093988016baba041511f114913cdd129f8bcbc5 SHA256 eba016ebb8eac4b1dbccac89896e0a0ad2f59a4a4a529e9e4efac6d9114a68d4 +MISC ChangeLog 7886 RMD160 219b414130cd516fadb05e99bf03c20d85663f1f SHA1 b72e80f22d5b96a9b6bd4180d8fac8635f13f45e SHA256 fcd46924b079dbbc8811607fe0e02345c743fb97378eeaef304d47e6859da4ff +MISC metadata.xml 858 RMD160 40285d03152575e5d0cb91abc9fb61c1af3e7abc SHA1 88f8f122cfdf350a8fcff81f72b2c056438ffe37 SHA256 fcff9afd76b48ea7e812ea8a32a78ab8325379ce28e0893032d46c06d00a5a8a -----BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.9 (GNU/Linux) +Version: GnuPG v2.0.9 (GNU/Linux) -iEYEARECAAYFAkiat/UACgkQOeoy/oIi7uxbtwCgpWhqJAZJIZaiNt/424FpWPUm -ytcAoKC3av3TSTCFAw2yy3vhIQtszhDf -=00XY +iEYEARECAAYFAkitlhIACgkQ1ycZbhPLE2DJwwCgmdgQ1hK/YOsROfIhovf1yR2i +lYgAni2AHSiXofs8tRopYCpSJeBTW+VD +=zA4l -----END PGP SIGNATURE----- diff --git a/sci-libs/mkl/metadata.xml b/sci-libs/mkl/metadata.xml index ca1dcdbd9610..ad6bce739874 100644 --- a/sci-libs/mkl/metadata.xml +++ b/sci-libs/mkl/metadata.xml @@ -3,18 +3,16 @@ sci -The Intel(R) Math Kernel Library is a mathematical library mostly -optimized for Intel processors (also works on AMDs). It contains BLAS -and LAPACK implementations, Fast Fourier Transforms, a vector math -library, and random number generators. It also has multiprocessor -capacities. The package is installed as binary and has a restrictive -license. Please see license terms and home page for proper use. + The Intel(R) Math Kernel Library is a mathematical library mostly + optimized for Intel processors (also works on AMDs). It contains BLAS + and LAPACK implementations, Fast Fourier Transforms, a vector math + library, and random number generators. It also has multiprocessor + capacities. The package is installed as binary and has a restrictive + license. Please see license terms and home page for proper use. - Build static FORTRAN 95 BLAS/LAPACK interface - Install the 64 bits integer library (double package size) - - Install the serial (as non-threaded) libraries as well, - double package size + Installs the BLAS/LAPACK FORTRAN95 static libraries + Installs the 64 bits integer libraries + Installs the serial (as non-threaded) libraries diff --git a/sci-libs/mkl/mkl-10.0.2.018-r1.ebuild b/sci-libs/mkl/mkl-10.0.2.018-r1.ebuild deleted file mode 100644 index 1b8ace8fe9e9..000000000000 --- a/sci-libs/mkl/mkl-10.0.2.018-r1.ebuild +++ /dev/null @@ -1,333 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/mkl-10.0.2.018-r1.ebuild,v 1.3 2008/07/13 18:13:16 bicatali Exp $ - -inherit eutils toolchain-funcs fortran check-reqs - -PID=967 -PB=${PN} -DESCRIPTION="Intel(R) Math Kernel Library: linear algebra, fft, math functions" -HOMEPAGE="http://developer.intel.com/software/products/mkl/" - -KEYWORDS="~amd64 ~ia64 ~x86" -SRC_URI="http://registrationcenter-download.intel.com/irc_nas/${PID}/l_${PN}_p_${PV}.tgz" - -#slotting not yet supported (need eselect-mkl) -#MAJOR=$(get_major_version ${PV}) -#MINOR=$(get_version_component_range 2 ${PV}) -#SLOT="${MAJOR}.${MINOR}" - -SLOT="0" -LICENSE="Intel-SDP" - -IUSE="doc fftw fortran95 int64 mpi" -RESTRICT="strip mirror" - -DEPEND="app-admin/eselect-blas - app-admin/eselect-cblas - app-admin/eselect-lapack" - -RDEPEND="${DEPEND} - doc? ( app-doc/blas-docs app-doc/lapack-docs ) - mpi? ( virtual/mpi )" - -MKL_DIR=/opt/intel/${PN}/${PV} -INTEL_LIC_DIR=/opt/intel/licenses - -pkg_setup() { - # Check the license - if [[ -z ${MKL_LICENSE} ]]; then - MKL_LICENSE="$(grep -ls MKern ${ROOT}${INTEL_LIC_DIR}/* | tail -n 1)" - MKL_LICENSE=${MKL_LICENSE/${ROOT}/} - fi - if [[ -z ${MKL_LICENSE} ]]; then - eerror "Did not find any valid mkl license." - eerror "Register at ${HOMEPAGE} to receive a license" - eerror "and place it in ${INTEL_LIC_DIR} or run:" - eerror "export MKL_LICENSE=/my/license/file emerge mkl" - die "license setup failed" - fi - - # Check if we have enough free diskspace to install - CHECKREQS_DISK_BUILD="1100" - check_reqs - - # Check and setup fortran - FORTRAN="gfortran ifc g77" - use int64 && FORTRAN="gfortran ifc" - if use fortran95; then - FORTRAN="gfortran ifc" - # blas95 and lapack95 don't compile with gfortran < 4.2 - [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] && FORTRAN="ifc" - fi - fortran_pkg_setup - MKL_FC="gnu" - [[ ${FORTRANC} == if* ]] && MKL_FC="intel" - - # build profiles according to what compiler is installed - MKL_CC="gnu" - [[ $(tc-getCC) == icc ]] && MKL_CC="intel" - - if has_version sys-cluster/mpich; then - MKL_MPI=mpich - elif has_version sys-cluster/mpich2; then - MKL_MPI=mpich2 - elif has_version sys-cluster/openmpi; then - MKL_MPI=openmpi - elif has_version sys-cluster/lam-mpi; then - MKL_MPI=lam-mpi - else - MKL_MPI=intelmpi - fi -} - -src_unpack() { - - unpack ${A} - cd l_${PN}_*_${PV}/install - - cp ${MKL_LICENSE} "${WORKDIR}"/ - MKL_LIC="$(basename ${MKL_LICENSE})" - - # binary blob extractor installs rpm leftovers in /opt/intel - addwrite /opt/intel - # undocumented features: INSTALLMODE_mkl=NONRPM - - # We need to install mkl non-interactively. - # If things change between versions, first do it interactively: - # tar xf l_*; ./install.sh --duplicate mkl.ini; - # The file will be instman/mkl.ini - # Then check it and modify the ebuild-created one below - # --norpm is required to be able to install 10.x - cat > mkl.ini <<-EOF - [MKL] - EULA_ACCEPT_REJECT=ACCEPT - FLEXLM_LICENSE_LOCATION=${WORKDIR}/${MKL_LIC} - INSTALLMODE_mkl=NONRPM - INSTALL_DESTINATION=${S} - EOF - einfo "Extracting ..." - ./install \ - --silent ./mkl.ini \ - --installpath "${S}" \ - --log log.txt &> /dev/null - - if [[ -z $(find "${S}" -name libmkl.so) ]]; then - eerror "Could not find extracted files" - eerror "See ${PWD}/log.txt to see why" - die "extracting failed" - fi - # remove left over - rm -f /opt/intel/.*mkl*.log /opt/intel/intel_sdp_products.db - - # remove unused stuff and set up intel names - rm -rf "${WORKDIR}"/l_* - - cd "${S}" - # allow openmpi to work - epatch "${FILESDIR}"/${P}-openmpi.patch - # make scalapack tests work for gfortran - epatch "${FILESDIR}"/${P}-tests.patch - case ${ARCH} in - x86) MKL_ARCH=32 - MKL_KERN=ia32 - rm -rf lib*/{em64t,64} - ;; - - amd64) MKL_ARCH=em64t - MKL_KERN=em64t - rm -rf lib*/{32,64} - ;; - - ia64) MKL_ARCH=64 - MKL_KERN=ipf - rm -rf lib*/{32,em64t} - ;; - esac - MKL_LIBDIR=${MKL_DIR}/lib/${MKL_ARCH} -} - -src_compile() { - cd "${S}"/interfaces - if use fortran95; then - einfo "Compiling fortan95 static lib wrappers" - local myconf="lib${MKL_ARCH}" - [[ ${FORTRANC} == gfortran ]] && \ - myconf="${myconf} FC=gfortran" - if use int64; then - myconf="${myconf} interface=ilp64" - [[ ${FORTRANC} == gfortran ]] && \ - myconf="${myconf} FOPTS=-fdefault-integer-8" - fi - for x in blas95 lapack95; do - pushd ${x} - emake ${myconf} || die "emake ${x} failed" - popd - done - fi - - if use fftw; then - local fftwdirs="fftw2xc fftw2xf fftw3xc fftw3xf" - local myconf="lib${MKL_ARCH} compiler=${MKL_CC}" - if use mpi; then - fftwdirs="${fftwdirs} fftw2x_cdft" - myconf="${myconf} mpi=${MKL_MPI}" - fi - einfo "Compiling fftw static lib wrappers" - for x in ${fftwdirs}; do - pushd ${x} - emake ${myconf} || die "emake ${x} failed" - popd - done - fi -} - -src_test() { - cd "${S}"/tests - local myconf - local testdirs="blas cblas" - use int64 && myconf="${myconf} interface=ilp64" - if use mpi; then - testdirs="${testdirs} scalapack" - myconf="${myconf} mpi=${MKL_MPI}" - fi - for x in ${testdirs}; do - pushd ${x} - einfo "Testing ${x}" - emake \ - compiler=${MKL_FC} \ - ${myconf} \ - so${MKL_ARCH} \ - || die "emake ${x} failed" - popd - done -} - -mkl_make_generic_profile() { - cd "${S}" - # produce eselect files - # don't make them in FILESDIR, it changes every major version - cat > eselect.blas <<-EOF - ${MKL_LIBDIR}/libmkl_${MKL_KERN}.a /usr/@LIBDIR@/libblas.a - ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libblas.so - ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libblas.so.0 - EOF - cat > eselect.cblas <<-EOF - ${MKL_LIBDIR}/libmkl_${MKL_KERN}.a /usr/@LIBDIR@/libcblas.a - ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libcblas.so - ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libcblas.so.0 - ${MKL_DIR}/include/mkl_cblas.h /usr/include/cblas.h - EOF - cat > eselect.lapack <<-EOF - ${MKL_LIBDIR}/libmkl_lapack.a /usr/@LIBDIR@/liblapack.a - ${MKL_LIBDIR}/libmkl_lapack.so /usr/@LIBDIR@/liblapack.so - ${MKL_LIBDIR}/libmkl_lapack.so /usr/@LIBDIR@/liblapack.so.0 - EOF -} - -# usage: mkl_add_profile -mkl_add_profile() { - cd "${S}" - local prof=${1} - insinto ${MKL_LIBDIR} - for x in blas cblas lapack; do - cat > ${x}-${prof}.pc <<-EOF - prefix=${MKL_DIR} - libdir=${MKL_LIBDIR} - includedir=\${prefix}/include - Name: ${x} - Description: Intel(R) Math Kernel Library implementation of ${x} - Version: ${PV} - URL: ${HOMEPAGE} - Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core ${4} -lpthread - Cflags: -I\${includedir} - EOF - cp eselect.${x} eselect.${x}.${prof} - echo "${MKL_LIBDIR}/${x}-${prof}.pc /usr/@LIBDIR@/pkgconfig/${x}.pc" \ - >> eselect.${x}.${prof} - doins ${x}-${prof}.pc - eselect ${x} add $(get_libdir) eselect.${x}.${prof} ${prof} - done -} - -mkl_make_profiles() { - local clib - has_version 'dev-lang/ifc' && clib="intel" - built_with_use sys-devel/gcc fortran && clib="${clib} gf" - local slib="-lmkl_sequential" - local rlib="-liomp5" - for c in ${clib}; do - local ilib="-lmkl_${c}_lp64" - use x86 && ilib="-lmkl_${c}" - local tlib="-lmkl_${c/gf/gnu}_thread" - local comp="${c/gf/gfortran}" - comp="${comp/intel/ifort}" - mkl_add_profile mkl-${comp} ${ilib} ${slib} - mkl_add_profile mkl-${comp}-threads ${ilib} ${tlib} ${rlib} - if use int64; then - ilib="-lmkl_${c}_ilp64" - mkl_add_profile mkl-${comp}-int64 ${ilib} ${slib} - mkl_add_profile mkl-${comp}-threads-int64 ${ilib} ${tlib} ${rlib} - fi - done -} - -src_install() { - dodir ${MKL_DIR} - # upstream installs a link, no idea why - dosym ${MKL_DIR} ${MKL_DIR/mkl/cmkl} - - # install license - if [[ ! -f ${INTEL_LIC_DIR}/${MKL_LIC} ]]; then - insinto ${INTEL_LIC_DIR} - doins "${WORKDIR}"/${MKL_LIC} || die "install license failed" - fi - - # install main stuff: cp faster than doins - einfo "Installing files..." - local cpdirs="benchmarks doc examples include interfaces lib man tests" - local doinsdirs="tools" - cp -pPR ${cpdirs} "${D}"${MKL_DIR} \ - || die "installing mkl failed" - insinto ${MKL_DIR} - doins -r ${doinsdirs} || die "doins ${doinsdirs} failed" - dosym mkl_cblas.h ${MKL_DIR}/include/cblas.h - - # install blas/lapack profiles - mkl_make_generic_profile - mkl_make_profiles - - # install env variables - local env_file=35mkl - echo "LDPATH=${MKL_LIBDIR}" > ${env_file} - echo "MANPATH=${MKL_DIR}/man" >> ${env_file} - doenvd ${env_file} || die "doenvd failed" -} - -pkg_postinst() { - # if blas profile is mkl, set lapack and cblas profiles as mkl - local blas_lib=$(eselect blas show | cut -d' ' -f2) - local def_prof="mkl-gfortran-threads" - has_version 'dev-lang/ifc' && def_prof="mkl-ifort-threads" - use int64 && def_prof="${def_prof}-int64" - for x in blas cblas lapack; do - local current_lib=$(eselect ${x} show | cut -d' ' -f2) - if [[ -z ${current_lib} || \ - ${current_lib} == mkl* || \ - ${blas_lib} == mkl* ]]; then - # work around eselect bug #189942 - local configfile="${ROOT}"/etc/env.d/${x}/$(get_libdir)/config - [[ -e ${configfile} ]] && rm -f ${configfile} - eselect ${x} set ${def_prof} - elog "${x} has been eselected to ${def_prof}" - if [[ ${current_lib} != ${blas_lib} ]]; then - eselect blas set ${def_prof} - elog "${x} is now set to ${def_prof} for consistency" - fi - else - elog "Current eselected ${x} is ${current_lib}" - elog "To use one of mkl profiles, issue (as root):" - elog "\t eselect ${x} set " - fi - done -} diff --git a/sci-libs/mkl/mkl-10.0.3.020-r2.ebuild b/sci-libs/mkl/mkl-10.0.3.020-r2.ebuild deleted file mode 100644 index 01eeccbb7bfc..000000000000 --- a/sci-libs/mkl/mkl-10.0.3.020-r2.ebuild +++ /dev/null @@ -1,333 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/mkl-10.0.3.020-r2.ebuild,v 1.3 2008/07/13 18:13:16 bicatali Exp $ - -inherit eutils toolchain-funcs fortran check-reqs - -PID=1088 -PB=${PN} -DESCRIPTION="Intel(R) Math Kernel Library: linear algebra, fft, math functions" -HOMEPAGE="http://developer.intel.com/software/products/mkl/" - -KEYWORDS="~amd64 ~ia64 ~x86" -SRC_URI="http://registrationcenter-download.intel.com/irc_nas/${PID}/l_${PN}_p_${PV}.tgz" - -#slotting not yet supported (need eselect-mkl) -#MAJOR=$(get_major_version ${PV}) -#MINOR=$(get_version_component_range 2 ${PV}) -#SLOT="${MAJOR}.${MINOR}" - -SLOT="0" -LICENSE="Intel-SDP" - -IUSE="doc fftw fortran95 int64 mpi" -RESTRICT="strip mirror" - -DEPEND="app-admin/eselect-blas - app-admin/eselect-cblas - app-admin/eselect-lapack" - -RDEPEND="${DEPEND} - doc? ( app-doc/blas-docs app-doc/lapack-docs ) - mpi? ( virtual/mpi )" - -MKL_DIR=/opt/intel/${PN}/${PV} -INTEL_LIC_DIR=/opt/intel/licenses - -pkg_setup() { - # Check the license - if [[ -z ${MKL_LICENSE} ]]; then - MKL_LICENSE="$(grep -ls MKern ${ROOT}${INTEL_LIC_DIR}/* | tail -n 1)" - MKL_LICENSE=${MKL_LICENSE/${ROOT}/} - fi - if [[ -z ${MKL_LICENSE} ]]; then - eerror "Did not find any valid mkl license." - eerror "Register at ${HOMEPAGE} to receive a license" - eerror "and place it in ${INTEL_LIC_DIR} or run:" - eerror "export MKL_LICENSE=/my/license/file emerge mkl" - die "license setup failed" - fi - - # Check if we have enough free diskspace to install - CHECKREQS_DISK_BUILD="1100" - check_reqs - - # Check and setup fortran - FORTRAN="gfortran ifc g77" - use int64 && FORTRAN="gfortran ifc" - if use fortran95; then - FORTRAN="gfortran ifc" - # blas95 and lapack95 don't compile with gfortran < 4.2 - [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] && FORTRAN="ifc" - fi - fortran_pkg_setup - MKL_FC="gnu" - [[ ${FORTRANC} == if* ]] && MKL_FC="intel" - - # build profiles according to what compiler is installed - MKL_CC="gnu" - [[ $(tc-getCC) == icc ]] && MKL_CC="intel" - - if has_version sys-cluster/mpich; then - MKL_MPI=mpich - elif has_version sys-cluster/mpich2; then - MKL_MPI=mpich2 - elif has_version sys-cluster/openmpi; then - MKL_MPI=openmpi - elif has_version sys-cluster/lam-mpi; then - MKL_MPI=lam-mpi - else - MKL_MPI=intelmpi - fi -} - -src_unpack() { - - unpack ${A} - cd l_${PN}_*_${PV}/install - - cp ${MKL_LICENSE} "${WORKDIR}"/ - MKL_LIC="$(basename ${MKL_LICENSE})" - - # binary blob extractor installs rpm leftovers in /opt/intel - addwrite /opt/intel - # undocumented features: INSTALLMODE_mkl=NONRPM - - # We need to install mkl non-interactively. - # If things change between versions, first do it interactively: - # tar xf l_*; ./install.sh --duplicate mkl.ini; - # The file will be instman/mkl.ini - # Then check it and modify the ebuild-created one below - # --norpm is required to be able to install 10.x - cat > mkl.ini <<-EOF - [MKL] - EULA_ACCEPT_REJECT=ACCEPT - FLEXLM_LICENSE_LOCATION=${WORKDIR}/${MKL_LIC} - INSTALLMODE_mkl=NONRPM - INSTALL_DESTINATION=${S} - EOF - einfo "Extracting ..." - ./install \ - --silent ./mkl.ini \ - --installpath "${S}" \ - --log log.txt &> /dev/null - - if [[ -z $(find "${S}" -name libmkl.so) ]]; then - eerror "Could not find extracted files" - eerror "See ${PWD}/log.txt to see why" - die "extracting failed" - fi - # remove left over - rm -f /opt/intel/.*mkl*.log /opt/intel/intel_sdp_products.db - - # remove unused stuff and set up intel names - rm -rf "${WORKDIR}"/l_* - - cd "${S}" - # allow openmpi to work - epatch "${FILESDIR}"/${PN}-10.0.2.018-openmpi.patch - # make scalapack tests work for gfortran - epatch "${FILESDIR}"/${PN}-10.0.2.018-tests.patch - case ${ARCH} in - x86) MKL_ARCH=32 - MKL_KERN=ia32 - rm -rf lib*/{em64t,64} - ;; - - amd64) MKL_ARCH=em64t - MKL_KERN=em64t - rm -rf lib*/{32,64} - ;; - - ia64) MKL_ARCH=64 - MKL_KERN=ipf - rm -rf lib*/{32,em64t} - ;; - esac - MKL_LIBDIR=${MKL_DIR}/lib/${MKL_ARCH} -} - -src_compile() { - cd "${S}"/interfaces - if use fortran95; then - einfo "Compiling fortan95 static lib wrappers" - local myconf="lib${MKL_ARCH}" - [[ ${FORTRANC} == gfortran ]] && \ - myconf="${myconf} FC=gfortran" - if use int64; then - myconf="${myconf} interface=ilp64" - [[ ${FORTRANC} == gfortran ]] && \ - myconf="${myconf} FOPTS=-fdefault-integer-8" - fi - for x in blas95 lapack95; do - pushd ${x} - emake ${myconf} || die "emake ${x} failed" - popd - done - fi - - if use fftw; then - local fftwdirs="fftw2xc fftw2xf fftw3xc fftw3xf" - local myconf="lib${MKL_ARCH} compiler=${MKL_CC}" - if use mpi; then - fftwdirs="${fftwdirs} fftw2x_cdft" - myconf="${myconf} mpi=${MKL_MPI}" - fi - einfo "Compiling fftw static lib wrappers" - for x in ${fftwdirs}; do - pushd ${x} - emake ${myconf} || die "emake ${x} failed" - popd - done - fi -} - -src_test() { - cd "${S}"/tests - local myconf - local testdirs="blas cblas" - use int64 && myconf="${myconf} interface=ilp64" - if use mpi; then - testdirs="${testdirs} scalapack" - myconf="${myconf} mpi=${MKL_MPI}" - fi - for x in ${testdirs}; do - pushd ${x} - einfo "Testing ${x}" - emake \ - compiler=${MKL_FC} \ - ${myconf} \ - so${MKL_ARCH} \ - || die "emake ${x} failed" - popd - done -} - -mkl_make_generic_profile() { - cd "${S}" - # produce eselect files - # don't make them in FILESDIR, it changes every major version - cat > eselect.blas <<-EOF - ${MKL_LIBDIR}/libmkl_${MKL_KERN}.a /usr/@LIBDIR@/libblas.a - ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libblas.so - ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libblas.so.0 - EOF - cat > eselect.cblas <<-EOF - ${MKL_LIBDIR}/libmkl_${MKL_KERN}.a /usr/@LIBDIR@/libcblas.a - ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libcblas.so - ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libcblas.so.0 - ${MKL_DIR}/include/mkl_cblas.h /usr/include/cblas.h - EOF - cat > eselect.lapack <<-EOF - ${MKL_LIBDIR}/libmkl_lapack.a /usr/@LIBDIR@/liblapack.a - ${MKL_LIBDIR}/libmkl_lapack.so /usr/@LIBDIR@/liblapack.so - ${MKL_LIBDIR}/libmkl_lapack.so /usr/@LIBDIR@/liblapack.so.0 - EOF -} - -# usage: mkl_add_profile -mkl_add_profile() { - cd "${S}" - local prof=${1} - insinto ${MKL_LIBDIR} - for x in blas cblas lapack; do - cat > ${x}-${prof}.pc <<-EOF - prefix=${MKL_DIR} - libdir=${MKL_LIBDIR} - includedir=\${prefix}/include - Name: ${x} - Description: Intel(R) Math Kernel Library implementation of ${x} - Version: ${PV} - URL: ${HOMEPAGE} - Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core ${4} -lpthread - Cflags: -I\${includedir} - EOF - cp eselect.${x} eselect.${x}.${prof} - echo "${MKL_LIBDIR}/${x}-${prof}.pc /usr/@LIBDIR@/pkgconfig/${x}.pc" \ - >> eselect.${x}.${prof} - doins ${x}-${prof}.pc - eselect ${x} add $(get_libdir) eselect.${x}.${prof} ${prof} - done -} - -mkl_make_profiles() { - local clib - has_version 'dev-lang/ifc' && clib="intel" - built_with_use sys-devel/gcc fortran && clib="${clib} gf" - local slib="-lmkl_sequential" - local rlib="-liomp5" - for c in ${clib}; do - local ilib="-lmkl_${c}_lp64" - use x86 && ilib="-lmkl_${c}" - local tlib="-lmkl_${c/gf/gnu}_thread" - local comp="${c/gf/gfortran}" - comp="${comp/intel/ifort}" - mkl_add_profile mkl-${comp} ${ilib} ${slib} - mkl_add_profile mkl-${comp}-threads ${ilib} ${tlib} ${rlib} - if use int64; then - ilib="-lmkl_${c}_ilp64" - mkl_add_profile mkl-${comp}-int64 ${ilib} ${slib} - mkl_add_profile mkl-${comp}-threads-int64 ${ilib} ${tlib} ${rlib} - fi - done -} - -src_install() { - dodir ${MKL_DIR} - # upstream installs a link, no idea why - dosym ${MKL_DIR} ${MKL_DIR/mkl/cmkl} - - # install license - if [[ ! -f ${INTEL_LIC_DIR}/${MKL_LIC} ]]; then - insinto ${INTEL_LIC_DIR} - doins "${WORKDIR}"/${MKL_LIC} || die "install license failed" - fi - - # install main stuff: cp faster than doins - einfo "Installing files..." - local cpdirs="benchmarks doc examples include interfaces lib man tests" - local doinsdirs="tools" - cp -pPR ${cpdirs} "${D}"${MKL_DIR} \ - || die "installing mkl failed" - insinto ${MKL_DIR} - doins -r ${doinsdirs} || die "doins ${doinsdirs} failed" - dosym mkl_cblas.h ${MKL_DIR}/include/cblas.h - - # install blas/lapack profiles - mkl_make_generic_profile - mkl_make_profiles - - # install env variables - local env_file=35mkl - echo "LDPATH=${MKL_LIBDIR}" > ${env_file} - echo "MANPATH=${MKL_DIR}/man" >> ${env_file} - doenvd ${env_file} || die "doenvd failed" -} - -pkg_postinst() { - # if blas profile is mkl, set lapack and cblas profiles as mkl - local blas_lib=$(eselect blas show | cut -d' ' -f2) - local def_prof="mkl-gfortran-threads" - has_version 'dev-lang/ifc' && def_prof="mkl-ifort-threads" - use int64 && def_prof="${def_prof}-int64" - for x in blas cblas lapack; do - local current_lib=$(eselect ${x} show | cut -d' ' -f2) - if [[ -z ${current_lib} || \ - ${current_lib} == mkl* || \ - ${blas_lib} == mkl* ]]; then - # work around eselect bug #189942 - local configfile="${ROOT}"/etc/env.d/${x}/$(get_libdir)/config - [[ -e ${configfile} ]] && rm -f ${configfile} - eselect ${x} set ${def_prof} - elog "${x} has been eselected to ${def_prof}" - if [[ ${current_lib} != ${blas_lib} ]]; then - eselect blas set ${def_prof} - elog "${x} is now set to ${def_prof} for consistency" - fi - else - elog "Current eselected ${x} is ${current_lib}" - elog "To use one of mkl profiles, issue (as root):" - elog "\t eselect ${x} set " - fi - done -} diff --git a/sci-libs/mkl/mkl-10.0.4.023.ebuild b/sci-libs/mkl/mkl-10.0.4.023.ebuild new file mode 100644 index 000000000000..a91cabe40c90 --- /dev/null +++ b/sci-libs/mkl/mkl-10.0.4.023.ebuild @@ -0,0 +1,343 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/mkl/mkl-10.0.4.023.ebuild,v 1.1 2008/08/21 16:20:31 bicatali Exp $ + +inherit eutils toolchain-funcs fortran check-reqs + +PID=1194 +PB=${PN} +DESCRIPTION="Intel(R) Math Kernel Library: linear algebra, fft, math functions" +HOMEPAGE="http://developer.intel.com/software/products/mkl/" + +KEYWORDS="~amd64 ~ia64 ~x86" +SRC_URI="http://registrationcenter-download.intel.com/irc_nas/${PID}/l_${PN}_p_${PV}.tgz" + +SLOT="0" +LICENSE="Intel-SDP" + +IUSE="doc fftw fortran95 int64 mpi" +RESTRICT="strip mirror" + +DEPEND="app-admin/eselect-blas + app-admin/eselect-cblas + app-admin/eselect-lapack" + +RDEPEND="${DEPEND} + doc? ( app-doc/blas-docs app-doc/lapack-docs ) + mpi? ( virtual/mpi )" + +MKL_DIR=/opt/intel/${PN}/${PV} +INTEL_LIC_DIR=/opt/intel/licenses + +pkg_setup() { + # Check the license + if [[ -z ${MKL_LICENSE} ]]; then + MKL_LICENSE="$(grep -ls MKern ${ROOT}${INTEL_LIC_DIR}/* | tail -n 1)" + MKL_LICENSE=${MKL_LICENSE/${ROOT}/} + fi + if [[ -z ${MKL_LICENSE} ]]; then + eerror "Did not find any valid mkl license." + eerror "Register at ${HOMEPAGE} to receive a license" + eerror "and place it in ${INTEL_LIC_DIR} or run:" + eerror "export MKL_LICENSE=/my/license/file emerge mkl" + die "license setup failed" + fi + + # Check if we have enough free diskspace to install + CHECKREQS_DISK_BUILD="1100" + check_reqs + + # Check and setup fortran + FORTRAN="gfortran ifc g77" + use int64 && FORTRAN="gfortran ifc" + if use fortran95; then + FORTRAN="gfortran ifc" + # blas95 and lapack95 don't compile with gfortran < 4.2 + [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] && FORTRAN="ifc" + fi + fortran_pkg_setup + MKL_FC="gnu" + [[ ${FORTRANC} == if* ]] && MKL_FC="intel" + + # build profiles according to what compiler is installed + MKL_CC="gnu" + [[ $(tc-getCC) == icc ]] && MKL_CC="intel" + + if has_version sys-cluster/mpich; then + MKL_MPI=mpich + elif has_version sys-cluster/mpich2; then + MKL_MPI=mpich2 + elif has_version sys-cluster/openmpi; then + MKL_MPI=openmpi + elif has_version sys-cluster/lam-mpi; then + MKL_MPI=lam-mpi + else + MKL_MPI=intelmpi + fi +} + +src_unpack() { + + unpack ${A} + cd l_${PN}_*_${PV}/install + + cp ${MKL_LICENSE} "${WORKDIR}"/ + MKL_LIC="$(basename ${MKL_LICENSE})" + + # binary blob extractor installs rpm leftovers in /opt/intel + addwrite /opt/intel + # undocumented features: INSTALLMODE_mkl=NONRPM + + # We need to install mkl non-interactively. + # If things change between versions, first do it interactively: + # tar xf l_*; ./install.sh --duplicate mkl.ini; + # The file will be instman/mkl.ini + # Then check it and modify the ebuild-created one below + # --norpm is required to be able to install 10.x + cat > mkl.ini <<-EOF + [MKL] + EULA_ACCEPT_REJECT=ACCEPT + FLEXLM_LICENSE_LOCATION=${WORKDIR}/${MKL_LIC} + INSTALLMODE_mkl=NONRPM + INSTALL_DESTINATION=${S} + EOF + einfo "Extracting ..." + ./install \ + --silent ./mkl.ini \ + --installpath "${S}" \ + --log log.txt &> /dev/null + + if [[ -z $(find "${S}" -name libmkl.so) ]]; then + eerror "Could not find extracted files" + eerror "See ${PWD}/log.txt to see why" + die "extracting failed" + fi + # remove left over + rm -f /opt/intel/.*mkl*.log /opt/intel/intel_sdp_products.db + + # remove unused stuff and set up intel names + rm -rf "${WORKDIR}"/l_* + + cd "${S}" + # allow openmpi to work + epatch "${FILESDIR}"/${PN}-10.0.2.018-openmpi.patch + # make scalapack tests work for gfortran + #epatch "${FILESDIR}"/${PN}-10.0.2.018-tests.patch + case ${ARCH} in + x86) MKL_ARCH=32 + MKL_KERN=ia32 + rm -rf lib*/{em64t,64} + ;; + + amd64) MKL_ARCH=em64t + MKL_KERN=em64t + rm -rf lib*/{32,64} + ;; + + ia64) MKL_ARCH=64 + MKL_KERN=ipf + rm -rf lib*/{32,em64t} + ;; + esac + MKL_LIBDIR=${MKL_DIR}/lib/${MKL_ARCH} +} + +src_compile() { + cd "${S}"/interfaces + if use fortran95; then + einfo "Compiling fortan95 static lib wrappers" + local myconf="lib${MKL_ARCH}" + [[ ${FORTRANC} == gfortran ]] && \ + myconf="${myconf} FC=gfortran" + if use int64; then + myconf="${myconf} interface=ilp64" + [[ ${FORTRANC} == gfortran ]] && \ + myconf="${myconf} FOPTS=-fdefault-integer-8" + fi + for x in blas95 lapack95; do + pushd ${x} + emake ${myconf} || die "emake ${x} failed" + popd + done + fi + + if use fftw; then + local fftwdirs="fftw2xc fftw2xf fftw3xc fftw3xf" + local myconf="lib${MKL_ARCH} compiler=${MKL_CC}" + if use mpi; then + fftwdirs="${fftwdirs} fftw2x_cdft" + myconf="${myconf} mpi=${MKL_MPI}" + fi + einfo "Compiling fftw static lib wrappers" + for x in ${fftwdirs}; do + pushd ${x} + emake ${myconf} || die "emake ${x} failed" + popd + done + fi +} + +src_test() { + cd "${S}"/tests + local myconf + local testdirs="blas cblas" + use int64 && myconf="${myconf} interface=ilp64" + # buggy with g77 and gfortran + #if use mpi; then + # testdirs="${testdirs} scalapack" + # myconf="${myconf} mpi=${MKL_MPI}" + #fi + for x in ${testdirs}; do + pushd ${x} + einfo "Testing ${x}" + emake \ + compiler=${MKL_FC} \ + ${myconf} \ + so${MKL_ARCH} \ + || die "emake ${x} failed" + popd + done +} + +mkl_make_generic_profile() { + cd "${S}" + # produce eselect files + # don't make them in FILESDIR, it changes every major version + cat > eselect.blas <<-EOF + ${MKL_LIBDIR}/libmkl_${MKL_KERN}.a /usr/@LIBDIR@/libblas.a + ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libblas.so + ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libblas.so.0 + EOF + cat > eselect.cblas <<-EOF + ${MKL_LIBDIR}/libmkl_${MKL_KERN}.a /usr/@LIBDIR@/libcblas.a + ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libcblas.so + ${MKL_LIBDIR}/libmkl.so /usr/@LIBDIR@/libcblas.so.0 + ${MKL_DIR}/include/mkl_cblas.h /usr/include/cblas.h + EOF + cat > eselect.lapack <<-EOF + ${MKL_LIBDIR}/libmkl_lapack.a /usr/@LIBDIR@/liblapack.a + ${MKL_LIBDIR}/libmkl_lapack.so /usr/@LIBDIR@/liblapack.so + ${MKL_LIBDIR}/libmkl_lapack.so /usr/@LIBDIR@/liblapack.so.0 + EOF +} + +# usage: mkl_add_profile +mkl_add_profile() { + cd "${S}" + local prof=${1} + for x in blas cblas lapack; do + cat > ${x}-${prof}.pc <<-EOF + prefix=${MKL_DIR} + libdir=${MKL_LIBDIR} + includedir=\${prefix}/include + Name: ${x} + Description: Intel(R) Math Kernel Library implementation of ${x} + Version: ${PV} + URL: ${HOMEPAGE} + EOF + done + cat >> blas-${prof}.pc <<-EOF + Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core ${4} -lpthread + EOF + cat >> cblas-${prof}.pc <<-EOF + Requires: blas + Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core ${4} -lpthread + Cflags: -I\${includedir} + EOF + cat >> lapack-${prof}.pc <<-EOF + Requires: blas + Libs: -Wl,--no-as-needed -L\${libdir} ${2} ${3} -lmkl_core -lmkl_lapack ${4} -lpthread + EOF + insinto ${MKL_LIBDIR} + for x in blas cblas lapack; do + doins ${x}-${prof}.pc + cp eselect.${x} eselect.${x}.${prof} + echo "${MKL_LIBDIR}/${x}-${prof}.pc /usr/@LIBDIR@/pkgconfig/${x}.pc" \ + >> eselect.${x}.${prof} + eselect ${x} add $(get_libdir) eselect.${x}.${prof} ${prof} + done +} + +mkl_make_profiles() { + local clib + has_version 'dev-lang/ifc' && clib="intel" + built_with_use sys-devel/gcc fortran && clib="${clib} gf" + local slib="-lmkl_sequential" + local rlib="-liomp5" + local pbase=${PN} + for c in ${clib}; do + local ilib="-lmkl_${c}_lp64" + use x86 && ilib="-lmkl_${c}" + local tlib="-lmkl_${c/gf/gnu}_thread" + local comp="${c/gf/gfortran}" + comp="${comp/intel/ifort}" + mkl_add_profile ${pbase}-${comp} ${ilib} ${slib} + mkl_add_profile ${pbase}-${comp}-threads ${ilib} ${tlib} ${rlib} + if use int64; then + ilib="-lmkl_${c}_ilp64" + mkl_add_profile ${pbase}-${comp}-int64 ${ilib} ${slib} + mkl_add_profile ${pbase}-${comp}-threads-int64 ${ilib} ${tlib} ${rlib} + fi + done +} + +src_install() { + dodir ${MKL_DIR} + + # install license + if [[ ! -f ${INTEL_LIC_DIR}/${MKL_LIC} ]]; then + insinto ${INTEL_LIC_DIR} + doins "${WORKDIR}"/${MKL_LIC} || die "install license failed" + fi + + # install main stuff: cp faster than doins + einfo "Installing files..." + local cpdirs="benchmarks doc examples include interfaces lib man tests" + local doinsdirs="tools" + cp -pPR ${cpdirs} "${D}"${MKL_DIR} \ + || die "installing mkl failed" + insinto ${MKL_DIR} + doins -r ${doinsdirs} || die "doins ${doinsdirs} failed" + dosym mkl_cblas.h ${MKL_DIR}/include/cblas.h + + # install blas/lapack profiles + mkl_make_generic_profile + mkl_make_profiles + + # install env variables + local env_file=35mkl + echo "LDPATH=${MKL_LIBDIR}" > ${env_file} + echo "MANPATH=${MKL_DIR}/man" >> ${env_file} + doenvd ${env_file} || die "doenvd failed" +} + +pkg_postinst() { + # if blas profile is mkl, set lapack and cblas profiles as mkl + local blas_prof=$(eselect blas show | cut -d' ' -f2) + local def_prof="mkl-gfortran-threads" + has_version 'dev-lang/ifc' && def_prof="mkl-ifort-threads" + use int64 && def_prof="${def_prof}-int64" + for x in blas cblas lapack; do + local cur_prof=$(eselect ${x} show | cut -d' ' -f2) + if [[ -z ${cur_prof} || ${cur_prof} == ${def_prof} ]]; then + # work around eselect bug #189942 + local configfile="${ROOT}"/etc/env.d/${x}/$(get_libdir)/config + [[ -e ${configfile} ]] && rm -f ${configfile} + eselect ${x} set ${def_prof} + elog "${x} has been eselected to ${def_prof}" + else + elog "Current eselected ${x} is ${current_lib}" + elog "To use one of mkl profiles, issue (as root):" + elog "\t eselect ${x} set " + fi + if [[ ${blas_prof} == mkl* && ${cur_prof} != ${blas_prof} ]]; then + eselect blas set ${def_prof} + elog "${x} is now set to ${def_prof} for consistency" + fi + done + if [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]]; then + elog "Multi-threading OpenMP for GNU compilers only available" + elog "with gcc >= 4.2. Make sure you have a compatible version" + elog "and select it with gcc-config before selecting gnu profiles" + fi +} -- cgit v1.2.3-65-gdbad