8000 FAIL: test_umath.TestComplexFunctions.test_branch_cuts · Issue #6063 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

FAIL: test_umath.TestComplexFunctions.test_branch_cuts #6063

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
githubmlai opened this issue Jul 11, 2015 · 14 comments
Closed

FAIL: test_umath.TestComplexFunctions.test_branch_cuts #6063

githubmlai opened this issue Jul 11, 2015 · 14 comments

Comments

@githubmlai
Copy link

Got following error when running "runtests.py" on linux 64 bit.

[mlai@begws92 numpy]$ uname -a
Linux begws92 2.6.32-358.23.2.el6.x86_64 #1 SMP Sat Sep 14 05:32:37 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux


======================================================================
FAIL: test_umath.TestComplexFunctions.test_branch_cuts(<ufunc 'arccosh'>, [-1, 0.5], [1j, 1j], 1, -1, True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/mlai/anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/mlai/github/numpy/build/testenv/lib/python2.7/site-packages/numpy/core/tests/test_umath.py", line 1690, in _check_branch_cut
    assert_(np.all(np.absolute(y0.imag - yp.imag) < atol), (y0, yp))
  File "/home/mlai/github/numpy/build/testenv/lib/python2.7/site-packages/numpy/testing/utils.py", line 53, in assert_
    raise AssertionError(smsg)
AssertionError: (array([  0.00000000e+00+3.14159265j,   1.11022302e-16-1.04719755j]), array([  4.71216091e-07+3.14159218j,   1.28119737e-13+1.04719755j]))

----------------------------------------------------------------------
Ran 5974 tests in 45.985s

FAILED (KNOWNFAIL=3, SKIP=3, failures=1)
@juliantaylor
Copy link
Contributor

which compiler was used to compile numpy?

@githubmlai
Copy link
Author

gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)

@vladimir-kozyrev
Copy link

Same issue here.
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)

@ltnetcase
Copy link

Same issue here.
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
use anaconda install numpy

@rgommers
Copy link
Member
rgommers commented Jan 7, 2016

Did anyone check if this test fails on older numpy releases?

@juliantaylor
Copy link
Contributor

the test is new in 1.10, the issue probably always existed.

@vladimir-kozyrev
Copy link

I confirm that the previous release (1.9.1) goes through the tests without errors.
The problem is not related to the compiler, it seems. I've tried to compile numpy/1.10 with gcc/4.9.3 and gcc/4.8.4 - tests fail with the same error.

@ewmoore
Copy link
Contributor
ewmoore commented Jan 8, 2016

What version of gibc do you have?

In 1.10 numpy is more aggressive about using the system supplied complex functions than it was in 1.9. One thing you could try is to force the use of the fallback implementation of cacosh and see if the test passes. The easiest way to do this is to temporarily add a few lines to the bottom of /numpy/core/src/private/npy_config.h that looks like

#undef HAVE_CACOSH
#undef HAVE_CACOSHF
#undef HAVE_CACOSHL

Recompile and see if that fixes your problem.

@vladimir-kozyrev
Copy link

Thanks ewmoore, it worked!
glibc version: 2.12
Test results:

Ran 6153 tests in 153.032s

OK (KNOWNFAIL=3, SKIP=2)
<nose.result.TextTestResult run=6153 errors=0 failures=0>

@ewmoore
Copy link
Contributor
ewmoore commented Jan 8, 2016
< 8000 tr class="d-block">

Looks to me then that cacosh should be added to the blacklist. Looking at this list of glibc bugs looks like there were fixes that we may want as late as 2012. I'm not sure which version of glibc that means we should start accepting.

@argriffing
Copy link
Contributor

related #6712

@charris
Copy link
Member
charris commented Jan 8, 2016

The glibc 2.16 is the version where a lot of this was fixed..

charris added a commit to charris/numpy that referenced this issue Jan 8, 2016
Added functions are

- cacos
- cacosf
- cacosl
- cacosh
- cacoshf
- cacoshl

Closes numpy#6063.
@charris
Copy link
Member
charris commented Jan 8, 2016

A PR adding those functions (and a few more) to the blacklist is #6975.

@charris
Copy link
Member
charris commented Jan 8, 2016

glibc 2.16 was released 2012-06-30 with this comment

  • Math library bug fixes. A thorough audit of all open math library bugs was
    conducted by Joseph Myers. Significant progress was made on many math
    library bugs resulting in more accurate exceptions and function results.
    Many thanks to all those that contributed including Andreas Jaeger for his
    patch review and work on the x87 trigonometric instruction issues.

@charris charris added this to the 1.11.0 release milestone Jan 8, 2016
jaimefrio pushed a commit to jaimefrio/numpy that referenced this issue Mar 22, 2016
Added functions are

- cacos
- cacosf
- cacosl
- cacosh
- cacoshf
- cacoshl

Closes numpy#6063.
jakirkham pushed a commit to jakirkham/numpy that referenced this issue May 21, 2016
Added functions are

- cacos
- cacosf
- cacosl
- cacosh
- cacoshf
- cacoshl

Closes numpy#6063.
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

8 participants
0