8000 Raise-FPE test failures on Windows and PPC (Trac #1755) · Issue #2350 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Raise-FPE test failures on Windows and PPC (Trac #1755) #2350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
numpy-gitbot opened this issue Oct 19, 2012 · 11 comments
Closed

Raise-FPE test failures on Windows and PPC (Trac #1755) #2350

numpy-gitbot opened this issue Oct 19, 2012 · 11 comments

Comments

@numpy-gitbot
Copy link

Original ticket http://projects.scipy.org/numpy/ticket/1755 on 2011-03-04 by @rgommers, assigned to unknown.

np.power fails to raise an exception on Windows (tested on py-3.1 and py-2.6). Test failure:

======================================================================
FAIL: test_floating_exceptions (test_numeric.TestFloatExceptions)
Test basic arithmetic function errors
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Z:\Users\rgommers\.wine\drive_c\Python31\lib\site-packages\numpy\core\tests\test_numeric.py", line 320, in test_floating_exceptions
    np.power, ftype(2), ftype(2**fi.nexp))
  File "Z:\Users\rgommers\.wine\drive_c\Python31\lib\site-packages\numpy\core\tests\test_numeric.py", line 261, in assert_raises_fpe
    "Type %s did not raise fpe error '%s'." % (ftype, fpeerr))
  File "Z:\Users\rgommers\.wine\drive_c\Python31\lib\site-packages\numpy\testing\utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError: Type <class 'numpy.float64'> did not raise fpe error 'overflow'.

Result on Windows:

>>> 2.0 ** 2048
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: (34, 'Result too large')
>>> np.power(2.0, 2048)
inf

Result on OS X (as expected)

>>> 2.0**2048
------------------------------------------------------------
Traceback (most recent call last):
  File "<ipython console>", line 1, in <module>
OverflowError: (34, 'Result too large')

>>> np.power(2.0, 2048)
Warning: overflow encountered in power
inf
@numpy-gitbot
Copy link
Author

@rgommers wrote on 2011-03-27

The same happens on OS X 10.5 PPC:

======================================================================
FAIL: Test basic arithmetic function errors
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/lib/python3.2/site-packages/numpy/testing/decorators.py",
line 216, in knownfailer
    return f(*args, **kwargs)
  File "/sw/lib/python3.2/site-packages/numpy/core/tests/
test_numeric.py", line 352, in test_floating_exceptions_power
    np.power, ftype(2), ftype(2**fi.nexp))
  File "/sw/lib/python3.2/site-packages/numpy/core/tests/
test_numeric.py", line 261, in assert_raises_fpe
    "Type %s did not raise fpe error '%s'." % (ftype, fpeerr))
  File "/sw/lib/python3.2/site-packages/numpy/testing/utils.py", line
34, in assert_
    raise AssertionError(msg)
AssertionError: Type <class 'numpy.float128'> did not raise fpe error
'overflow'.

On OS X PPC there are more failures:

======================================================================
FAIL: Test basic arithmetic function errors
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/sw/lib/python3.2/site-packages/numpy/core/tests/
test_numeric.py", line 308, in test_floating_exceptions
    lambda a,b:a/b, ft_tiny, ft_max)
  File "/sw/lib/python3.2/site-packages/numpy/core/tests/
test_numeric.py", line 261, in assert_raises_fpe
    "Type %s did not raise fpe error '%s'." % (ftype, fpeerr))
  File "/sw/lib/python3.2/site-packages/numpy/testing/utils.py", line
34, in assert_
    raise AssertionError(msg)
AssertionError: Type <class 'numpy.float128'> did not raise fpe error
'underflow'.

@numpy-gitbot
Copy link
Author

Milestone changed to Unscheduled by @rgommers on 2011-03-27

@numpy-gitbot
Copy link
Author

Title changed from Raise-FPE test failure on Windows to Raise-FPE test failures on Windows and PPC by @rgommers on 2011-03-27

@numpy-gitbot
Copy link
Author

@rgommers wrote on 2011-03-27

Marked as knownfail in 1.6.x branch in 6922cf8

@numpy-gitbot
Copy link
Author

@rgommers wrote on 2011-05-04

Fails on Solaris too. Probably on other less common platforms too.

@numpy-gitbot
Copy link
Author

trac user zyv wrote on 2011-09-13

Happens on my regular x86_64 Linux system:

I realize that Ubuntu Jaunty is no longer supported, but this is what we
have on our cluster and I have to accommodate. I was up to building the
lastest NumPy / SciPy bundle on ActiveState Python and it builds &
installs fine, but NumPy reports one test error.

The system is:

$ uname -a
Linux ui 2.6.28-19-server #66-Ubuntu SMP Sat Oct 16 18:11:06 UTC 2010
x86_64 GNU/Linux

I am using system compiler (gcc version 4.3.3 Ubuntu 4.3.3-5ubuntu4),
system BLAS and latest ActiveState Python:

Python version 2.7.2 (default, Jun 24 2011, 11:24:26) [GCC 4.0.2
20051125 (Red Hat 4.0.2-8)]

The configuration is as follows:

$ python -c 'import numpy.distutils.__config__ as npc; npc.show()'
atlas_threads_info:
  NOT AVAILABLE
blas_opt_info:
    libraries = ['f77blas', 'cblas', 'atlas']
    library_dirs = ['/usr/lib']
    define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')]
    language = c
    include_dirs = ['/usr/include']
atlas_blas_threads_info:
  NOT AVAILABLE
lapack_opt_info:
    libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
    library_dirs = ['/usr/lib']
    define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')]
    language = f77
    include_dirs = ['/usr/include']
atlas_info:   
    libraries = ['lapack', 'f77blas', 'cblas', 'atlas']
    library_dirs = ['/usr/lib']
    define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')]
    language = f77
    include_dirs = ['/usr/include']
lapack_mkl_info:
  NOT AVAILABLE
blas_mkl_info:
  NOT AVAILABLE
atlas_blas_info:
    libraries = ['f77blas', 'cblas', 'atlas']
    library_dirs = ['/usr/lib']
    define_macros = [('ATLAS_INFO', '"\\"3.6.0\\""')]
    language = c
    include_dirs = ['/usr/include']
mkl_info:
  NOT AVAILABLE

The failing test:

======================================================================
FAIL: Test basic arithmetic function errors
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/users/zaytsev/opt/ActivePython-2.7/lib/python2.7/site-packages/numpy/testing/decorators.py", line 215, in knownfailer
    return f(*args, **kwargs)
  File
"/users/zaytsev/opt/ActivePython-2.7/lib/python2.7/site-packages/numpy/core/tests/test_numeric.py", line 321, in test_floating_exceptions
    lambda a,b:a/b, ft_tiny, ft_max)
  File
"/users/zaytsev/opt/ActivePython-2.7/lib/python2.7/site-packages/numpy/core/tests/test_numeric.py", line 271, in assert_raises_fpe
    "Type %s did not raise fpe error '%s'." % (ftype, fpeerr))
  File
"/users/zaytsev/opt/ActivePython-2.7/lib/python2.7/site-packages/numpy/testing/utils.py", line 34, in assert_
    raise AssertionError(msg)
AssertionError: Type <type 'numpy.float32'> did not raise fpe error
'underflow'.

----------------------------------------------------------------------
Ran 3533 tests in 34.806s

FAILED (KNOWNFAIL=3, SKIP=4, failures=1)

Is it just me, or someone else can currently reproduce it?

I was only able to find a couple of posts citing a similar error message
by Xiong Deng and one by George Nurser. Neither of these posts has a
definite answer...

I am happy to provide any additional diagnostic info,

@numpy-gitbot
Copy link
Author

@rgommers wrote on 2012-02-20

This failure should finally be looked into for 1.7.0

@numpy-gitbot
Copy link
Author

Milestone changed to NumPy 1.7 by @rgommers on 2012-02-20

@numpy-gitbot
Copy link
Author

@rgommers wrote on 2012-05-19

Also reported as failing on OS X 10.7 with Intel CPU.

Marked as unconditional knownfail for 1.6.2. PR to do so in master as well: #283

@numpy-gitbot
Copy link
Author

Milestone changed to Unscheduled by @rgommers on 2012-07-15

@charris
Copy link
Member
charris commented Feb 20, 2014

This test passes on Intel i5, gcc version 4.8.2 20131212 (Red Hat 4.8.2-7), fedora linux. Might be worth checking some of the other failures. I don't expect PPC to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0