Ran sosdemo8.m in sostool returned error
Show older comments
I am a beginner in using sostool and sedumi. I am using matlab 2018a. Since I am a beginner using these tools, I want to make sure I installed them correctly. So I ran the demo scripts included in the sostool folder. All demo scripts ran ok, except for sosdemo8.m. I also tried findlyap.m using an example in the user's manual, the same error came up:
Error using psdinvjmul Assertion failed (m>1) at line 290 of file 'reflect.c'... then some stack trace error which I won't post here(not sure how useful that would be), then the following error... Error in wregion (line 98) psdinvjmul(vTAR,vfrm.s,dxmdz, K)];
Error in sedumi (line 478) wregion(L,Lden,Lsd,...
Error in sossolve (line 149) [x,y,info] = sedumi(At,b,c,K,pars);
Error in sosdemo8 (line 44) prog = sossolve(prog,solver_opt);
I suspect something is wrong with my sedumi installation, maybe compatibility issue with matlab? But if my sedumi installation is wrong, why would all other demos work?
Any insight is appreciated. Thank you very much in advance!
4 Comments
OCDER
on 28 Sep 2018
You should be asking the code authors https://github.com/sqlp/sedumi at the readme section, way bottom.
From what I can tell, the assertion failed - "m" was suppose to be greater than 1, but it is not. I don't know what this m is, but it seems like the index to a square matrix of some origin. Do you have an input to this function, where the size of a matrix is NOT greater than a 1x1? It looks like in needs at least a 2x2 matrix input.
Assertion failed (m>1) at line 290 of reflect.c
/* ************************************************************
PROCEDURE qxqt - computes tril(Qb * X * Qb')
Here, Qb = Q_1*Q_2*..*Q_{m-1}, where each Q_i is a Householder reflection.
(Qb is from a Qb * R decomposition.)
INPUT
beta - length m vector
c - m x m matrix, lower triangular gives Householder reflections
m - order
UPDATED
x - m x m. On output, Xnew = Qb * X * Qb'
This means: start with order 2 reflection, up to order m reflection.
WORK
fwork - length m working vector.
************************************************************ */
void qxqt(double *x, const double *beta, const double *c,
const mwIndex m, double *fwork)
{
mwIndex k, inz;
mxAssert(m>1,"");
inz = SQR(m) - (m+2);
Bao Huang
on 28 Sep 2018
OCDER
on 28 Sep 2018
It's possible that the authors failed to update the demo when they fixed their other codes. Just because the demo fails doesn't mean the algorithm is faulty. If this was a Unit Test though, then a failed unit test would be concerning.
Bao Huang
on 28 Sep 2018
Answers (1)
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!