"Reference to non-existent field 'sol'." error in callmosek>call_mosek_lpqpsocpsdpdual (line 189) - bug (?)

1,190 views
Skip to first unread message

Kuti József

unread,
Feb 4, 2015, 9:25:04 AM2/4/15
to yal...@googlegroups.com
Dear Johan Löfberg,

I came accross the following problem: 

applying bisection method on an SDP problem, there is a value of the variable, which caused error in the Mosek solver (MSK_RES_ERR_NO_DUAL_INFEAS_CER (A certificate of dual infeasibility is not available.)) 

In this case if it is used with optimizer struct, YALMIP crashes with:

Reference to non-existent field 'sol'.

Error in callmosek>call_mosek_lpqpsocpsdpdual (line 189)
    D_struc = [res.sol.itr.xx];

Error in callmosek>call_mosek_lpqpsocpsdp (line 80)
    [x,D_struc,problem,r,res,solvertime,prob] = call_mosek_lpqpsocpsdpdual(model);

Error in callmosek (line 50)
    [x,D_struc,problem,r,res,solvertime,prob] = call_mosek_lpqpsocpsdp(model);

Error in optimizer/subsref (line 111)
                eval(['output = ' self.model.solver.call '(self.model);']);

If I use replace + solvesdp functions, they returns with "Unknown problem in solver (try using 'debug'-flag in sdpsettings)" errorcode without crash.

I think this may be a bug.

Best regards,
József Kuti (PhD Student)

Ps1 A script and the datas are attached to display the problem. (I used matlab R2014b, MOSEK 7.1.0.15., YALMIP R20150204)
Ps2 This new YALMIP relase displays the old version number.

problem.mat
gensdp.m
mosekwOptimizer.m

Johan Löfberg

unread,
Feb 4, 2015, 9:36:13 AM2/4/15
to yal...@googlegroups.com
Looks like I didn't ship the new version. Please download the latest release again and try (it has some small fix in the mosek call, although probably not related to this)

I get

Mosek error: MSK_RES_TRM_STALL (A certificate of dual infeasibility is not available.)

ans =

Infeasible problem

Kuti József

unread,
Feb 4, 2015, 9:49:38 AM2/4/15
to yal...@googlegroups.com
It didn't solved the problem. 

But I inserted "& isfield(res,'sol')" in row 188 of callmosek.m. It looks operable till the new release.

Johan Löfberg

unread,
Feb 4, 2015, 10:04:38 AM2/4/15
to yal...@googlegroups.com
OK, that's sounds like fix I will do.

I guess 7.1 returns stuff differently from 7.0

Erling D. Andersen

unread,
Feb 5, 2015, 1:17:45 AM2/5/15
to yal...@googlegroups.com
If 7.1 is different then we should look at it because then there is an unintended change. 

Johan Löfberg

unread,
Feb 5, 2015, 2:36:55 AM2/5/15
to yal...@googlegroups.com
I cannot reproduce this on  7.1.0.15 x86. The sol structure is there as expected. What OS are you running?

[~, err_code] = Solver{0.625}; yalmiperror(err_code) %<-crash
K
>>[~,res] = mosekopt('minimize info',prob,param);
K
>> res.sol.itr

ans
=

     prosta
: 'DUAL_INFEASIBLE'
     solsta
: 'NEAR_DUAL_INFEASIBLE_CER'
        skc
: [50x2 char]
        skx
: [0x2 char]
        skn
: [0x2 char]
         xc
: [50x1 double]
         xx
: [0x1 double]
       barx
: [1170x1 double]
          y
: [50x1 double]
        slc
: [50x1 double]
        suc
: [50x1 double]
        slx
: [0x1 double]
        sux
: [0x1 double]
        snx
: [0x1 double]
       bars
: [1170x1 double]
    pobjval
: -0.2586


mosekdebug.mat
problem.mat

Kuti József

unread,
Feb 5, 2015, 3:46:32 AM2/5/15
to yal...@googlegroups.com
I use Win 8.1.

The 'res' object resulted of doCall in callmosek.m (that doesn't contain 'sol' field) is attached.

I exported the prob & param fields forwarded to MOSEK. A script that calls mosekopt with these inputs, and the results on my PC are also attached.



res.mat
problem2.mat
callmosekscript.m
callmosekscript.html

Johan Löfberg

unread,
Feb 5, 2015, 3:50:21 AM2/5/15
to yal...@googlegroups.com
OK, so we clearly have a version dependent output

On your machine
 res

res
=

       rcode
: 2001
        rmsg
: 'A certificate of dual infeasibility is not available.'
    rcodestr
: 'MSK_RES_ERR_NO_DUAL_INFEAS_CER'


on my machine (x86, win7, matlab 2014b, mosek 7.1.0.15)
res =

         sol
: [1x1 struct]
        info
: [1x1 struct]
       rcode
: 10006
        rmsg
: 'A certificate of dual infeasibility is not available.'
    rcodestr
: 'MSK_RES_TRM_STALL'



Erling D. Andersen

unread,
Feb 5, 2015, 3:53:07 AM2/5/15
to yal...@googlegroups.com
It is unlikely to be version dependent. My guess is due to you run different machines only one of you gets the near and that might trigger a bug. We will try to reproduce it.

Erling D. Andersen

unread,
Feb 16, 2015, 4:57:49 AM2/16/15
to yal...@googlegroups.com
After a week of vacation I think I have located a potential problem. I will let know when we have uploaded a new version that supposedly solves the issue.

Erling Andersen

unread,
Feb 20, 2015, 8:14:47 AM2/20/15
to yal...@googlegroups.com
Sorry about being slow. But there is new version of MOSEK available from our website that should fix the problem.

Kuti József

unread,
Feb 20, 2015, 10:09:32 AM2/20/15
to yal...@googlegroups.com
I have tested the new version (7.1.0.20, Win64): unfortunately the problem still stands.

Erling Andersen

unread,
Feb 21, 2015, 2:43:12 AM2/21/15
to yal...@googlegroups.com
I fixed one bug but not the right one then. We look into it monday.

Erling Andersen

unread,
Feb 23, 2015, 7:16:39 AM2/23/15
to yal...@googlegroups.com
It should 7.1.0.24 we had some problem so our site did not get updated. Please try download again make sure you have version 7.1.0.24.
Does that version work?

Kuti József

unread,
Feb 23, 2015, 7:45:26 AM2/23/15
to yal...@googlegroups.com
It seems good: there now exists the 'sol' field. 

Erling Andersen

unread,
Feb 23, 2015, 9:56:41 AM2/23/15
to yal...@googlegroups.com
Perfect. Get back if more issues appears. Sorry it took so long.

Usman Nafihe Ibthaj

unread,
Jul 18, 2019, 2:53:32 PM7/18/19
to YALMIP
hello,
I'm using mosek newest version in windows 10 with matlab 2015a
and I'm facing same problem of 'sol'
can you help me please?
thanks

Johan Löfberg

unread,
Jul 18, 2019, 3:12:22 PM7/18/19
to YALMIP
most likely it tells you to turn on debug in sdpsettings, do that

my guess is you don't have a properly installed license (you're not giving much info...)

Usman Nafihe Ibthaj

unread,
Jul 18, 2019, 3:35:12 PM7/18/19
to YALMIP
Reference to non-existent field 'sol'.

Error in DiSouLfixedWnoTOA>solveOptProblem (line 265)
    optVal = res.sol.itr.pobjval;

Error in DiSouLfixedWnoTOA (line 162)
            [optVal,locVar,angleVar] =
            solveOptProblem(sensorsLocs,snapshot,activeLocs,activeAngles,angleBS2locs,maxError,wSquare,carrierFreq);

Error in Fig3 (line 100)
            mobileUserEstim = DiSouLfixedWnoTOA( antLocs, snapshots, noisePower, startCellSize, carrierFreq, mapWidth,
            wSquare(w) );


this is the error I'm dealing with. I have academic licence
licence is correctly installed 

Johan Löfberg

unread,
Jul 18, 2019, 3:48:09 PM7/18/19
to YALMIP
This is not a crash in YALMIP. You are using some other tool (according to a google search probably some code by Bhagat)

You will have to debug the code to see why it crashes (look at the display by mosek) and then ask mosek support if you cannot figure it out. Or ask the person who wrote the code
Reply all
Reply to author
Forward
0 new messages