error from solvesdp only when executing compiled .exe-file, .m-file works great

62 views
Skip to first unread message

Mirsad Tulic

unread,
May 18, 2015, 9:00:40 AM5/18/15
to yal...@googlegroups.com

Hello interested group members,

I have an issue with the solvesdp function (solver is YALMIP). I have tried solving it myself, but did not succeed.

When I run my matlab function in Matlab, the program works totally fine, solvesdp does what I expect and the solveroutput is SOLVER PROBLEM (intrinsic): No problems detected (LINPROG)!

I used it many times in Matlab, every time it had worked fine when running my .m-file.

Then I compiled an .exe file and after running the exe-file the following error pops out:

 “SOLVER PROBLEM (intrinsic): Unknown problem in solver (try using 'debug'-flag in sdpsettings) (Error using eval Undefined function 'calllsqnonneg' for input arguments of type 'struct'.)!”

Matlab-support-team suggested putting 

%#function calllsqnonneg

at the beginning of .m file which I did. That produces then the following from solveroutput.info:

 Solver not applicable (LSQNONNEG)!

Does anyone have a clue what I can do? It seems not an issue of wrong programming, otherwise it would not have produced the desired output when running the .m-file.

Best regards,

Mirsad 

Johan Löfberg

unread,
May 18, 2015, 9:08:10 AM5/18/15
to yal...@googlegroups.com
Complete reproducible code is never bad. I have no idea what lsqnonneg has to do with anything here. Make sure you select the solver as linprog to ensure nothing strange is selected in the compiled version

The only thing I know about compiling YALMIP code is that you explicitly have to add the yalmip function which calls the solver, and the file which yalmip searches for when selecting solver, to the list of includes. In your case calllinprog.m and linprog.m)


Johan Löfberg

unread,
May 18, 2015, 9:20:45 AM5/18/15
to yal...@googlegroups.com
BTW, in case you are trying to gain efficiency by compiling the code, you will not gain much. For performance, there are two main options

1. Use a better solver (cplex, gurobi, mosek etc)
2. If you solve many similar problems, use the optimizer command

Mirsad Tulic

unread,
May 19, 2015, 4:44:50 AM5/19/15
to yal...@googlegroups.com
Dear Professor Löfberg,
many, many thanks for your suggestions. It was indeed the need to add calllinprog.m and linprog.m to the list of includes that solved my problem. I did not know that. Sorry for bothering you with such a trivial question. 
In my case,
 mcc -e myMatlabFunction2015.m calllinprog.m linprog.m 

was the solutuion, instead of just

 mcc -e myMatlabFunction2015.m.

P.s. I will try also your suggestions to achieve a efficiency gain, but that was not my reason to produce .exe-file.  

Reply all
Reply to author
Forward
0 new messages