How to interface with the full version of SNOPT provided by TOMLAB inside YALMIP?

299 views
Skip to first unread message

Bardia Hassanzadeh

unread,
Jun 8, 2014, 12:11:45 PM6/8/14
to yal...@googlegroups.com
Hi,

I have setup my formulation under YALMIP and I'm willing to test the full version of SNOPT available through TOMLAB. I'm using Windows 7 32-bit and it seems the full version of SNOPT provided by TOMLAB is not supported under YALMIP. My guess is that the problem is inside the calling function to SNOPT, which calls the Snoptcmex (the student version) instead of SnoptA. Is there a way to customize the I/O interface to support SnoptA in the calling function? 

I would appreciate any help regarding this issue.

Best Regards,
Bardia




Johan Löfberg

unread,
Jun 8, 2014, 1:39:29 PM6/8/14
to yal...@googlegroups.com
YALMIP does not support the TOMLAB versions of interfaces of various solvers. You would simply have to hack the callsnopt.m file to connect with tomlabs version instead, and change the code accordingly (and perhaps change definesolvers.m).

dicaranx

unread,
Jun 17, 2014, 5:11:18 AM6/17/14
to yal...@googlegroups.com
Hello Bardia, 

Did you achieve to set up tomlab SNOPT to work with yalmip?. I would like to try the same solver. Thanks. 

Mahdi Gh

unread,
Oct 9, 2015, 4:16:04 AM10/9/15
to YALMIP
Hello, 

In the following link and under the "PENSDP" section,


it is specified that YALMIP also interfaces the TOMLAB version of the solver.  I have installed tomlab on my laptop (OS X) and I am trying to solve a SDP problem with Yalmip. In Yalmip sdpsettings, I set the 'solver' to 'pensdp'.  However, the following error is shown

'Unknown problem in solver (Turn on 'debug' in sdpsettings) (Attempt to execute SCRIPT pensdp as a function

Please let me know how can I resolve this issue. 

Thanks



Johan Löfberg

unread,
Oct 9, 2015, 4:21:58 AM10/9/15
to YALMIP
YALMIP does not support TOMLABs interfaces. You are looking at a 10 years old manual. YALMIPs homepage is here

Mahdi Gh

unread,
Oct 9, 2015, 5:11:44 AM10/9/15
to YALMIP
Thank you Johan. Would you please let me know how can I install Pensdp on my labtop (OS X), such that I can set the 'solver' as 'pensdp'  in Yalmip?

In the following link and under the 'Semi-Definite Programming' Section, 
 

it is indicated that Yalmip can call 'pensdp' as the solver. Also, it is indicated that pensdp is free for academia and I am eligible for using it.  

Johan Löfberg

unread,
Oct 9, 2015, 5:24:34 AM10/9/15
to YALMIP
PENLAB is a free version of pensdp. YALMIP supports both penlab and pensdp (interface by penopt, not tomlab).

You just have to make it visible in the path. You select solver through sdpsettings

Mahdi Gh

unread,
Oct 9, 2015, 5:48:59 AM10/9/15
to YALMIP
I just downloaded Penlab on my labtop. As it was instructed, in the Matlab environment I go to the directory of Penlab and  run install.m file.  Then I run penlabtest.m  and receive the following error: 


Checking if all components are present...
 
Checking if all mex files are compiled & work...
Error: mexsumsparse is not compiled.
... please consult manual how to compile mex or how to run mex-free
Error: mextrcolumn is not compiled.
... please consult manual how to compile mex or how to run mex-free
Error: mextrdsdsmat is not compiled.
... please consult manual how to compile mex or how to run mex-free
Warning: amplf is not compiled.
... AMPL-NLP interface will not work
... please consult manual how to compile mex
... some of the tests will be skipped.
 
Checking if readsdpa() work...
 
Some of the essential components are missing, cannot continue.

ans =

     0

Also, I add the penlab directory to matlab's path and set the solver to penlab  by the following command:

Settings=sdpsettings('solver','penlab')


However, after running my codes I receive the following error: 


Unknown problem in solver (Turn on 'debug' in sdpsettings) (Undefined function 'mextrcolumn' for input ar...

Johan Löfberg

unread,
Oct 9, 2015, 5:57:42 AM10/9/15
to yal...@googlegroups.com
It tells you rather verbosely that you haven't compiled it for your machine. Have you consulted the manual as they tell you to do

Mahdi Gh

unread,
Oct 9, 2015, 6:30:19 AM10/9/15
to YALMIP
I didn't compile any file, as on Penlab's homepage:

http://web.mat.bham.ac.uk/kocvara/penlab/

 it is specified that "The distribution package includes the full source code and precompiled mex-functions". So I thought that all the files are pre-compiled and read to be used in Matlab environment. Consequently, I only run the install.m file that comes with Penlab.  Do you think that this issue is related to the compatibility of Penlab with OS X? Then I can try my codes on a windows Machine. 


Johan Löfberg

unread,
Oct 9, 2015, 7:03:39 AM10/9/15
to YALMIP
So what mex files does your system use (run mexext). Penlab is shipped with mexmaci files

Mahdi Gh

unread,
Oct 9, 2015, 7:12:29 AM10/9/15
to YALMIP
By running mexext command I get "mexmaci64" as the result. 

I navigated to the "Penlab/source" folder and executed "mex -largeArrayDims mextrcolumn.c" command in the Matlab environment. Now, the missing mex file is built and I can use penlab as the solver in Yalmip, without any error. However, would you please let me know if I have made the right mex file and the results from optimization problem are valid? I mean, does the command "mex -largeArrayDims mextrcolumn.c" was the right command for building the missing mex file? 


Johan Löfberg

unread,
Oct 9, 2015, 7:13:38 AM10/9/15
to YALMIP
If it runs it's right

Mahdi Gh

unread,
Oct 9, 2015, 7:25:07 AM10/9/15
to YALMIP
ok. Thanks
Reply all
Reply to author
Forward
0 new messages