Source: scipy
Version: 1.12.0-2
Severity: normal
Control: forwarded -1 https://github.com/scipy/scipy/issues/21057

loong64 is failing the TestQuad.test_complex test from the integrate
tests.

The failure only started recently, the test was passing before 14
June. I'm not certain what changed. The gcc version is the same.

Build logs (building scipy 1.13.1) can be found at
https://buildd.debian.org/status/logs.php?pkg=scipy&arch=loong64

e.g.
https://buildd.debian.org/status/fetch.php?pkg=scipy&arch=loong64&ver=1.13.1-1exp7&stamp=1719404050&raw=0

Only this one test is failing on loong64, but the error looks serious
enough to report rather than skip and ignore.  We may need loong64
porters to step in and help.

For comparison, the test is still passing on MIPS64 (mips64el),
https://buildd.debian.org/status/fetch.php?pkg=scipy&arch=mips64el&ver=1.13.1-1exp6&stamp=1718428354&raw=0


The error message is:
____________________________ TestQuad.test_complex _____________________________

E   AssertionError: 
    Items are not equal:
     ACTUAL: 230.90706003885032
     DESIRED: 32.986722862692815
All traceback entries are hidden. Pass `--full-trace` to see hidden and 
internal frames.

During handling of the above exception, another exception occurred:

self = <scipy.integrate.tests.test_quadpack.TestQuad object at 0x7fffe9cb2540>

    def test_complex(self):
        def tfunc(x):
            return np.exp(1j*x)
    
        assert np.allclose(
                    quad(tfunc, 0, np.pi/2, complex_func=True)[0],
                    1+1j)
    
        # We consider a divergent case in order to force quadpack
        # to return an error message.  The output is compared
        # against what is returned by explicit integration
        # of the parts.
        kwargs = {'a': 0, 'b': np.inf, 'full_output': True,
                  'weight': 'cos', 'wvar': 1}
        res_c = quad(tfunc, complex_func=True, **kwargs)
        res_r = quad(lambda x: np.real(np.exp(1j*x)),
                     complex_func=False,
                     **kwargs)
        res_i = quad(lambda x: np.imag(np.exp(1j*x)),
                     complex_func=False,
                     **kwargs)
    
>       np.testing.assert_equal(res_c[0], res_r[0] + 1j*res_i[0])
E       AssertionError: 
E       Items are not equal:
E        ACTUAL: (230.90706003885032+1.1655968375567166e-15j)
E        DESIRED: (32.986722862692815+1.1655968375567166e-15j)

kwargs     = {'a': 0, 'b': inf, 'full_output': True, 'weight': 'cos', ...}
res_c      = ((230.90706003885032+1.1655968375567166e-15j), 
(292.1681167840555+5.585367613532157e-15j), {'imag': ({'erlst': array([...ure 
invoked on this cycle.  It is assumed that the result on this interval is the 
best which can be obtained.', ...})})
res_i      = (1.1655968375567166e-15, 5.585367613532157e-15, {'erlst': 
array([4.82013969e-18, 3.89507855e-16, 4.53618857e-17, 1.498...     1038530212, 
-1073741824,  1042556203, -2147483648,  1041689581],
      dtype=int32), 'lst': 6, 'neval': 150, ...})
res_r      = (32.986722862692815, 2.0517814695912247e-10, {'erlst': 
array([2.05135975e-11, 2.05139675e-11, 2.05132276e-11, 2.051267...     
1049296283,  -778100732,  1048957913, -1583113503,  1049668002],
      dtype=int32), 'lst': 7, 'neval': 525, ...})
self       = <scipy.integrate.tests.test_quadpack.TestQuad object at 
0x7fffe9cb2540>
tfunc      = <function TestQuad.test_complex.<locals>.tfunc at 0x7fffdb430040>

scipy/integrate/tests/test_quadpack.py:530: AssertionError

Reply via email to