Skip to content

3 tests failed on aarch64 #156

@ggardet

Description

@ggardet

Error log from openSUSE Tumbleweed aarch64:

[  572s] =================================== FAILURES ===================================
[  572s] ___________________________ test_ab08nX.test_ab08nd ____________________________
[  572s] 
[  572s] self = <slycot.tests.test_ab08n.test_ab08nX testMethod=test_ab08nd>
[  572s] 
[  572s]     def test_ab08nd(self):
[  572s]         "Test Construct regular pencil for real matrices"
[  572s] >       self.ab08nX(analysis.ab08nd, self.A, self.B, self.C, self.D)
[  572s] 
[  572s] ../../BUILDROOT/python-slycot-0.4.0.0-4.4.aarch64/usr/lib64/python3.9/site-packages/slycot/tests/test_ab08n.py:73: 
[  572s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[  572s] 
[  572s] self = <slycot.tests.test_ab08n.test_ab08nX testMethod=test_ab08nd>
[  572s] ab08fun = <function ab08nd at 0xffffa682c1f0>
[  572s] A = array([[ 1.,  0.,  0.,  0.,  0.,  0.],
[  572s]        [ 0.,  1.,  0.,  0.,  0.,  0.],
[  572s]        [ 0.,  0.,  3.,  0.,  0.,  0.],
[  572s]        [ 0.,  0.,  0., -4.,  0.,  0.],
[  572s]        [ 0.,  0.,  0.,  0., -1.,  0.],
[  572s]        [ 0.,  0.,  0.,  0.,  0.,  3.]])
[  572s] B = array([[ 0., -1.],
[  572s]        [-1.,  0.],
[  572s]        [ 1., -1.],
[  572s]        [ 0.,  0.],
[  572s]        [ 0.,  1.],
[  572s]        [-1., -1.]])
[  572s] C = array([[1., 0., 0., 1., 0., 0.],
[  572s]        [0., 1., 0., 1., 0., 1.],
[  572s]        [0., 0., 1., 0., 0., 1.]])
[  572s] D = array([[0., 0.],
[  572s]        [0., 0.],
[  572s]        [0., 0.]])
[  572s] 
[  572s]     def ab08nX(self, ab08fun, A, B, C, D):
[  572s]         n = 6
[  572s]         m = 2
[  572s]         p = 3
[  572s]         # Check the observability and compute the ordered set of
[  572s]         # the observability indices (call the routine with M = 0).
[  572s]         out = ab08fun(n, 0, p, A, B, C, D)
[  572s]         nu, rank, dinfz, nkror, nkrol, infz, kronr, kronl, Af, Bf = out[:10]
[  572s]     
[  572s]         assert_equal(kronl[:nkrol], np.array([1, 2, 2]))
[  572s]         assert_equal(n-nu, 5)
[  572s]         assert_allclose(Af[:nu, :nu], np.array([[-1.]]))
[  572s]         # Check the controllability and compute the ordered set of
[  572s]         # the controllability indices (call the routine with P = 0)
[  572s]         out = ab08fun(n, m, 0, A, B, C, D)
[  572s]         nu, rank, dinfz, nkror, nkrol, infz, kronr, kronl, Af, Bf = out[:10]
[  572s]         assert_equal(kronr[:nkror], np.array([2, 3]))
[  572s]         assert_equal(n-nu, 5)
[  572s]         assert_allclose(Af[:nu, :nu], np.array([[-4.]]))
[  572s]         # Compute the structural invariants of the given system.
[  572s]         out = ab08fun(n, m, p, A, B, C, D)
[  572s]         nu, rank, dinfz, nkror, nkrol, infz, kronr, kronl, Af, Bf = out[:10]
[  572s]         assert_equal(nu, 2)
[  572s]         # Compute the invariant zeros of the given system.
[  572s]         w = eig(Af[:nu, :nu], Bf[:nu, :nu], left=False, right=False)
[  572s]         w_ref = np.array([-2., 1.])
[  572s] >       assert_allclose(self.normalize(w), self.normalize(w_ref))
[  572s] E       AssertionError: 
[  572s] E       Not equal to tolerance rtol=1e-07, atol=0
[  572s] E       
[  572s] E       x and y nan location mismatch:
[  572s] E        x: array([nan+nanj, nan+nanj])
[  572s] E        y: array([ 1. , -0.5])
[  572s] 
[  572s] ../../BUILDROOT/python-slycot-0.4.0.0-4.4.aarch64/usr/lib64/python3.9/site-packages/slycot/tests/test_ab08n.py:62: AssertionError
[  572s] _________________________ test_example[ab08nd_example] _________________________
[  572s] 
[  572s] examplefun = <function ab08nd_example at 0xffff9c4f8af0>
[  572s] capsys = <_pytest.capture.CaptureFixture object at 0xffff9c494670>
[  572s] recwarn = WarningsRecorder(record=True)
[  572s] 
[  572s]     @pytest.mark.parametrize('examplefun', examplefunctions)
[  572s]     #ignore numpy ABI change warnings https://github.com/numpy/numpy/pull/432
[  572s]     @pytest.mark.filterwarnings("ignore:numpy.dtype size changed")
[  572s]     @pytest.mark.filterwarnings("ignore:numpy.ufunc size changed")
[  572s]     def test_example(examplefun, capsys, recwarn):
[  572s]         """
[  572s]         Test the examples.
[  572s]     
[  572s]         Test that all the examples work, produce some (unchecked) output but no
[  572s]         exceptions or warnings.
[  572s]         """
[  572s]         examplefun()
[  572s]         captured = capsys.readouterr()
[  572s]     
[  572s]         # fail for first in order
[  572s]         failconditions = [
[  572s]             ((not len(captured.out) > 0), "Example {} did not print any results\n"),
[  572s]             (captured.err, "Example {} wrote to stderr\n"),
[  572s]             (check_warn(recwarn, examplefun), "Example {} produced a warning.\n")]
[  572s]         for failed, msgfmt  in failconditions:
[  572s]             if failed:
[  572s] >               pytest.fail(msgfmt.format(examplefun.__name__) +
[  572s]                             "Captured output:\n{}\n"
[  572s]                             "Captured stderr:\n{}\n"
[  572s]                             "Captured warnings:\n{}\n"
[  572s]                             "".format(captured.out,
[  572s]                                       captured.err,
[  572s]                                       [w.message for w in recwarn]))
[  572s] E               Failed: Example ab08nd_example produced a warning.
[  572s] E               Captured output:
[  572s] E               --- Example for ab08nd ---
[  572s] E               The finite invariant zeros are
[  572s] E               [nan+nanj nan+nanj]
[  572s] E               
[  572s] E               Captured stderr:
[  572s] E               
[  572s] E               Captured warnings:
[  572s] E               [RuntimeWarning('invalid value encountered in true_divide')]
[  572s] 
[  572s] ../../BUILDROOT/python-slycot-0.4.0.0-4.4.aarch64/usr/lib64/python3.9/site-packages/slycot/tests/test_examples.py:54: Failed
[  572s] _______________________ test_tb05ad.test_tb05ad_balance ________________________
[  572s] 
[  572s] self = <slycot.tests.test_tb05ad.test_tb05ad testMethod=test_tb05ad_balance>
[  572s] 
[  572s]     def test_tb05ad_balance(self):
[  572s]         """Test balancing in tb05ad.
[  572s]     
[  572s]         Tests for the cause of the problem reported in issue #11
[  572s]         balancing permutations were not correctly applied to the
[  572s]         C and D matrix.
[  572s]         """
[  572s]     
[  572s]         # find a good test case. Some sparsity,
[  572s]         # some zero eigenvalues, some non-zero eigenvalues,
[  572s]         # and proof that the 1st step, with dgebal, does some
[  572s]         # permutation and some scaling
[  572s]         crit = False
[  572s]         n = 8
[  572s]         while not crit:
[  572s]             A = np.random.randn(n, n)
[  572s]             A[np.random.uniform(size=(n, n)) > 0.35] = 0.0
[  572s]     
[  572s] >           Aeig = eig(A)[0]
[  572s] 
[  572s] ../../BUILDROOT/python-slycot-0.4.0.0-4.4.aarch64/usr/lib64/python3.9/site-packages/slycot/tests/test_tb05ad.py:208: 
[  572s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[  572s] /usr/lib64/python3.9/site-packages/scipy/linalg/decomp.py:247: in eig
[  572s]     _check_info(info, 'eig algorithm (geev)',
[  572s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[  572s] 
[  572s] info = 8, driver = 'eig algorithm (geev)'
[  572s] positive = 'did not converge (only eigenvalues with order >= %d have converged)'
[  572s] 
[  572s]     def _check_info(info, driver, positive='did not converge (LAPACK info=%d)'):
[  572s]         """Check info return value."""
[  572s]         if info < 0:
[  572s]             raise ValueError('illegal value in argument %d of internal %s'
[  572s]                              % (-info, driver))
[  572s]         if info > 0 and positive:
[  572s] >           raise LinAlgError(("%s " + positive) % (driver, info,))
[  572s] E           numpy.linalg.LinAlgError: eig algorithm (geev) did not converge (only eigenvalues with order >= 8 have converged)
[  572s] 
[  572s] /usr/lib64/python3.9/site-packages/scipy/linalg/decomp.py:1356: LinAlgError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions