Skip to content
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

BUG: TestNNLS.test_nnls_inner_loop_case1 fails on windows with MKL #20470

Open
h-vetinari opened this issue Apr 14, 2024 · 0 comments
Open

BUG: TestNNLS.test_nnls_inner_loop_case1 fails on windows with MKL #20470

h-vetinari opened this issue Apr 14, 2024 · 0 comments
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.optimize

Comments

@h-vetinari
Copy link
Member

This already showed up in the 1.13 release PR on the conda-forge feedstock, but was deferred at the time. Further testing showed that it only happens with the MKL-flavour of BLAS/LAPACK, and even more particularly, only in the presence of some AVX512 instructions:

_____________________ TestNNLS.test_nnls_inner_loop_case1 _____________________
[gw0] win32 -- Python 3.9.19 %PREFIX%\python.exe
..\_test_env\lib\site-packages\scipy\optimize\tests\test_nnls.py:101: in test_nnls_inner_loop_case1
    dact, _ = nnls(W @ A, W @ k)
        2.23606798,  2.23606798,  1.        ,  1.41421356,  1.73205081,
        1.        ,  1.41421356])
..\_test_env\lib\site-packages\scipy\optimize\_nnls.py:93: in nnls
    raise RuntimeError("Maximum number of iterations reached.")
E   RuntimeError: Maximum number of iterations reached.
        A          = array([[ 5.19615242,  0.        ,  0.        , ...,  0.        ,
         0.        ,  0.        ],
       [ 2.8284271...   , -1.        ],
       [ 2.82842712,  2.82842712,  2.82842712, ...,  2.82842712,
         2.82842712,  2.82842712]])
        atol       = None
        b          = array([   0.        ,    0.        ,    0.        ,    0.        ,
          0.        ,    0.        ,    0.        ,...         11.27887984,    8.05634274,    0.        ,    4.07622283,
          0.        ,    0.        ,    0.        ])
        m          = 67
        maxiter    = None
        mode       = -1
        n          = 67
        rnorm      = 0.0
        x          = array([0.        , 0.        , 0.        , 0.        , 0.        ,
       0.        , 0.        , 0.        , 0.      ...       , 0.        ,
       0.        , 0.        , 0.        , 0.        , 0.        ,
       0.        , 0.        ])

FAILED optimize/tests/test_nnls.py::TestNNLS::test_nnls_inner_loop_case1 - RuntimeError: Maximum number of iterations reached.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.optimize
Projects
None yet
Development

No branches or pull requests

2 participants
@h-vetinari and others