SparseColo problem

52 views
Skip to first unread message

Abdulrahman Aldeek

unread,
Sep 13, 2021, 9:10:01 PM9/13/21
to YALMIP

Dear Johan

i have managed to install SparseColo on Matlab and I have tested it using the example that was provided in its installation page and it worked. However, when I have tried to provoke it in Yalmip using the follow error:

opt = sdpsettings('verbose',1,'solver','sparsecolo','debug',1);

I got the following error:

SparseCoLO 1.12
by K.Fujisawa, S.Kim, M.Kojima, Y.Okamoto and M. Yamashita,
April 2010

parCoLO.domain = 2; parCoLO.range = 1; parCoLO.EQorLMI = 2
Apply the d-space conversion method using basis representation.
Apply the r-space conversion method using clique trees.
Conversion into an LMI standard form
Unrecognized function or variable 'problem'.

Error in callsparsecolo (line 101)
infostr = yalmiperror(problem,interfacedata.solver.tag);

Error in solvesdp (line 368)
    eval(['output = ' solver.call '(interfacedata);']);

Error in optimize (line 31)
[varargout{1:nargout}] = solvesdp(varargin{:});

Error in YALMIP_LWSDP_OPF (line 220)
sol = optimize(Constraints,Objective,opt);

Any idea why I'm getting this error??

Regards

Abd

Abdulrahman Aldeek

unread,
Sep 13, 2021, 9:17:08 PM9/13/21
to YALMIP
I have tried a very small problem and I still get the same issue as follows

X = sdpvar(2);optimize([X >= eye(2)],trace(X),sdpsettings('solver','sparsecolo'))


SparseCoLO 1.12
by K.Fujisawa, S.Kim, M.Kojima, Y.Okamoto and M. Yamashita,
April 2010

parCoLO.domain = 2; parCoLO.range = 1; parCoLO.EQorLMI = 2
Apply the d-space conversion method using basis representation.
Apply the r-space conversion method using clique trees.
LOP to be converted into LMI standard form is already LMI standard form.

ans =

  struct with fields:

    yalmipversion: '20210331'
    matlabversion: '9.8.0.1417392 (R2020a) Update 4'
       yalmiptime: NaN
       solvertime: NaN
             info: 'Unknown problem in solver (Turn on 'debug' in sdpsettings) (Unrecognized function or variable 'problem'.)'
          problem: 9

Johan Löfberg

unread,
Sep 14, 2021, 1:17:17 AM9/14/21
to YALMIP
The only way for that to happen is if you don't have any of the supported solvers installed (sedumi/sdpt3)

Abdulrahman Aldeek

unread,
Sep 14, 2021, 7:22:43 AM9/14/21
to YALMIP
But Mosek,Sedumi and SDPT3 are installed and working with YALMIP. When I have used sparsecolo on its own by solving the test problem in the installation page, it worked, when I got was:

[A,b,c,K,J] = maxCutSDP(1,50,4,2009);
parCoLO.domain = 1; parCoLO.range = 0; parCoLO.EQorLMI = 1;
[x,y,infoCoLO,cliqueDomain,cliqueRange,LOP] = sparseCoLO(A,b,c,K,J,parCoLO);


SparseCoLO 1.12
by K.Fujisawa, S.Kim, M.Kojima, Y.Okamoto and M. Yamashita,
April 2010

parCoLO.domain = 1; parCoLO.range = 0; parCoLO.EQorLMI = 1
Apply the d-space conversion method using clique trees.
LOP to be converted into equality standard form is already equality standard form.
SeDuMi 1.3.5 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
eqs m = 87, order n = 64, dim = 1122, blocks = 5
nnz(A) = 124 + 0, nnz(ADA) = 3821, nnz(L) = 1954
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            2.25E-01 0.000
  1 :  -3.14E+01 6.75E-02 0.000 0.3000 0.9000 0.9000  -0.17  1  1  1.2E+00
  2 :  -2.93E+01 2.45E-02 0.000 0.3635 0.9000 0.9000   1.65  1  1  3.5E-01
  3 :  -3.12E+01 5.88E-03 0.000 0.2396 0.9000 0.9000   1.08  1  1  8.3E-02
  4 :  -3.17E+01 1.33E-03 0.000 0.2260 0.9000 0.9000   1.01  1  1  1.9E-02
  5 :  -3.19E+01 2.78E-04 0.000 0.2089 0.9000 0.9000   1.00  1  1  3.9E-03
  6 :  -3.19E+01 1.55E-05 0.000 0.0557 0.9000 0.8584   1.00  1  1  8.7E-04
  7 :  -3.19E+01 1.13E-06 0.000 0.0733 0.9900 0.9607   1.00  1  1  6.4E-05
  8 :  -3.19E+01 2.50E-07 0.000 0.2204 0.9000 0.9000   1.00  1  1  1.4E-05
  9 :  -3.19E+01 6.37E-08 0.000 0.2549 0.9000 0.9000   1.00  1  1  3.6E-06
 10 :  -3.19E+01 1.77E-08 0.000 0.2775 0.9000 0.9000   1.00  1  1  1.0E-06
 11 :  -3.19E+01 5.03E-09 0.000 0.2846 0.9000 0.9000   1.00  1  1  2.8E-07
 12 :  -3.19E+01 1.42E-09 0.000 0.2817 0.9000 0.9000   1.00  2  2  8.0E-08
 13 :  -3.19E+01 3.90E-10 0.000 0.2753 0.9000 0.9000   1.00  7  7  2.2E-08
 14 :  -3.19E+01 1.05E-10 0.000 0.2695 0.9000 0.9000   1.00 14 17  5.9E-09
 15 :  -3.19E+01 2.79E-11 0.000 0.2652 0.9000 0.9000   1.00 20 25  1.6E-09
 16 :  -3.19E+01 7.48E-12 0.000 0.2684 0.9000 0.9000   1.00 52 59  4.2E-10

iter seconds digits       c*x               b*y
 16      0.8   Inf -3.1901401911e+01 -3.1901401910e+01
|Ax-b| =   7.7e-10, [Ay-c]_+ =   5.0E-10, |x|=  5.4e+00, |y|=  1.9e+01

Detailed timing (sec)
   Pre          IPM          Post
6.301E-02    4.220E-01    8.006E-03    
Max-norms: ||b||=2.500000e-01, ||c|| = 2,
Cholesky |add|=0, |skip| = 7, ||L.L|| = 455.327.

Why YALMIP can't invoke any of these solvers through sparsecolo although they are installed?

Johan Löfberg

unread,
Sep 14, 2021, 7:35:43 AM9/14/21
to YALMIP
Works here so you will simply have to debug callsparsecolo and see what happens when the call is made


>> optimize(X>=0,trace(X),sdpsettings('solver','sparsecolo','debug',1))

SparseCoLO 1.12
by K.Fujisawa, S.Kim, M.Kojima, Y.Okamoto and M. Yamashita,
April 2010

parCoLO.domain = 2; parCoLO.range = 1; parCoLO.EQorLMI = 2
Apply the d-space conversion method using basis representation.
Apply the r-space conversion method using clique trees.
LOP to be converted into LMI standard form is already LMI standard form.
SeDuMi 1.3.4 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, theta = 0.250, beta = 0.500
eqs m = 3, order n = 5, dim = 9, blocks = 3
nnz(A) = 6 + 0, nnz(ADA) = 9, nnz(L) = 6
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            4.66E+00 0.000
  1 :   0.00E+00 1.07E+00 0.000 0.2295 0.9000 0.9000   1.40  1  1  1.6E+00
  2 :   0.00E+00 2.86E-02 0.000 0.0267 0.9900 0.9900   1.27  1  1  2.0E-02
  3 :   0.00E+00 6.93E-08 0.000 0.0000 1.0000 1.0000   1.00  1  1  4.3E-06
  4 :   0.00E+00 8.16E-15 0.000 0.0000 1.0000 1.0000   1.00  1  1  4.0E-13

iter seconds digits       c*x               b*y
  4      0.2  15.0  9.8926288115e-16  0.0000000000e+00
|Ax-b| =   1.7e-15, [Ay-c]_+ =   5.4E-16, |x|=  1.0e+00, |y|=  1.4e+00

Detailed timing (sec)
   Pre          IPM          Post
4.199E-02    1.840E-01    4.999E-03    
Max-norms: ||b||=0, ||c|| = 1,
Cholesky |add|=0, |skip| = 0, ||L.L|| = 1.

ans = 

  struct with fields:

    yalmipversion: '20210331'
    matlabversion: '9.1.0.441655 (R2016b)'
       yalmiptime: 0.5913
       solvertime: 0.3367
             info: 'Successfully solved (SparseCoLO)'
          problem: 0


Abdulrahman Aldeek

unread,
Sep 14, 2021, 7:47:29 AM9/14/21
to YALMIP
After debugging, I think that the problem is that sparsecolo is calling mosek and the callsparsecolo m.file can deal with sdpt3,sedumi and sdpa. Should I remove mosek or is there something that can be done to choose a specific solver?

Abdulrahman Aldeek

unread,
Sep 14, 2021, 7:58:24 AM9/14/21
to YALMIP
I have added this line:
interfacedata.solver.sdpsolver.tag='sedumi';
to force yalmip to call sedumi in the beginning of the callsparsecolo function, it worked!

Abdulrahman Aldeek

unread,
Sep 14, 2021, 8:00:50 AM9/14/21
to YALMIP
However, is these anything that can be done to allow mosek to work with sparsecolo?

Johan Löfberg

unread,
Sep 14, 2021, 8:44:40 AM9/14/21
to YALMIP
you can explicitly select SDPsolver in the sparsecolo options

Abdulrahman Aldeek

unread,
Sep 14, 2021, 9:55:36 AM9/14/21
to YALMIP
yes but i think that callsparsecolo file can't handle mosek, it only deals with sdpt3, sedumi and sdpa, I think that for mosek to work, there should be something added to that file.

Johan Löfberg

unread,
Sep 14, 2021, 10:04:11 AM9/14/21
to YALMIP
If you want mosek to be supported you have to contact the developers of sparsecolo, that is not a yalmip issue
Reply all
Reply to author
Forward
0 new messages