scipy: TST: my local test failures
Describe your issue.
Per https://github.com/scipy/scipy/issues/20801#issuecomment-2133331859, I’ll report all my local test failures here. I’m skipping:
scipy/linalg/tests/test_cython_blas.py::TestWfuncPointers::test_complex_args(fatal access violation)- all of
scipy/sparse/linalg/_eigen/arpack/tests/test_arpack.pyafterscipy/sparse/linalg/_eigen/arpack/tests/test_arpack.py::test_hermitian_modes(hangs)scipy/sparse/linalg/_eigen/arpack/tests/test_arpack.py::test_complex_nonsymmetric_modes(hangs)
- all of
scipy/sparse/linalg/_eigen/tests/test_svds.pyafterscipy/sparse/linalg/_eigen/tests/test_svds.py::Test_SVDS_ARPACK::test_svd_linop(fatal access violation)
Additional failures from slow and xslow runs are posted as separate comments.
Reproducing Code Example
pytest scipy -v > pytest_log.txt
Error message
=========================== short test summary info ===========================
FAILED scipy/io/tests/test_mmio.py::test_threadpoolctl[scipy.io._mmio] - Runt...
FAILED scipy/io/tests/test_mmio.py::test_threadpoolctl[scipy.io._fast_matrix_market]
FAILED scipy/linalg/tests/test_blas.py::TestFBLAS1Simple::test_complex_dotu
FAILED scipy/linalg/tests/test_blas.py::TestFBLAS1Simple::test_complex_dotc
FAILED scipy/linalg/tests/test_cython_lapack.py::TestLamch::test_complex_ladiv
FAILED scipy/linalg/tests/test_matfuncs.py::TestExpM::test_gh18086
FAILED scipy/sparse/linalg/_isolve/tests/test_iterative.py::test_x0_equals_Mb[nonsymposdef-bicgstab]
= 7 failed, 49059 passed, 14081 skipped, 158 xfailed, 11 xpassed in 486.46s (0:08:06) =
================================== FAILURES ===================================
_____________________ test_threadpoolctl[scipy.io._mmio] ______________________
def test_threadpoolctl():
try:
import threadpoolctl
if not hasattr(threadpoolctl, "register"):
pytest.skip("threadpoolctl too old")
return
except ImportError:
pytest.skip("no threadpoolctl")
return
> with threadpoolctl.threadpool_limits(limits=4):
threadpoolctl = <module 'threadpoolctl' from 'C:\\Users\\matth\\miniforge3\\envs\\scipy-dev\\Lib\\site-packages\\threadpoolctl.py'>
scipy\io\tests\test_mmio.py:799:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\miniforge3\envs\scipy-dev\Lib\site-packages\threadpoolctl.py:794: in __init__
super().__init__(ThreadpoolController(), limits=limits, user_api=user_api)
__class__ = <class 'threadpoolctl.threadpool_limits'>
limits = 4
self = <threadpoolctl.threadpool_limits object at 0x0000022F2E884890>
user_api = None
..\miniforge3\envs\scipy-dev\Lib\site-packages\threadpoolctl.py:819: in __init__
self._warn_if_incompatible_openmp()
self = <threadpoolctl.ThreadpoolController object at 0x0000022F2E919490>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <threadpoolctl.ThreadpoolController object at 0x0000022F2E919490>
def _warn_if_incompatible_openmp(self):
"""Raise a warning if llvm-OpenMP and intel-OpenMP are both loaded"""
prefixes = [lib_controller.prefix for lib_controller in self.lib_controllers]
msg = textwrap.dedent(
"""
Found Intel OpenMP ('libiomp') and LLVM OpenMP ('libomp') loaded at
the same time. Both libraries are known to be incompatible and this
can cause random crashes or deadlocks on Linux when loaded in the
same Python program.
Using threadpoolctl may cause crashes or deadlocks. For more
information and possible workarounds, please see
https://github.com/joblib/threadpoolctl/blob/master/multiple_openmp.md
"""
)
if "libomp" in prefixes and "libiomp" in prefixes:
> warnings.warn(msg, RuntimeWarning)
E RuntimeWarning:
E Found Intel OpenMP ('libiomp') and LLVM OpenMP ('libomp') loaded at
E the same time. Both libraries are known to be incompatible and this
E can cause random crashes or deadlocks on Linux when loaded in the
E same Python program.
E Using threadpoolctl may cause crashes or deadlocks. For more
E information and possible workarounds, please see
E https://github.com/joblib/threadpoolctl/blob/master/multiple_openmp.md
msg = "\nFound Intel OpenMP ('libiomp') and LLVM OpenMP ('libomp') loaded at\nthe same time. Both libraries are known to be ...ion and possible workarounds, please see\n https://github.com/joblib/threadpoolctl/blob/master/multiple_openmp.md\n"
prefixes = ['libblas', 'libomp', 'libiomp', '_fmm_core']
self = <threadpoolctl.ThreadpoolController object at 0x0000022F2E919490>
..\miniforge3\envs\scipy-dev\Lib\site-packages\threadpoolctl.py:1214: RuntimeWarning
______________ test_threadpoolctl[scipy.io._fast_matrix_market] _______________
def test_threadpoolctl():
try:
import threadpoolctl
if not hasattr(threadpoolctl, "register"):
pytest.skip("threadpoolctl too old")
return
except ImportError:
pytest.skip("no threadpoolctl")
return
> with threadpoolctl.threadpool_limits(limits=4):
threadpoolctl = <module 'threadpoolctl' from 'C:\\Users\\matth\\miniforge3\\envs\\scipy-dev\\Lib\\site-packages\\threadpoolctl.py'>
scipy\io\tests\test_mmio.py:799:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\miniforge3\envs\scipy-dev\Lib\site-packages\threadpoolctl.py:794: in __init__
super().__init__(ThreadpoolController(), limits=limits, user_api=user_api)
__class__ = <class 'threadpoolctl.threadpool_limits'>
limits = 4
self = <threadpoolctl.threadpool_limits object at 0x0000022F2ABC43D0>
user_api = None
..\miniforge3\envs\scipy-dev\Lib\site-packages\threadpoolctl.py:819: in __init__
self._warn_if_incompatible_openmp()
self = <threadpoolctl.ThreadpoolController object at 0x0000022F2ABC4410>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <threadpoolctl.ThreadpoolController object at 0x0000022F2ABC4410>
def _warn_if_incompatible_openmp(self):
"""Raise a warning if llvm-OpenMP and intel-OpenMP are both loaded"""
prefixes = [lib_controller.prefix for lib_controller in self.lib_controllers]
msg = textwrap.dedent(
"""
Found Intel OpenMP ('libiomp') and LLVM OpenMP ('libomp') loaded at
the same time. Both libraries are known to be incompatible and this
can cause random crashes or deadlocks on Linux when loaded in the
same Python program.
Using threadpoolctl may cause crashes or deadlocks. For more
information and possible workarounds, please see
https://github.com/joblib/threadpoolctl/blob/master/multiple_openmp.md
"""
)
if "libomp" in prefixes and "libiomp" in prefixes:
> warnings.warn(msg, RuntimeWarning)
E RuntimeWarning:
E Found Intel OpenMP ('libiomp') and LLVM OpenMP ('libomp') loaded at
E the same time. Both libraries are known to be incompatible and this
E can cause random crashes or deadlocks on Linux when loaded in the
E same Python program.
E Using threadpoolctl may cause crashes or deadlocks. For more
E information and possible workarounds, please see
E https://github.com/joblib/threadpoolctl/blob/master/multiple_openmp.md
msg = "\nFound Intel OpenMP ('libiomp') and LLVM OpenMP ('libomp') loaded at\nthe same time. Both libraries are known to be ...ion and possible workarounds, please see\n https://github.com/joblib/threadpoolctl/blob/master/multiple_openmp.md\n"
prefixes = ['libblas', 'libomp', 'libiomp', '_fmm_core']
self = <threadpoolctl.ThreadpoolController object at 0x0000022F2ABC4410>
..\miniforge3\envs\scipy-dev\Lib\site-packages\threadpoolctl.py:1214: RuntimeWarning
_____________________ TestFBLAS1Simple.test_complex_dotu ______________________
args = (0.0, -9.0), kwds = {'decimal': 7}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Arrays are not almost equal to 7 decimals
E ACTUAL: 0.0
E DESIRED: -9.0
args = (0.0, -9.0)
func = <function assert_almost_equal at 0x0000022EF667BCE0>
kwds = {'decimal': 7}
self = <contextlib._GeneratorContextManager object at 0x0000022EF6650710>
..\miniforge3\envs\scipy-dev\Lib\contextlib.py:81: AssertionError
During handling of the above exception, another exception occurred:
self = <scipy.linalg.tests.test_blas.TestFBLAS1Simple object at 0x0000022F065239D0>
def test_complex_dotu(self):
for p in 'cz':
f = getattr(fblas, p+'dotu', None)
if f is None:
continue
> assert_almost_equal(f([3j, -4, 3-4j], [2, 3, 1]), -9+2j)
f = <fortran function cdotu>
p = 'c'
self = <scipy.linalg.tests.test_blas.TestFBLAS1Simple object at 0x0000022F065239D0>
scipy\linalg\tests\test_blas.py:149:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (0j, (-9+2j)), kwds = {}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Arrays are not almost equal to 7 decimals
E ACTUAL: 0j
E DESIRED: (-9+2j)
args = (0j, (-9+2j))
func = <function assert_almost_equal at 0x0000022EF667BCE0>
kwds = {}
self = <contextlib._GeneratorContextManager object at 0x0000022EF6650710>
..\miniforge3\envs\scipy-dev\Lib\contextlib.py:81: AssertionError
_____________________ TestFBLAS1Simple.test_complex_dotc ______________________
args = (0.0, 3.0), kwds = {'decimal': 7}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Arrays are not almost equal to 7 decimals
E ACTUAL: 0.0
E DESIRED: 3.0
args = (0.0, 3.0)
func = <function assert_almost_equal at 0x0000022EF667BCE0>
kwds = {'decimal': 7}
self = <contextlib._GeneratorContextManager object at 0x0000022EF6650710>
..\miniforge3\envs\scipy-dev\Lib\contextlib.py:81: AssertionError
During handling of the above exception, another exception occurred:
self = <scipy.linalg.tests.test_blas.TestFBLAS1Simple object at 0x0000022F0661E750>
def test_complex_dotc(self):
for p in 'cz':
f = getattr(fblas, p+'dotc', None)
if f is None:
continue
> assert_almost_equal(f([3j, -4, 3-4j], [2, 3j, 1]), 3-14j)
f = <fortran function cdotc>
p = 'c'
self = <scipy.linalg.tests.test_blas.TestFBLAS1Simple object at 0x0000022F0661E750>
scipy\linalg\tests\test_blas.py:156:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (0j, (3-14j)), kwds = {}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Arrays are not almost equal to 7 decimals
E ACTUAL: 0j
E DESIRED: (3-14j)
args = (0j, (3-14j))
func = <function assert_almost_equal at 0x0000022EF667BCE0>
kwds = {}
self = <contextlib._GeneratorContextManager object at 0x0000022EF6650710>
..\miniforge3\envs\scipy-dev\Lib\contextlib.py:81: AssertionError
________________________ TestLamch.test_complex_ladiv _________________________
self = <scipy.linalg.tests.test_cython_lapack.TestLamch object at 0x0000022F06606790>
def test_complex_ladiv(self):
cx = .5 + 1.j
cy = .875 + 2.j
assert_allclose(cython_lapack._test_zladiv(cy, cx), 1.95+0.1j)
> assert_allclose(cython_lapack._test_cladiv(cy, cx), 1.95+0.1j)
cx = (0.5+1j)
cy = (0.875+2j)
self = <scipy.linalg.tests.test_cython_lapack.TestLamch object at 0x0000022F06606790>
scipy\linalg\tests\test_cython_lapack.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x0000022F2AC37880>, array(1.1444623e+19+9.9492191e-44j), array(1.95+0.1j))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=0
E
E Mismatched elements: 1 / 1 (100%)
E Max absolute difference: 1.1444623e+19
E Max relative difference: 5.86133529e+18
E x: array(1.144462e+19+9.949219e-44j)
E y: array(1.95+0.1j)
args = (<function assert_allclose.<locals>.compare at 0x0000022F2AC37880>, array(1.1444623e+19+9.9492191e-44j), array(1.95+0.1j))
func = <function assert_array_compare at 0x0000022EF667BF60>
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0', 'verbose': True}
self = <contextlib._GeneratorContextManager object at 0x0000022EF3CFBE50>
..\miniforge3\envs\scipy-dev\Lib\contextlib.py:81: AssertionError
____________________________ TestExpM.test_gh18086 ____________________________
Test passed but took too long to run: Duration 2.8498623999767005s > 2s
__________________ test_x0_equals_Mb[nonsymposdef-bicgstab] ___________________
case = <nonsymposdef-bicgstab>
def test_x0_equals_Mb(case):
if case.solver is tfqmr:
pytest.skip("Solver does not support x0='Mb'")
A = case.A
b = case.b
x0 = 'Mb'
rtol = 1e-8
x, info = case.solver(A, b, x0=x0, rtol=rtol)
assert_array_equal(x0, 'Mb') # ensure that x0 is not overwritten
> assert info == 0
E AssertionError
A = <Compressed Sparse Row sparse matrix of dtype 'float64'
with 19 stored elements and shape (10, 10)>
b = array([0., 1., 2., 3., 4., 5., 6., 7., 8., 9.])
case = <nonsymposdef-bicgstab>
info = -11
rtol = 1e-08
x = array([0. , 0.52361589, 1.32356787, 2.15281624, 3. ,
4. , 5. , 6. , 7. , 8. ])
x0 = 'Mb'
scipy\sparse\linalg\_isolve\tests\test_iterative.py:522: AssertionError
=========================== short test summary info ===========================
FAILED scipy/io/tests/test_mmio.py::test_threadpoolctl[scipy.io._mmio] - Runt...
FAILED scipy/io/tests/test_mmio.py::test_threadpoolctl[scipy.io._fast_matrix_market]
FAILED scipy/linalg/tests/test_blas.py::TestFBLAS1Simple::test_complex_dotu
FAILED scipy/linalg/tests/test_blas.py::TestFBLAS1Simple::test_complex_dotc
FAILED scipy/linalg/tests/test_cython_lapack.py::TestLamch::test_complex_ladiv
FAILED scipy/linalg/tests/test_matfuncs.py::TestExpM::test_gh18086
FAILED scipy/sparse/linalg/_isolve/tests/test_iterative.py::test_x0_equals_Mb[nonsymposdef-bicgstab]
= 7 failed, 49059 passed, 14081 skipped, 158 xfailed, 11 xpassed in 486.46s (0:08:06) =
SciPy/NumPy/Python version and system information
1.14.0.dev0+1321.ad8e221 1.26.4 sys.version_info(major=3, minor=11, micro=9, releaselevel='final', serial=0)
Build Dependencies:
blas:
detection method: pkgconfig
found: true
include directory: C:/Users/matth/miniforge3/envs/scipy-dev/Library/include/openblas
lib directory: C:/Users/matth/miniforge3/envs/scipy-dev/Library/lib
name: openblas
openblas configuration: USE_64BITINT= NO_CBLAS= NO_LAPACK= NO_LAPACKE= DYNAMIC_ARCH=ON
DYNAMIC_OLDER=OFF NO_AFFINITY=1 USE_OPENMP= HASWELL MAX_THREADS=128
pc file directory: C:\Users\matth\miniforge3\envs\scipy-dev\Library\lib\pkgconfig
version: 0.3.27
lapack:
detection method: pkgconfig
found: true
include directory: C:/Users/matth/miniforge3/envs/scipy-dev/Library/include/openblas
lib directory: C:/Users/matth/miniforge3/envs/scipy-dev/Library/lib
name: openblas
openblas configuration: USE_64BITINT= NO_CBLAS= NO_LAPACK= NO_LAPACKE= DYNAMIC_ARCH=ON
DYNAMIC_OLDER=OFF NO_AFFINITY=1 USE_OPENMP= HASWELL MAX_THREADS=128
pc file directory: C:\Users\matth\miniforge3\envs\scipy-dev\Library\lib\pkgconfig
version: 0.3.27
pybind11:
detection method: pkgconfig
include directory: C:/Users/matth/miniforge3/envs/scipy-dev/Library/include
name: pybind11
version: 2.12.0
Compilers:
c:
commands: cc
linker: ld.bfd
name: gcc
version: 10.3.0
c++:
commands: c++
linker: ld.bfd
name: gcc
version: 10.3.0
cython:
commands: cython
linker: cython
name: cython
version: 3.0.10
fortran:
commands: gfortran
linker: ld.bfd
name: gcc
version: 10.3.0
pythran:
include directory: ..\..\miniforge3\envs\scipy-dev\Lib\site-packages\pythran
version: 0.15.0
Machine Information:
build:
cpu: x86_64
endian: little
family: x86_64
system: windows
cross-compiled: false
host:
cpu: x86_64
endian: little
family: x86_64
system: windows
Python Information:
path: C:\Users\matth\miniforge3\envs\scipy-dev\python.exe
version: '3.11'
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 17 (17 by maintainers)
The issue for the failure of
TestOnenormest.test_onenormest_table_6_t_1is gh-17385.