[SciPy-User] how critical are testing errors in Scipy under Lion?

Ralf Gommers ralf.gommers at googlemail.com
Tue Jun 12 13:03:03 EDT 2012


On Sun, Jun 10, 2012 at 4:33 AM, Angel Yanguas-Gil
<angel.yanguas at gmail.com>wrote:

> Hi, My OS is Lion. I compiled from source following the instructions
> in Scipy docs under python.org's 2.7.3 and I got errors when running
> scipy.test().
>
> I know there is a previous thread on this topic that lead to a ticket
> to look into the problem, but what I am trying to do is understand the
> impact of these errors on the day-to-day work with scipy. How do they
> affect Scipy's reliability under Lion? I know it is related to simple
> precision, but I don't know how big of an issue is. I've been using
> scipy for almost five years, and since moving to Lion last fall I have
> been reluctant to base my more serious work on Scipy+Lion for that
> reason, to the point that I am using Scipy mostly under Ubuntu these
> days. But it would be great to know if I am overreacting.
>

Unless you specifically want to use single precision for something, it
shouldn't be a big issue. Normally you won't run into this; other parts of
scipy also don't rely on these single precision BLAS functions.

Ralf


>
> Any clues? (relevant part from nose test results are included below).
>
> Thanks,
>
> ay
>
>
> Running unit tests for scipy
> NumPy version 1.6.1
> NumPy is installed in
>
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy
> SciPy version 0.10.1
> SciPy is installed in
>
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy
> Python version 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43) [GCC
> 4.2.1 (Apple Inc. build 5666) (dot 3)]
> nose version 1.1.2
>
>
> ======================================================================
> FAIL: test_asum (test_blas.TestFBLAS1Simple)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/lib/blas/tests/test_blas.py",
> line 58, in test_asum
>    assert_almost_equal(f([3,-4,5]),12)
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 468, in assert_almost_equal
>    raise AssertionError(msg)
> AssertionError:
> Arrays are not almost equal to 7 decimals
>  ACTUAL: 0.0
>  DESIRED: 12
>
> ======================================================================
> FAIL: test_dot (test_blas.TestFBLAS1Simple)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/lib/blas/tests/test_blas.py",
> line 67, in test_dot
>    assert_almost_equal(f([3,-4,5],[2,5,1]),-9)
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 468, in assert_almost_equal
>    raise AssertionError(msg)
> AssertionError:
> Arrays are not almost equal to 7 decimals
>  ACTUAL: 0.0
>  DESIRED: -9
>
> ======================================================================
> FAIL: test_nrm2 (test_blas.TestFBLAS1Simple)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/lib/blas/tests/test_blas.py",
> line 78, in test_nrm2
>    assert_almost_equal(f([3,-4,5]),math.sqrt(50))
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 468, in assert_almost_equal
>    raise AssertionError(msg)
> AssertionError:
> Arrays are not almost equal to 7 decimals
>  ACTUAL: 0.0
>  DESIRED: 7.0710678118654755
>
> ======================================================================
> FAIL: test_basic.TestNorm.test_overflow
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/case.py",
> line 197, in runTest
>    self.test(*self.arg)
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/tests/test_basic.py",
> line 581, in test_overflow
>    assert_almost_equal(norm(a), a)
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 452, in assert_almost_equal
>    return assert_array_almost_equal(actual, desired, decimal, err_msg)
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 800, in assert_array_almost_equal
>    header=('Arrays are not almost equal to %d decimals' % decimal))
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 636, in assert_array_compare
>    raise AssertionError(msg)
> AssertionError:
> Arrays are not almost equal to 7 decimals
>
> (mismatch 100.0%)
>  x: array(-0.0)
>  y: array([  1.00000002e+20], dtype=float32)
>
> ======================================================================
> FAIL: test_basic.TestNorm.test_stable
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/case.py",
> line 197, in runTest
>    self.test(*self.arg)
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/tests/test_basic.py",
> line 586, in test_stable
>    assert_almost_equal(norm(a) - 1e4, 0.5)
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 468, in assert_almost_equal
>    raise AssertionError(msg)
> AssertionError:
> Arrays are not almost equal to 7 decimals
>  ACTUAL: -10000.0
>  DESIRED: 0.5
>
> ======================================================================
> FAIL: test_basic.TestNorm.test_types
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nose/case.py",
> line 197, in runTest
>    self.test(*self.arg)
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/tests/test_basic.py",
> line 568, in test_types
>    assert_allclose(norm(x), np.sqrt(14), rtol=tol)
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 1168, in assert_allclose
>    verbose=verbose, header=header)
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 636, in assert_array_compare
>    raise AssertionError(msg)
> AssertionError:
> Not equal to tolerance rtol=2.38419e-06, atol=0
>
> (mismatch 100.0%)
>  x: array(1.0842021724855044e-19)
>  y: array(3.7416573867739413)
>
> ======================================================================
> FAIL: test_asum (test_blas.TestFBLAS1Simple)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/tests/test_blas.py",
> line 99, in test_asum
>    assert_almost_equal(f([3,-4,5]),12)
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 468, in assert_almost_equal
>    raise AssertionError(msg)
> AssertionError:
> Arrays are not almost equal to 7 decimals
>  ACTUAL: 0.0
>  DESIRED: 12
>
>
> ======================================================================
> FAIL: test_dot (test_blas.TestFBLAS1Simple)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/tests/test_blas.py",
> line 109, in test_dot
>    assert_almost_equal(f([3,-4,5],[2,5,1]),-9)
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 468, in assert_almost_equal
>    raise AssertionError(msg)
> AssertionError:
> Arrays are not almost equal to 7 decimals
>  ACTUAL: 0.0
>  DESIRED: -9
>
> ======================================================================
> FAIL: test_nrm2 (test_blas.TestFBLAS1Simple)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/linalg/tests/test_blas.py",
> line 127, in test_nrm2
>    assert_almost_equal(f([3,-4,5]),math.sqrt(50))
>  File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/testing/utils.py",
> line 468, in assert_almost_equal
>    raise AssertionError(msg)
> AssertionError:
> Arrays are not almost equal to 7 decimals
>  ACTUAL: 0.0
>  DESIRED: 7.0710678118654755
>
> Bummer.
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20120612/542f8ff2/attachment.html>


More information about the SciPy-User mailing list