Running numpy.test() with this pkgbuild I get the following failure:
FAIL: test_noncommutative_reduce_accumulate (test_regression.TestRegression)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/numpy/core/tests/test_regression.py", line 674, in test_noncommutative_reduce_accumulate
np.array([2., 4., 16.]))
File "/usr/lib/python3.6/site-packages/numpy/testing/utils.py", line 854, in assert_array_equal
verbose=verbose, header='Arrays are not equal')
File "/usr/lib/python3.6/site-packages/numpy/testing/utils.py", line 778, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not equal
(mismatch 33.33333333333333%)
x: array([ 2., 4., 0.])
y: array([ 2., 4., 16.])
----------------------------------------------------------------------
Ran 6610 tests in 21.417s
FAILED (KNOWNFAIL=7, SKIP=14, failures=1)
with the 'normal' python-numpy this test passes, anyone else have this issue?
Search Criteria
Package Details: python-numpy-mkl 2.2.1-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/python-numpy-mkl.git (read-only, click to copy) |
---|---|
Package Base: | python-numpy-mkl |
Description: | Scientific tools for Python, compiled with Intel MKL |
Upstream URL: | https://numpy.org |
Keywords: | numpy |
Licenses: | BSD-3-Clause |
Conflicts: | python-numpy |
Provides: | python-numpy |
Submitter: | bred |
Maintainer: | petronny (AutoUpdateBot, carlosal1015) |
Last Packager: | AutoUpdateBot |
Votes: | 38 |
Popularity: | 0.000000 |
First Submitted: | 2012-08-25 16:55 (UTC) |
Last Updated: | 2024-12-22 08:04 (UTC) |
Dependencies (12)
- intel-oneapi-mkl (intel-oneapi-hpckitAUR, intel-oneapi-basekit-2025AUR, intel-oneapi-basekit)
- python (python37AUR, python311AUR, python310AUR)
- cython (cython-gitAUR, cython0AUR) (make)
- gcc-fortran (gcc-fortran-gitAUR, gcc11-fortranAUR, gcc-fortran-snapshotAUR) (make)
- meson-python (make)
- procps-ng (procps-ng-gitAUR, busybox-coreutilsAUR) (make)
- python-build (make)
- python-installer (python-installer-gitAUR) (make)
- python-setuptools (make)
- python-hypothesis (check)
- python-pytest (check)
- python-threadpoolctl (optional) – for show_runtime() support
Required by (1914)
- akhelper-git (requires python-numpy)
- alsa-control (requires python-numpy)
- amdfan (requires python-numpy)
- amdgpu-fan (requires python-numpy)
- amulet-map-editor (requires python-numpy)
- amulet-map-editor-git (requires python-numpy)
- apicula-git (requires python-numpy)
- apitrace-git (requires python-numpy)
- apriltag (requires python-numpy) (make)
- apsynsim (requires python-numpy) (make)
- archlinux-tweak-tool-git (requires python-numpy)
- ardupilot-copter-sitl (requires python-numpy)
- art-rawconverter-imageio (requires python-numpy)
- asammdf-git (requires python-numpy)
- astrometry.net (requires python-numpy)
- asus-numberpad-driver-b7402-git (requires python-numpy)
- asus-numberpad-driver-e210ma-git (requires python-numpy)
- asus-numberpad-driver-g513-git (requires python-numpy)
- asus-numberpad-driver-g533-git (requires python-numpy)
- asus-numberpad-driver-gx551-git (requires python-numpy)
- Show 1894 more...
Sources (1)
arvidsaur commented on 2017-11-08 14:32 (UTC)
bred commented on 2017-10-22 15:44 (UTC)
As experimental option I've added the possibility to compile with gcc and MKL!
gwaterst commented on 2017-10-19 17:39 (UTC)
@derdigge:
You need to obtain a license for your intel software:
https://software.intel.com/en-us/parallel-studio-xe/choose-download
derdigge commented on 2017-10-18 15:08 (UTC)
Buils failed for me even using the PKGBUIL mentioned by gwaterst.
https://pastebin.com/ZpBKGwfk
gwaterst commented on 2017-10-05 11:09 (UTC)
Sorry there indeed was a typo. The line was supposed to be:
export __INTEL_PRE_CFLAGS="$__INTEL_PRE_CFLAGS -D_Float128=__float128"
(Someone might have defined __INTEL_PRE_CFLAGS system-wide so I keep the previous definition and append the float128 option to it)
Here is my entire functional (at least for me) PKGBUILD:
################################################################################
################################################################################
pkgbase="python-numpy-mkl"
pkgname="python-numpy-mkl"
true && pkgname=('python-numpy-mkl' 'python2-numpy-mkl')
#pkgname=('python-numpy')
pkgver=1.13.2
pkgrel=1
pkgdesc="Scientific tools for Python compiled with intel mkl"
arch=('i686' 'x86_64')
license=('custom')
options=('staticlibs')
url="http://numpy.scipy.org/"
depends=( 'intel-mkl' 'python' 'python2' )
makedepends=( 'python-setuptools' 'python2-setuptools' 'intel-compiler-base' 'intel-fortran-compiler' 'python-nose' 'python2-nose' 'cython' 'glibc')
source=( https://github.com/numpy/numpy/archive/v${pkgver}.tar.gz
'site64.cfg'
'site32.cfg')
sha256sums=( '11add7a40a868e70b7de8e568e5f20504f4dbfc7fce18887472220c2f5167ae4' # main pkg§
'86cd68a695a5e1d76f8e53cda70c888c4ed04349f15c8096d4492e346e7187e1' # site64
'882f2717deca0fd6a2e2384aac2dc7973c566f9cd2ba46777c3b5ffdffa814df' # site32
)
build() {
cd "${srcdir}"
if [ "$CARCH" = "i686" ]; then
cp ${srcdir}/site32.cfg ${srcdir}/site.cfg
_compiler=intel
else
cp ${srcdir}/site64.cfg ${srcdir}/site.cfg
_compiler=intelem
fi
cp -a numpy-${pkgver} numpy-py2-${pkgver}
export Atlas=None
export LDFLAGS="$LDFLAGS -shared"
export __INTEL_PRE_CFLAGS="$__INTEL_PRE_CFLAGS -D_Float128=__float128"
echo "Building Python2"
cd "${srcdir}"
cp ${srcdir}/site.cfg "${srcdir}/numpy-py2-${pkgver}"
cd "${srcdir}/numpy-py2-${pkgver}"
python2 setup.py config --compiler=${_compiler} build_clib --compiler=${_compiler} build_ext --compiler=${_compiler}
echo "Building Python3"
cd "${srcdir}"
cp ${srcdir}/site.cfg "${srcdir}/numpy-${pkgver}"
cd "${srcdir}/numpy-${pkgver}"
python setup.py config --compiler=${_compiler} build_clib --compiler=${_compiler} build_ext --compiler=${_compiler}
}
package_python2-numpy-mkl() {
depends=('intel-mkl' 'python2')
provides=( "python2-numpy=${pkgver}" )
replaces=( "python2-numpy" )
conflicts=( "python2-numpy" )
optdepends=('python-nose: testsuite')
cd "${srcdir}/numpy-py2-${pkgver}"
python2 setup.py config_fc install --prefix=/usr --root="${pkgdir}" --optimize=1
install -m755 -d "${pkgdir}/usr/share/licenses/python2-numpy"
install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-numpy/"
sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
$(find ${pkgdir} -name '*.py')
}
package_python-numpy-mkl() {
depends=('intel-mkl' 'python')
provides=("python3-numpy=${pkgver}" "python-numpy=${pkgver}")
replaces=('python3-numpy')
conflicts=('python3-numpy' 'python-numpy')
cd "${srcdir}/numpy-${pkgver}"
python setup.py config_fc install --prefix=/usr --root="${pkgdir}" --optimize=1
install -m755 -d "${pkgdir}/usr/share/licenses/python3-numpy"
install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python3-numpy/"
}
################################################################################
################################################################################
invik commented on 2017-10-04 08:45 (UTC) (edited on 2017-10-04 08:47 (UTC) by invik)
@arvidsaur
I think gwaterst had a typo. Should be:
export __INTEL_PRE_CFLAGS=" -D_Float128=__float128"
It worked for me by putting it like that right under the "build() {" line.
arvidsaur commented on 2017-10-04 07:20 (UTC) (edited on 2017-10-04 07:25 (UTC) by arvidsaur)
@gwaterst:
Sorry if this is a stupid question, but where in the PKGBUILD should "export __INTEL_PRE_CFLAGS="__INTEL_PRE_CFLAGS -D_Float128=__float128" be entered?
Because I got "File not found: __INTEL_PRE_CFLAGS" when trying that method.
However adding "-D_Float128=__float128" in the icc.cfg file worked.
gwaterst commented on 2017-10-03 12:34 (UTC)
The makedepend glibc<2.26 can be removed when the following line is added to the PKGBUILD:
export __INTEL_PRE_CFLAGS="__INTEL_PRE_CFLAGS -D_Float128=__float128"
invik commented on 2017-10-02 16:23 (UTC)
@gwaterst:
It seems that the problem with gcc7 and glibc 2.26 related to "_Float128" is known:
https://software.intel.com/en-us/forums/intel-c-compiler/topic/742701
In the last post, they recommend a temporary fix: to add "-D_Float128=__float128" to the compiler flags.
I have been trying, and I have been able to compile the package with gcc7 + glibc 2.26 by including the suggested define to the files icc.cfg, icpc.cfg and ifort.cfg under /opt/intel/compilers_and_libraries_2018.0.128/linux/bin/intel64/
gwaterst commented on 2017-09-21 13:54 (UTC)
Downgrading to glibc 2.25 (during building) appears to solve the problem.
Additionally intel.py and intelccompiler.py are provided in the source package and the __init__ patches are not needed anymore, so I have update the PKGBUILD:
# $Id: PKGBUILD 164237 2012-07-28 03:14:33Z stephane $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
# Adapted to mkl by Simone Riva
pkgbase="python-numpy-mkl"
pkgname="python-numpy-mkl"
true && pkgname=('python-numpy-mkl' 'python2-numpy-mkl')
#pkgname=('python-numpy')
pkgver=1.13.1
pkgrel=1
pkgdesc="Scientific tools for Python compiled with intel mkl"
arch=('i686' 'x86_64')
license=('custom')
options=('staticlibs')
url="http://numpy.scipy.org/"
depends=( 'intel-mkl' 'python' 'python2' )
makedepends=( 'python-setuptools' 'python2-setuptools' 'intel-compiler-base' 'intel-fortran-compiler' 'python-nose' 'python2-nose' 'cython' 'glibc<2.26' )
source=( https://github.com/numpy/numpy/archive/v${pkgver}.tar.gz
'site64.cfg'
'site32.cfg')
sha256sums=( 'cf8652b96582b282a5bb710aa4fe2300dca63bdd678a3cd7820314cb6c97ca89' # main pkg§
'86cd68a695a5e1d76f8e53cda70c888c4ed04349f15c8096d4492e346e7187e1' # site64
'882f2717deca0fd6a2e2384aac2dc7973c566f9cd2ba46777c3b5ffdffa814df' # site32
)
build() {
cd "${srcdir}"
if [ "$CARCH" = "i686" ]; then
cp ${srcdir}/site32.cfg ${srcdir}/site.cfg
_compiler=intel
else
cp ${srcdir}/site64.cfg ${srcdir}/site.cfg
_compiler=intelem
fi
cp -a numpy-${pkgver} numpy-py2-${pkgver}
export Atlas=None
export LDFLAGS="$LDFLAGS -shared"
echo "Building Python2"
cd "${srcdir}"
cp ${srcdir}/site.cfg "${srcdir}/numpy-py2-${pkgver}"
cd "${srcdir}/numpy-py2-${pkgver}"
python2 setup.py config --compiler=${_compiler} build_clib --compiler=${_compiler} build_ext --compiler=${_compiler}
echo "Building Python3"
cd "${srcdir}"
cp ${srcdir}/site.cfg "${srcdir}/numpy-${pkgver}"
cd "${srcdir}/numpy-${pkgver}"
python setup.py config --compiler=${_compiler} build_clib --compiler=${_compiler} build_ext --compiler=${_compiler}
}
package_python2-numpy-mkl() {
depends=('intel-mkl' 'python2')
provides=( "python2-numpy=${pkgver}" )
replaces=( "python2-numpy" )
conflicts=( "python2-numpy" )
optdepends=('python-nose: testsuite')
cd "${srcdir}/numpy-py2-${pkgver}"
python2 setup.py config_fc install --prefix=/usr --root="${pkgdir}" --optimize=1
install -m755 -d "${pkgdir}/usr/share/licenses/python2-numpy"
install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python2-numpy/"
sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
-e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
-e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
$(find ${pkgdir} -name '*.py')
}
package_python-numpy-mkl() {
depends=('intel-mkl' 'python')
provides=("python3-numpy=${pkgver}" "python-numpy=${pkgver}")
replaces=('python3-numpy')
conflicts=('python3-numpy' 'python-numpy')
cd "${srcdir}/numpy-${pkgver}"
python setup.py config_fc install --prefix=/usr --root="${pkgdir}" --optimize=1
install -m755 -d "${pkgdir}/usr/share/licenses/python3-numpy"
install -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/python3-numpy/"
}
Pinned Comments
carlosal1015 commented on 2024-12-23 00:56 (UTC) (edited on 2024-12-23 02:07 (UTC) by carlosal1015)
Important note: After installation, append this line
in
~/.bashrc
,~/.zshrc
, etc. In order to avoid thisImportError
.petronny commented on 2022-09-28 08:28 (UTC)
Prebuilt binaries of this package can be found in arch4edu.