bodono / scs-python

Python interface for SCS
MIT License
41 stars 33 forks source link

FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries #5

Closed qinfeng closed 6 years ago

qinfeng commented 6 years ago

I get below error when run test after install scs:

Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure

OS: ubuntu 16.04 LTS Python: 3.6.5

reproduce:

pipenv --python 3.6
pipenv shell
pipenv install scs pytest nose
git clone --recursive https://github.com/bodono/scs-python.git
pytest scs-python/test/test_scs_sdp.py

error:

----------------------------------------------------------------------------
    SCS v2.0.2 - Splitting Conic Solver
    (c) Brendan O'Donoghue, Stanford University, 2012-2017
----------------------------------------------------------------------------
Lin-sys: sparse-indirect, nnz in A = 907, CG tol ~ 1/iter^(2.00)
eps = 1.00e-05, alpha = 1.50, max_iters = 100000, normalize = 1, scale = 1.00
acceleration_lookback = -1, rho_x = 1.00e-03
Variables n = 55, constraints m = 165
Cones:  primal zero / dual free vars: 10
    linear vars: 25
    soc vars: 16, soc blks: 4
    sd vars: 99, sd blks: 7
    primal + dual power vars: 15
FATAL: Cannot solve SDPs with > 2x2 matrices without linked blas+lapack libraries
Install blas+lapack and re-compile SCS with blas+lapack libray locations
ERROR: init_cone failure
Setup time: 1.16e-04s
Failure:could not initialize work
qinfeng commented 6 years ago

The problem is solved by removing pip cache for scs-2.0.2, then install blas/lapack in ubuntu, then reinstall scs via pip install -I scs

Basically, the problem is I installed scs before installing blas/lapack, so that the wheel is been cached in pip cache folder.

Even though I installed blas/lapack later, pip install scs will not re-compile scs with blas/lapack since it install scs from the cached wheel file.

bodono commented 6 years ago

Thanks for the info!

appleeisen commented 5 years ago

I'm new to python cvxpy, and I'm not familiar with the commands in python. Could you please write the detailed procedures? Thank you very much!

qinfeng commented 5 years ago

@appleeisen install blas/lapack in Ubuntu sudo apt install -y libatlas-base-dev

force reinstall scs by ingoring cache pip install --no-cache-dir ---ignore-installed scs

Hope it helps.