[Numpy-discussion] Fwd: Multi-distribution Linux wheels - please test

Evgeni Burovski evgeny.burovskiy at gmail.com
Tue Feb 9 08:19:29 EST 2016


>>> ======================================================================
>>> ERROR: test_multiarray.TestNewBufferProtocol.test_relaxed_strides
>>> ----------------------------------------------------------------------
>>> Traceback (most recent call last):
>>>   File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/nose/case.py",
>>> line 197, in runTest
>>>     self.test(*self.arg)
>>>   File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/core/tests/test_multiarray.py",
>>> line 5366, in test_relaxed_strides
>>>     fd.write(c.data)
>>> TypeError: 'buffer' does not have the buffer interface
>>>
>>> ----------------------------------------------------------------------
>>>
>>>
>>> * Scipy tests pass with one error in TestNanFuncs, but the interpreter
>>> crashes immediately afterwards.
>>>
>>>
>>> Same machine, python 3.5: both numpy and scipy tests pass.
>>
>> Ouch - great that you found these, I'll take a look,
>
> I think these are problems with numpy and Python 2.7.3 - because I got
> the same "TypeError: 'buffer' does not have the buffer interface" on
> numpy with OS X with Python.org python 2.7.3, installing from a wheel,
> or installing from source.


Indeed --- updated to python 2.7.11 (Thanks Felix Krull!) and the
failure is gone, `numpy.test()` passes. However:


>>> numpy.test("full")
Running unit tests for numpy
NumPy version 1.10.4
NumPy relaxed strides checking option: False
NumPy is installed in
/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy
Python version 2.7.11 (default, Dec 14 2015, 22:56:59) [GCC 4.6.3]
nose version 1.3.7

<snip>

======================================================================
ERROR: test_kind.TestKind.test_all
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/nose/case.py",
line 381, in setUp
    try_run(self.inst, ('setup', 'setUp'))
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/nose/util.py",
line 471, in try_run
    return func()
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/f2py/tests/util.py",
line 367, in setUp
    module_name=self.module_name)
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/f2py/tests/util.py",
line 79, in wrapper
    memo[key] = func(*a, **kw)
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/f2py/tests/util.py",
line 150, in build_module
    __import__(module_name)
ImportError: /home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/core/../.libs/libgfortran.so.3:
version `GFORTRAN_1.4' not found (required by
/tmp/tmpPVjYDE/_test_ext_module_5405.so)

======================================================================
ERROR: test_mixed.TestMixed.test_all
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/nose/case.py",
line 381, in setUp
    try_run(self.inst, ('setup', 'setUp'))
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/nose/util.py",
line 471, in try_run
    return func()
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/f2py/tests/util.py",
line 367, in setUp
    module_name=self.module_name)
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/f2py/tests/util.py",
line 79, in wrapper
    memo[key] = func(*a, **kw)
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/f2py/tests/util.py",
line 150, in build_module
    __import__(module_name)
ImportError: /home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/core/../.libs/libgfortran.so.3:
version `GFORTRAN_1.4' not found (required by
/tmp/tmpPVjYDE/_test_ext_module_5405.so)

======================================================================
ERROR: test_mixed.TestMixed.test_docstring
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/nose/case.py",
line 381, in setUp
    try_run(self.inst, ('setup', 'setUp'))
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/nose/util.py",
line 471, in try_run
    return func()
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/f2py/tests/util.py",
line 367, in setUp
    module_name=self.module_name)
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/f2py/tests/util.py",
line 85, in wrapper
    raise ret
ImportError: /home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/core/../.libs/libgfortran.so.3:
version `GFORTRAN_1.4' not found (required by
/tmp/tmpPVjYDE/_test_ext_module_5405.so)

======================================================================
ERROR: test_basic (test_function_base.TestMedian)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/lib/tests/test_function_base.py",
line 2361, in test_basic
    assert_(w[0].category is RuntimeWarning)
IndexError: list index out of range

======================================================================
ERROR: test_nan_behavior (test_function_base.TestMedian)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/lib/tests/test_function_base.py",
line 2464, in test_nan_behavior
    assert_(w[0].category is RuntimeWarning)
IndexError: list index out of range

======================================================================
FAIL: test_default (test_numeric.TestSeterr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/core/tests/test_numeric.py",
line 281, in test_default
    under='ignore',
AssertionError: {'over': 'raise', 'divide': 'warn', 'invalid': 'warn',
'under': 'ignore'} != {'over': 'warn', 'divide': 'warn', 'invalid':
'warn', 'under': 'ignore'}
- {'divide': 'warn', 'invalid': 'warn', 'over': 'raise', 'under': 'ignore'}
?                                                 ^^^^

+ {'divide': 'warn', 'invalid': 'warn', 'over': 'warn', 'under': 'ignore'}
?                                                ++ ^


======================================================================
FAIL: test_allnans (test_nanfunctions.TestNanFunctions_Median)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/lib/tests/test_nanfunctions.py",
line 544, in test_allnans
    assert_(len(w) == 1)
  File "/home/br/virtualenvs/manylinux/local/lib/python2.7/site-packages/numpy/testing/utils.py",
line 53, in assert_
    raise AssertionError(smsg)
AssertionError

----------------------------------------------------------------------
Ran 6148 tests in 77.301s

FAILED (KNOWNFAIL=3, SKIP=6, errors=5, failures=2)
<nose.result.TextTestResult run=6148 errors=5 failures=2>


Not sure if any of these are present for python 2.7.3 and can no
longer easily test.

`scipy.test("full")` almost passes, there's a bunch of
warnings-related noise and https://github.com/scipy/scipy/issues/5823
Nothing too bad on that machine, it seems :-).


> I also get a scipy segfault with scipy 0.17.0 installed from an OSX
> wheel, with output ending:
>
> test_check_finite (test_basic.TestLstsq) ...
> /Users/mb312/.virtualenvs/test/lib/python2.7/site-packages/scipy/linalg/basic.py:884:
> RuntimeWarning: internal gelsd driver lwork query error, required
> iwork dimension not returned. This is likely the result of LAPACK bug
> 0038, fixed in LAPACK 3.2.2 (released July 21, 2010). Falling back to
> 'gelss' driver.
>   warnings.warn(mesg, RuntimeWarning)
> ok
> test_random_complex_exact (test_basic.TestLstsq) ... FAIL
> test_random_complex_overdet (test_basic.TestLstsq) ... Bus error

Oh, that one again...




> This is so whether scipy is running on top of source- or wheel-built
> numpy, and for a scipy built from source.
>
> Same numpy error installing on a bare Ubuntu 12.04, either installing
> from a wheel built on 12.04 on travis:
>
> pip install -f http://travis-wheels.scikit-image.org --trusted-host
> travis-wheels.scikit-image.org --no-index numpy
>
> or from numpy built from source.
>
> I can't replicate the segfault with manylinux wheels and scipy.  On
> the other hand, I get a new test error for numpy from manylinux, scipy
> from manylinux, like this:
>
> $ python -c 'import scipy.linalg; scipy.linalg.test()'
>
> ======================================================================
> FAIL: test_decomp.test_eigh('general ', 6, 'F', True, False, False, (2, 4))
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.7/dist-packages/nose/case.py", line
> 197, in runTest
>     self.test(*self.arg)
>   File "/usr/local/lib/python2.7/dist-packages/scipy/linalg/tests/test_decomp.py",
> line 658, in eigenhproblem_general
>     assert_array_almost_equal(diag2_, ones(diag2_.shape[0]), DIGITS[dtype])
>   File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py",
> line 892, in assert_array_almost_equal
>     precision=decimal)
>   File "/usr/local/lib/python2.7/dist-packages/numpy/testing/utils.py",
> line 713, in assert_array_compare
>     raise AssertionError(msg)
> AssertionError:
> Arrays are not almost equal to 4 decimals
>
> (mismatch 100.0%)
>  x: array([ 0.,  0.,  0.], dtype=float32)
>  y: array([ 1.,  1.,  1.])
>
> ----------------------------------------------------------------------
> Ran 1507 tests in 14.928s
>
> FAILED (KNOWNFAIL=4, SKIP=1, failures=1)
>
> This is a very odd error, which we don't get when running over a numpy
> installed from source, linked to ATLAS, and doesn't happen when
> running the tests via:
>
> nosetests /usr/local/lib/python2.7/dist-packages/scipy/linalg
>
> So, something about the copy of numpy (linked to openblas) is
> affecting the results of scipy (also linked to openblas), and only
> with a particular environment / test order.
>
> If you'd like to try and see whether y'all can do a better job of
> debugging than me:
>
> # Run this script inside a docker container started with this incantation:
> # docker run -ti --rm ubuntu:12.04 /bin/bash
> apt-get update
> apt-get install -y python curl
> apt-get install libpython2.7  # this won't be necessary with next
> iteration of manylinux wheel builds
> curl -LO https://bootstrap.pypa.io/get-pip.py
> python get-pip.py
> pip install -f https://nipy.bic.berkeley.edu/manylinux numpy scipy nose
> python -c 'import scipy.linalg; scipy.linalg.test()'
>
> Cheers,
>
> Matthew
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the NumPy-Discussion mailing list