error information when using DSDP and csdp

152 views
Skip to first unread message

Bess

unread,
Nov 27, 2012, 5:30:08 PM11/27/12
to yal...@googlegroups.com
when I tried to use the solvers of DSDP and csdp to solve a SDP, the error information show: 

This is for DSDP:
Unknown problem in solver (try using 'debug'-flag in sdpsettings) (Attempt to execute SCRIPT dsdp as a function: D:\DSDP5.8\matlab\dsdp.m)

This is for csdp:
Unknown problem in solver (try using 'debug'-flag in sdpsettings) (Error using fprintf Function is not defined for sparse inputs.)


other SDP solvers, such sedumi, sdpt3, and sdpa, are fine.

thanks. 

Johan Löfberg

unread,
Nov 28, 2012, 1:35:29 AM11/28/12
to yal...@googlegroups.com
Your DSDP binaries are not compiled for your computer.

The CSDP error should have been fixed long time ago in CSDP. Are you sure you are running the latest version of CSDP?

Johan Löfberg

unread,
Nov 28, 2012, 1:54:51 AM11/28/12
to yal...@googlegroups.com
...but if it still fails, simply add a full() around the second argument sent to fprintf on the line were it fails in csdp.m

Bess

unread,
Nov 28, 2012, 9:54:33 AM11/28/12
to yal...@googlegroups.com
So if I want to use DSDP, how can I do? 

and I am sure my running csdp version is the latest version.

I was trying to run both of them under matlab 2009a(32bit) and 2012b(64b), they all failed.

Bess

unread,
Nov 28, 2012, 10:27:48 AM11/28/12
to yal...@googlegroups.com
following your suggestion, i added full() to fpringf in csdp.m, but new error information shew up:



Transposing A to match b 
Number of constraints: 547 
Number of SDP blocks: 10 
Number of LP vars: 196 
'csdp' is not recognized as an internal or external command, 
operable program or batch file. 
file does not exist!
Warning: File 'C:\Users\Bess\AppData\Local\Temp\tpdeaa090a_e02e_4ea7_a2c6_d0c2f46cfd2c.sol' not found. 
> In csdp at 243
  In callcsdp at 29
  In solvesdp at 340


ans = 

    yalmiptime: 0.3370
    solvertime: 0.3050
          info: 'Unknown problem in solver (try using 'debug'-flag in sdpsettings) (CSDP)'
       problem: 9
        dimacs: [NaN NaN NaN NaN NaN NaN]

Johan Löfberg

unread,
Nov 28, 2012, 12:18:30 PM11/28/12
to yal...@googlegroups.com

Johan Löfberg

unread,
Nov 28, 2012, 12:25:02 PM11/28/12
to yal...@googlegroups.com
DSDP was last updated in 2006, so you might have to use a really old matlab version to get it to run. Otherwise, you will  have to recompile DSDP from scratch, and I would suspect that will quite a project too, since things have changed in matlab libraries and lapack libraries etc which DSDP relies on. To summarize, unless you really know you have to use DSDP, give it up, unless you are very comfortable with C++ compilation, linking libraries, etc etc.

Bess

unread,
Nov 28, 2012, 12:45:54 PM11/28/12
to yal...@googlegroups.com
beautiful!  Thanks you so much.

Bess

unread,
Nov 28, 2012, 12:46:49 PM11/28/12
to yal...@googlegroups.com
got it. 

it sounds DSDP has to be given up.  Thanks you again.

Veronica Piccialli

unread,
Mar 22, 2016, 5:41:21 AM3/22/16
to YALMIP
Hi to all, I just installed the latest version of csdp and I get again when I run yalmiptest 
|                   SOCP|        N/A|                  Unknown problem in solver (Turn on 'debug' in sdpsettings) (Error using fprintf
Function is not defined for sparse inputs.)|
|                   SOCP|        N/A|                  Unknown problem in solver (Turn on 'debug' in sdpsettings) (Error using fprintf
Function is not defined for sparse inputs.)|
|                   SOCP|        N/A|                  Unknown problem in solver (Turn on 'debug' in sdpsettings) (Error using fprintf
Function is not defined for sparse inputs.)|
|                    SDP|        N/A|                  Unknown problem in solver (Turn on 'debug' in sdpsettings) (Error using fprintf
Function is not defined for sparse inputs.)|
|                    SDP|        N/A|                  Unknown problem in solver (Turn on 'debug' in sdpsettings) (Error using fprintf
Function is not defined for sparse inputs.)|

Can anyone help'I have a mac computer and matlab is R2016a.
Thank you

Veronica

Johan Löfberg

unread,
Mar 22, 2016, 6:24:24 AM3/22/16
to YALMIP
My guess is that you are using a very very old version of CSDP. That error popped up in csdp around 2008 or something if I recall the bug correctly

The preferred version with YALMIP is the version which comes with OPTI Toolbox, although it should work with a recent stand-alone version too

Johan Löfberg

unread,
Mar 22, 2016, 6:25:02 AM3/22/16
to YALMIP
...or a very very old version of YALMIP

Johan Löfberg

unread,
Mar 22, 2016, 6:34:08 AM3/22/16
to YALMIP
I take that back. It appears they have reintroduced the bug. If you want to use the stand-alone version of csdp, you have to edit writesdpa and change line 325 to

    fprintf(fid,'%d %d %d %d %.18e\n',full([0 nsdpblocks+1 i i -c(i)]));


I recommend the OPTI Toolbox interface though, as all data shuffling will be done in memory which will save loads of time on large problems. The version you use sends data via files 

Veronica Piccialli

unread,
Mar 22, 2016, 10:18:15 AM3/22/16
to YALMIP
Thank you so much!!Actually now I get a different error..it looks like matlab does not find the executable of csdp: this is what it writes when tries to solve an sdp:
/bin/bash: csdp: command not found

Johan Löfberg

unread,
Mar 22, 2016, 1:15:10 PM3/22/16
to YALMIP
When using the file-based version of th csdp matlab interface, the csdp must be in the operating system path (i.e., not in the matlab path), alternatively you must be in the directory where the binary is located.

Yet another argument for using the OPTI Toolbox interface instead. 

However, why necessarily use csdp? Mosek/sdpt3/sedumi are much more commonly used and do not have ny of these issues
Reply all
Reply to author
Forward
0 new messages