Error while using sedumi solver with YALMIP

674 views
Skip to first unread message

Hesam

unread,
Jul 28, 2017, 2:47:31 AM7/28/17
to YALMIP
Good morning,
While using YALMIP and SEDUMI to solve a simple SDP problem, I received an error message:
Nope, unexplained crash in SeDuMi! (could be memory issues or wrong binary)

then I used sdpsettings('debug',1) and I got the following error message:

Undefined function or variable "y_s".

Error in callsedumi (line 75)
Primal = y_s;

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

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

Error in LMI_test (line 8)
optimize(F,P(1,1),sdpsettings('solver','SEDUMI','debug',1));
 

How can I resolve this issue?
Thanks and best regards,
Hessam.

Johan Löfberg

unread,
Jul 28, 2017, 3:47:59 AM7/28/17
to YALMIP
Impossible to answer without code. Most often due to memory, or that the problem is too trivial. In case you cannot post reproducible code, you will have to put a break in callsedumi and step through to see the crash

Hesam

unread,
Jul 28, 2017, 3:51:24 AM7/28/17
to YALMIP
It does not work in general on my system. 
Here is the code:

A = [-1 2 0;-3 -4 1;0 0 -2];
P = sdpvar(3,3);
F = [P >= 0, A'*P+P*A <= 0];
F = [F, trace(P) == 1];
optimize(F,P(1,1),sdpsettings('solver','SEDUMI','debug',1))

Thanks!

Johan Löfberg

unread,
Jul 28, 2017, 3:55:04 AM7/28/17
to yal...@googlegroups.com
so does sedumi even work?

sedumi(1,1,1)

SeDuMi 1.32 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 = 1, order n = 2, dim = 2, blocks = 1
nnz(A) = 1 + 0, nnz(ADA) = 1, nnz(L) = 1
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            8.00E+00 0.000
  1 :   7.87E-01 5.00E-01 0.000 0.0625 0.9900 0.9900   1.40  1  1  2.9E-01
  2 :   1.00E+00 1.65E-04 0.000 0.0003 0.9999 0.9999   1.09  1  1  
iter seconds digits       c*x               b*y
  2      0.6   Inf  1.0000000000e+00  1.0000000000e+00
|Ax-b| =   0.0e+00, [Ay-c]_+ =   0.0E+00, |x|=  1.0e+00, |y|=  1.0e+00




Hesam

unread,
Jul 28, 2017, 4:00:57 AM7/28/17
to YALMIP
I doubt it works.
I had worked already with YALMIP and SEDUMI for several years. But today I installed latest YALMIP and SEDUMI versions on my new laptop.

The complete error message that I receive from previous code is as follows:

SeDuMi 1.32 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, theta = 0.250, beta = 0.500
Put 1 free variables in a quadratic cone
eqs m = 6, order n = 9, dim = 21, blocks = 4
nnz(A) = 24 + 0, nnz(ADA) = 36, nnz(L) = 21
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            1.71E+01 0.000
 
SeDuMi had unexplained problems, maybe due to linear dependence?
YALMIP tweaks the problem (adds 1e6 magnitude bounds on all variables) and restarts...
 
SeDuMi 1.32 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, theta = 0.250, beta = 0.500
Put 1 free variables in a quadratic cone
eqs m = 6, order n = 21, dim = 33, blocks = 4
nnz(A) = 36 + 0, nnz(ADA) = 36, nnz(L) = 21
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            1.61E+07 0.000
Nope, unexplained crash in SeDuMi! (could be memory issues or wrong binary)
Make sure you have a recent and compiled version
 
 
For better diagnostics, use sdpsettings('debug',1)
 
 
Undefined function or variable "y_s".

Error in callsedumi (line 75)
Primal = y_s;

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

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


I have no idea what's wrong.

Johan Löfberg

unread,
Jul 28, 2017, 4:05:48 AM7/28/17
to YALMIP
Was this the output from sedumi(1,1,1) which I want you to run?

Hesam

unread,
Jul 28, 2017, 4:08:58 AM7/28/17
to YALMIP
No sorry, it was from the same simple SDP problem.

The result from sedumi(1,1,1) is as follows:
>> sedumi(1,1,1)
SeDuMi 1.32 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 = 1, order n = 2, dim = 2, blocks = 1
nnz(A) = 1 + 0, nnz(ADA) = 1, nnz(L) = 1
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            8.00E+00 0.000
Error using maxstep
Too many input arguments.

Error in wregion (line 99)
        maxt1 = min(maxstep(dx,xc,uxc,K), maxstep(dz,zc,uzc,K));

Error in sedumi (line 477)
    [xscl,yNxt,zscl,y0Nxt, w,relt, dxmdz,err, wr] = ...
 
Thanks.

Johan Löfberg

unread,
Jul 28, 2017, 6:51:01 AM7/28/17
to YALMIP
so you have a function maxstep in your path which confuses sedumi

>> which maxstep -all
C:\work\solvers\sedumi\maxstep.m


Hesam

unread,
Jul 28, 2017, 8:01:54 AM7/28/17
to YALMIP
Thanks!

Sarnavi Mahesh

unread,
Jan 24, 2018, 7:22:05 PM1/24/18
to YALMIP
Good Evening, 

Was just following the instructions to remove a similar problem, using sedumi(1,1,1) gives this output:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SeDuMi 1.32 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
Undefined function or variable 'qrK'.

Error in sdinit (line 86)
vfrm.s = qrK(d.u,K);

Error in sedumi (line 401)
[d, v,vfrm, y,y0, R] = sdinit(A,b,c,dense,K,pars);
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I am not sure as to why it so, I have the qrK function in the same directory. Would you be able to help ? 

Johan Löfberg

unread,
Jan 25, 2018, 2:41:26 AM1/25/18
to YALMIP
Sounds like you don't have the suitable mex files for your computer, i.e. you haven't downloaded a version with binaries, and/or you have to compile sedumi

>> which qrK
C:\work\solvers\sedumi\qrK.mexw64


Sarnavi Mahesh

unread,
Jan 25, 2018, 3:40:37 AM1/25/18
to YALMIP
I downloaded from this github page, https://github.com/sqlp/sedumi

All the compiled files are readily available here, right ? or I am downloading from an incorrect repo ?

Additionally, if i try to compile sedumi on my local machine, it says some binaries are missing. 

Johan Löfberg

unread,
Jan 25, 2018, 3:55:38 AM1/25/18
to YALMIP
So what is your operating system and matlab version, and thus mex format (run mexext in matlab)


Sarnavi Mahesh

unread,
Jan 25, 2018, 4:21:06 AM1/25/18
to YALMIP
Its OS X El Capitan version 10.11.6, I am running matlab 2017b, and for mex file compilation matlab is using xcode 8.1

mexext gives 'mexmaci64'

Johan Löfberg

unread,
Jan 25, 2018, 4:29:01 AM1/25/18
to YALMIP
Then I don't what you are doing,. When I download the zip it has a file qrK.mexmaci64, so if the directory is in your path it should be found

Sarnavi Mahesh

unread,
Jan 25, 2018, 4:41:51 AM1/25/18
to YALMIP
i know, that's why it is more puzzling, the downloaded zip already contains this file. thanks. 

Johan Löfberg

unread,
Jan 25, 2018, 6:06:09 AM1/25/18
to YALMIP
show me

dir(fileparts(which('sedumi')))

Sarnavi Mahesh

unread,
Jan 25, 2018, 7:22:17 AM1/25/18
to YALMIP
did it. Saved the workspace in the above mat file, contains the struct generated by  

dir(fileparts(which('sedumi')))

Accessing the struct, i can see that qrK.mexmaci64 is present. 

jan25.mat

Johan Löfberg

unread,
Jan 25, 2018, 8:17:36 AM1/25/18
to YALMIP
Then I think you should open in issue in the sedumi issue tracker
Reply all
Reply to author
Forward
0 new messages