Skip to content

BUG: Fix testsuite failures on ppc and riscv #13095

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

Merged
merged 2 commits into from
Mar 6, 2019
Merged

BUG: Fix testsuite failures on ppc and riscv #13095

merged 2 commits into from
Mar 6, 2019

Conversation

andreas-schwab
Copy link
Contributor

https://build.opensuse.org/package/live_build_log/openSUSE:Factory:PowerPC/python-numpy/standard/ppc:

=================================== FAILURES ===================================
_________________ TestConversion.test_int_from_huge_longdouble _________________

self = <numpy.core.tests.test_scalarmath.TestConversion object at 0xef02fef0>

@pytest.mark.skipif(np.finfo(np.double) == np.finfo(np.longdouble),
                    reason="long double is same as double")
@pytest.mark.skipif(platform.machine().startswith("ppc64"),
                    reason="IBM double double")
def test_int_from_huge_longdouble(self):
    # Produce a longdouble that would overflow a double,
    # use exponent that avoids bug in Darwin pow function.
    exp = np.finfo(np.double).maxexp - 1
  huge_ld = 2 * 1234 * np.longdouble(2) ** exp

E RuntimeWarning: overflow encountered in longdouble_scalars

exp = 1023
self = <numpy.core.tests.test_scalarmath.TestConversion object at 0xef02fef0>

../../../BUILDROOT/python-numpy-1.16.1-3.1.ppc/usr/lib/python2.7/site-packages/numpy/core/tests/test_scalarmath.py:431: RuntimeWarning
______________________________ TestKind.test_all _______________________________

self = <numpy.f2py.tests.test_kind.TestKind object at 0xeede8d50>

@pytest.mark.slow
def test_all(self):
    selectedrealkind = self.module.selectedrealkind
    selectedintkind = self.module.selectedintkind

    for i in range(40):
        assert_(selectedintkind(i) in [selected_int_kind(i), -1],
                'selectedintkind(%s): expected %r but got %r' %
                (i, selected_int_kind(i), selectedintkind(i)))

    for i in range(20):
        assert_(selectedrealkind(i) in [selected_real_kind(i), -1],
                'selectedrealkind(%s): expected %r but got %r' %
              (i, selected_real_kind(i), selectedrealkind(i)))

E AssertionError: selectedrealkind(16): expected 10 but got 16

i = 16
selectedintkind =
selectedrealkind =
self = <numpy.f2py.tests.test_kind.TestKind object at 0xeede8d50>

../../../BUILDROOT/python-numpy-1.16.1-3.1.ppc/usr/lib/python2.7/site-packages/numpy/f2py/tests/test_kind.py:34: AssertionError
= 2 failed, 7227 passed, 132 skipped, 11 xfailed, 2 xpassed in 490.92 seconds ==

This fixes TestConversion.test_int_from_huge_longdouble.
This fixes numpy.f2py.tests.test_kind.TestKind
@mattip
Copy link
Member

mattip commented Mar 5, 2019

Test failure not connected, comes from the doctests failing. See #13096

@charris charris added this to the 1.16.3 release milestone Mar 5, 2019
@mattip
Copy link
Member

mattip commented Mar 6, 2019

@andreas-schwab does numpy build/run/pass tests on riscv?

@andreas-schwab
Copy link
Contributor Author

All except of numpy.core.tests.test_numeric.TestBoolCmp.

https://build.opensuse.org/package/show/openSUSE:Factory:RISCV/python-numpy

@mattip
Copy link
Member

mattip commented Mar 6, 2019

Cool . I do see another couple of patches, is the remove-__declspec.patch still needed to reduce warnings?

@andreas-schwab
Copy link
Contributor Author

I don't know about the other patches, I do not maintain the openSUSE package.

@mattip mattip merged commit cf73967 into numpy:master Mar 6, 2019
@mattip
Copy link
Member

mattip commented Mar 6, 2019

Thanks @andreas-schwab

@charris charris changed the title Fix testsuite failures on ppc and riscv BUG: Fix testsuite failures on ppc and riscv Mar 6, 2019
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Mar 16, 2019
@charris charris removed this from the 1.16.3 release milestone Mar 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants