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

CSDP stuck #10

Closed
blegat opened this issue Nov 12, 2016 · 8 comments
Closed

CSDP stuck #10

blegat opened this issue Nov 12, 2016 · 8 comments

Comments

@blegat
Copy link
Member

blegat commented Nov 12, 2016

For this input, CSDP gets stuck for me on Ubuntu 64 bits.
@EQt could it be the openblas bug you were talking about ? Is there an option to compile csdp with atlas ?
fail.dat-s.zip

@blegat
Copy link
Member Author

blegat commented Nov 13, 2016

Both sdpa and csdp binaries on Ubuntu can't solve it. However if you look here, they say

BLAS on Ubuntu is not optimized so well. The performance of Ubuntu package is inferior to the SDPA linked with opitimized BLAS.

So it might be possible to do better.

@EQt
Copy link
Contributor

EQt commented Nov 13, 2016

For this input, CSDP gets stuck for me on Ubuntu 64 bits.
fail.dat-s.zip

This also gets stuck for csdp linked to atlas.

Just discovered that Brian Borcher, the author of CSDP, has joined github in June 2016. So we could ask him, why it gets stuck in some cases...

@blegat
Copy link
Member Author

blegat commented Nov 13, 2016

Yes, good idea. We can also add this wrapper to this page: https://projects.coin-or.org/Csdp/
@brianborchers Do you know which BLAS/LAPACK libraries work best with CSDP ?

@blegat
Copy link
Member Author

blegat commented Nov 13, 2016

According to the SDPA install instruction, to get the best performance with SDPA, we need to use OpenBLAS that we compile with

make BINARY=64 CC=gcc FC=gfortran USE_OPENMP=0 NO_CBLAS=1 NO_WARMUP=1 libs netlib

@blegat
Copy link
Member Author

blegat commented Nov 13, 2016

With SDPA and the argument -pt 2 which corresponds to "slow (stable)", SDPA can't solve it using the Ubuntu binaries but can solve it using OpenBLAS compiled as explained in the SDPA install instructions

$ sdpa fail.dat-s out.result -pt 2 # Ubuntu binaries
SDPA (Version 7.3.9) start at [Sun Nov 13 12:43:44 2016]
set   is STABLE_BUT_SLOW
data  is fail.dat-s : sparse
out   is out.result
NumThreads  is set as 1
Schur computation : DENSE 
Entering DMUMPS driver with JOB, N, NZ =  -2           0              0
   mu      thetaP  thetaD  objP      objD      alphaP  alphaD  beta 
 0 1.0e+08 1.0e+00 1.0e+00 -0.00e+00 -0.00e+00 6.3e-01 6.6e-01 3.00e-01
 1 5.0e+07 3.7e-01 3.4e-01 -2.24e+04 -0.00e+00 6.8e-01 7.2e-01 3.00e-01
 2 2.2e+07 1.2e-01 9.5e-02 -4.40e+04 -0.00e+00 6.8e-01 7.0e-01 3.00e-01
 3 9.9e+06 3.8e-02 2.9e-02 -6.13e+04 -0.00e+00 6.8e-01 7.9e-01 3.00e-01
 4 4.3e+06 1.2e-02 5.9e-03 -5.55e+04 -0.00e+00 7.4e-01 7.7e-01 3.00e-01
 5 1.6e+06 3.2e-03 1.4e-03 -1.66e+04 -0.00e+00 7.8e-01 8.1e-01 3.00e-01
 6 5.3e+05 7.2e-04 2.6e-04 -3.58e+03 -0.00e+00 7.4e-01 1.0e+00 3.00e-01
 7 2.0e+05 1.8e-04 6.7e-06 -7.70e+02 -0.00e+00 7.6e-01 1.0e+00 3.00e-01
 8 7.6e+04 4.4e-05 7.3e-05 -1.60e+02 -0.00e+00 7.9e-01 1.0e+00 3.00e-01
 9 2.5e+04 9.1e-06 3.5e-04 -3.41e+01 -0.00e+00 7.9e-01 1.0e+00 3.00e-01
10 8.5e+03 1.9e-06 3.5e-04 -6.83e+00 -0.00e+00 8.0e-01 1.0e+00 3.00e-01
11 2.8e+03 3.8e-07 5.4e-04 -1.38e+00 -0.00e+00 8.0e-01 1.0e+00 3.00e-01
12 9.0e+02 7.8e-08 1.9e-03 -2.77e-01 -0.00e+00 6.0e-01 1.0e+00 3.00e-01
13 6.2e+02 3.2e-08 9.1e-04 -5.52e-02 -0.00e+00 7.0e-01 1.0e+00 3.00e-01
cholesky miss condition :: not positive definite :: info = 15 :: line 785 in sdpa_linear.cpp
There are some possibilities. :: line 786 in sdpa_linear.cpp
1. SDPA terminates due to inaccuracy of numerical error :: line 787 in sdpa_linear.cpp
2. The input problem may not have (any) interior-points :: line 788 in sdpa_linear.cpp
3. Input matrices are linearly dependent :: line 789 in sdpa_linear.cpp
14 3.1e+02 9.4e-09 1.1e-02 -2.81e-02 -0.00e+00 7.0e-01 1.0e+00 3.00e-01

phase.value  = noINFO    
   Iteration = 14
          mu = +3.0652466111310315e+02
relative gap = +2.8053295795055225e-02
        gap  = -2.8053295795055225e-02
     digits  = -3.0102999566398120e-01
objValPrimal = -2.8053295795055225e-02
objValDual   = -0.0000000000000000e+00
p.feas.error = +9.4079368568795877e-05
d.feas.error = +1.0860743086040020e+02
total time   = 0.011052
  main loop time = 0.008862
      total time = 0.011052
file  check time = 0.000000
file change time = 0.000005
file   read time = 0.002185
SDPA end at [Sun Nov 13 12:43:44 2016]
ALL TIME = 0.012669
$ ./sdpa fail.dat-s out.result -pt 2 # compiled from source
SDPA (Version 7.3.8) start at [Sun Nov 13 12:43:48 2016]
set   is STABLE_BUT_SLOW
data  is fail.dat-s : sparse
out   is out.result
NumThreads  is set as 1
Schur computation : DENSE 
Entering DMUMPS driver with JOB, N, NZ =  -2           0              0
   mu      thetaP  thetaD  objP      objD      alphaP  alphaD  beta 
 0 1.0e+08 1.0e+00 1.0e+00 -0.00e+00 -0.00e+00 6.3e-01 6.6e-01 3.00e-01
 1 5.0e+07 3.7e-01 3.4e-01 -2.24e+04 -0.00e+00 6.8e-01 7.2e-01 3.00e-01
 2 2.2e+07 1.2e-01 9.5e-02 -4.40e+04 -0.00e+00 6.8e-01 7.0e-01 3.00e-01
 3 9.9e+06 3.8e-02 2.9e-02 -6.13e+04 -0.00e+00 6.8e-01 7.9e-01 3.00e-01
 4 4.3e+06 1.2e-02 5.9e-03 -5.55e+04 -0.00e+00 7.4e-01 7.7e-01 3.00e-01
 5 1.6e+06 3.2e-03 1.4e-03 -1.66e+04 -0.00e+00 7.8e-01 8.1e-01 3.00e-01
 6 5.3e+05 7.2e-04 2.6e-04 -3.58e+03 -0.00e+00 7.4e-01 1.0e+00 3.00e-01
 7 2.0e+05 1.8e-04 5.5e-06 -7.70e+02 -0.00e+00 7.4e-01 1.0e+00 3.00e-01
 8 8.2e+04 4.8e-05 6.7e-05 -1.59e+02 -0.00e+00 1.2e-01 1.0e+00 8.73e-01
pdINF criteria :: line 1192 in sdpa_parts.cpp
 9 1.9e+05 4.2e-05 1.4e-03 -3.16e+01 -0.00e+00 1.2e-01 1.0e+00 8.73e-01

phase.value  = pdINF     
   Iteration = 9
          mu = +1.9161252427163962e+05
relative gap = +2.0000000000000000e+00
        gap  = -3.1584714229081790e+01
     digits  = -3.0102999566398120e-01
objValPrimal = -3.1584714229081790e+01
objValDual   = -0.0000000000000000e+00
p.feas.error = +4.2479900152877592e-01
d.feas.error = +1.3682552859187126e+01
total time   = 0.004049
  main loop time = 0.003219
      total time = 0.004049
file  check time = 0.000000
file change time = 0.000003
file   read time = 0.000827
SDPA end at [Sun Nov 13 12:43:48 2016]
ALL TIME = 0.005172

The issue is that the OpenBLAS compilation is extremely slow... I would be nice if the OpenBLAS version in Julia was good enough (it should actually, otherwise we can make a PR to Julia base).

@blegat
Copy link
Member Author

blegat commented Nov 13, 2016

It seems to also work with Julia's OpenBLAS:

$ OB=/usr/lib/julia/libopenblas64_.so CC=gcc CXX=g++ FC=gfortran CFLAGS="-funroll-all-loops" CXXFLAGS="-funroll-all-loops" FFLAGS="-funroll-all-loops" ./configure --prefix=$HOME/sdpa --with-blas="${OB}" --with-lapack="${OB}"
...
$ make
...
$ ./sdpa fail.dat-s out.result -pt 2
SDPA (Version 7.3.8) start at [Sun Nov 13 13:09:00 2016]
set   is STABLE_BUT_SLOW
data  is fail.dat-s : sparse
out   is out.result
NumThreads  is set as 1
Schur computation : DENSE 
Entering DMUMPS driver with JOB, N, NZ =  -2           0              0
   mu      thetaP  thetaD  objP      objD      alphaP  alphaD  beta 
 0 1.0e+08 1.0e+00 1.0e+00 -0.00e+00 -0.00e+00 6.3e-01 6.6e-01 3.00e-01
 1 5.0e+07 3.7e-01 3.4e-01 -2.24e+04 -0.00e+00 6.8e-01 7.2e-01 3.00e-01
 2 2.2e+07 1.2e-01 9.5e-02 -4.40e+04 -0.00e+00 6.8e-01 7.0e-01 3.00e-01
 3 9.9e+06 3.8e-02 2.9e-02 -6.13e+04 -0.00e+00 6.8e-01 7.9e-01 3.00e-01
 4 4.3e+06 1.2e-02 5.9e-03 -5.55e+04 -0.00e+00 7.4e-01 7.7e-01 3.00e-01
 5 1.6e+06 3.2e-03 1.4e-03 -1.66e+04 -0.00e+00 7.8e-01 8.1e-01 3.00e-01
 6 5.3e+05 7.2e-04 2.6e-04 -3.58e+03 -0.00e+00 7.4e-01 1.0e+00 3.00e-01
 7 2.0e+05 1.8e-04 5.5e-06 -7.70e+02 -0.00e+00 7.4e-01 1.0e+00 3.00e-01
 8 8.2e+04 4.8e-05 6.7e-05 -1.59e+02 -0.00e+00 1.2e-01 1.0e+00 8.73e-01
pdINF criteria :: line 1192 in sdpa_parts.cpp
 9 1.9e+05 4.2e-05 1.4e-03 -3.16e+01 -0.00e+00 1.2e-01 1.0e+00 8.73e-01

phase.value  = pdINF     
   Iteration = 9
          mu = +1.9161252427163962e+05
relative gap = +2.0000000000000000e+00
        gap  = -3.1584714229081790e+01
     digits  = -3.0102999566398120e-01
objValPrimal = -3.1584714229081790e+01
objValDual   = -0.0000000000000000e+00
p.feas.error = +4.2479900152877592e-01
d.feas.error = +1.3682552859187126e+01
total time   = 0.006224
  main loop time = 0.005083
      total time = 0.006224
file  check time = 0.000000
file change time = 0.000004
file   read time = 0.001137
SDPA end at [Sun Nov 13 13:09:00 2016]
ALL TIME = 0.007042

@EQt you were sure that Julia's OpenBLAS did not perform well with CSDP ?

@brianborchers
Copy link

I just found this thread tonight, a couple of years after the fact. I'm sorry that no one contacted me at the time. For what it's worth, a current version of CSDP has no difficulty with the fail.dat-s problem given above:

>csdp fail.dat-s
CSDP 6.2.0
This is a pure primal feasibility problem.
Iter:  0 Ap: 0.00e+00 Pobj:  0.0000000e+00 Ad: 0.00e+00 Dobj:  0.0000000e+00 
Iter:  1 Ap: 2.17e-01 Pobj:  0.0000000e+00 Ad: 2.66e-01 Dobj: -5.8908530e+01 
Iter:  2 Ap: 2.53e-01 Pobj:  0.0000000e+00 Ad: 1.44e-01 Dobj: -1.5049845e+02 
Iter:  3 Ap: 5.05e-01 Pobj:  0.0000000e+00 Ad: 6.16e-01 Dobj: -3.2029351e+02 
Iter:  4 Ap: 6.36e-01 Pobj:  0.0000000e+00 Ad: 5.73e-01 Dobj: -5.3798917e+02 
Iter:  5 Ap: 5.78e-01 Pobj:  0.0000000e+00 Ad: 5.53e-01 Dobj: -5.1720921e+02 
Iter:  6 Ap: 7.68e-01 Pobj:  0.0000000e+00 Ad: 7.02e-01 Dobj: -6.1634333e+01 
Iter:  7 Ap: 8.96e-01 Pobj:  0.0000000e+00 Ad: 9.10e-01 Dobj: -9.2468991e+00 
Iter:  8 Ap: 1.00e+00 Pobj:  0.0000000e+00 Ad: 7.89e-01 Dobj: -7.5513074e-01 
Success: SDP solved
Primal objective value: 0.0000000e+00 
Dual objective value: 0.0000000e+00 
Relative primal infeasibility: 1.73e-09 
Relative dual infeasibility: 3.91e-14 
Real Relative Gap: 0.00e+00 
XZ Relative Gap: 5.00e-11 
DIMACS error measures: 2.08e-09 0.00e+00 7.51e-14 0.00e+00 0.00e+00 5.00e-11

@odow
Copy link
Member

odow commented Oct 25, 2022

Closing because @brianborchers reports that it is fixed, this doesn't appear to be a bug in CSDP.jl, and the issue is stale.

@odow odow closed this as completed Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants