Code Monkey home page Code Monkey logo

sedumi's Introduction

SeDuMi: Optimization over symmetric cones

Click here to download the latest SeDuMi bundle. These bundles now include pre-compiled MATLAB and Octave MEX files files for Windows, Linux, and macOS (Intel and Apple Silicon).

SeDuMi (Self-Dual-Minimization) is a Matlab/GNU Octave package for solving convex optimization problems involving linear equations and inequalities, second-order cone constraints, and semidefinite constraints (linear matrix inequalities).

Please note that this is an unofficial repository for SeDuMi. The official SeDuMi site is hosted by the CORAL Lab at the Department of Industrial and Systems Engineering at Lehigh University. This repository was originally not intended to remain a permanent fork from the last official SeDuMi release. However, this repository contains a still maintained versions of SeDuMi.

This version of SeDuMi is distributed under the GNU General Public License 2.0.

Installation instructions

Download and add the extracted SeDuMi directory to the Matlab load path and run

install_sedumi

This version of SeDuMi comes with pre-compiled binaries for Matlab (MS Windows, Linux, and macOS). In case the binaries don't work for your system, try to run

install_sedumi -rebuild

Note that you may have to install a compiler for Matlab first. Using GNU Octave, the binaries are compiled automatically.

Development History

The original version was developed by Jos. F. Sturm, who sadly passed away in 2003. Development continued under the direction of Prof. Tamás Terlaky by former Ph.D. students Imre Pólik and Oleksandr Romanko.

Of course, like many open-source projects, it has benefited considerably from contributions by others, including the developers of YALMIP and CVX, two modeling frameworks for optimization that use SeDuMi as a solver. The authors of these packages co-administer this repo, along with Jonathan Currie from AUT University.

For a list of changes for each SeDuMi version, check the file Changelog.md.

Citation

If you find this software useful, please cite it in your publication as follows:

@article{doi:10.1080/10556789908805766,
  author = {Sturm, Jos F.},
  title = {Using SeDuMi 1.02, A {MATLAB} toolbox for optimization over symmetric cones},
  journal = {Optimization Methods and Software},
  volume = {11},
  number = {1-4},
  pages = {625-653},
  year  = {1999},
  doi = {10.1080/10556789908805766},
  URL = {https://doi.org/10.1080/10556789908805766}
}

Account of original sources:

The files ordmmd.c and symfct.c are C-versions of Fortran modules by Esmond G. Ng and Barry W. Peyton, Oak Ridge National Laboratory, 1994, from which large parts are based on SPARSPAK-A RELEASE III by Joseph W.H. Liu, University of Waterloo, 1984.

All other files in this distribution are by Jos F. Sturm, Tilburg University, 2001, updated and further developed by Imre Polik, McMaster University, Hamilton, Canada.

Report problems

You are welcome to submit bug reports or request for help on the GitHub issue page. We cannot guarantee that they will be addressed in a timely fashion, we will do our best.

Development notes

As of April 2024, this repository uses GitHub Actions to compile MEX files for Linux, Windows, and macOS (both Intel and Apple Silicon variants). Whenever a new Git tag is pushed to the repository, these actions automatically create .zip and .tgz bundles of that version of the code, including those compiled MEX files, and publishes those bundles to the Releases page.

If you wish to contribute fixes or improvements to this repository, please feel free to submit a pull request.

sedumi's People

Contributors

araujoms avatar blegat avatar jarmill avatar johanlofberg avatar jonathancurrie avatar mcg1969 avatar nvitucci avatar robertgj avatar siko1056 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sedumi's Issues

error when installing sedumi in matlab2016b

install_sedumi
Building SeDuMi binaries...
mex -O -DPC -DmwIndex=int -DmwSize=int -DmwSignedIndex=int bwblkslv.c sdmauxFill.c sdmauxRdot.c "D:\Program Files\MATLAB\R2016b\extern\lib\win64\microsoft\libmwlapack.lib"
使用 'Microsoft Visual C++ 2015 Professional (C)' 编译。
错误使用 mex
bwblkslv.c
d:\program files\matlab\r2016b\extern\include\tmwtypes.h(791): error C2632: “int”后面的“int”非法
d:\program files\matlab\r2016b\extern\include\tmwtypes.h(791): warning C4091: “typedef ”: 没有声明变量时忽略“int”的左侧
d:\program files\matlab\r2016b\extern\include\tmwtypes.h(792): error C2632: “int”后面的“int”非法
d:\program files\matlab\r2016b\extern\include\tmwtypes.h(792): warning C4091: “typedef ”: 没有声明变量时忽略“int”的左侧
d:\program files\matlab\r2016b\extern\include\tmwtypes.h(793): error C2632: “int”后面的“int”非法
d:\program files\matlab\r2016b\extern\include\tmwtypes.h(793): warning C4091: “typedef ”: 没有声明变量时忽略“int”的左侧
F:\Matlab-Program\SeDuMi_1_3\bwblkslv.c(184): warning C4028: 形参 1 与声明不同
F:\Matlab-Program\SeDuMi_1_3\bwblkslv.c(184): warning C4028: 形参 3 与声明不同
F:\Matlab-Program\SeDuMi_1_3\bwblkslv.c(204): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据
F:\Matlab-Program\SeDuMi_1_3\bwblkslv.c(215): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据
F:\Matlab-Program\SeDuMi_1_3\bwblkslv.c(224): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据
F:\Matlab-Program\SeDuMi_1_3\bwblkslv.c(257): warning C4244: “=”: 从“const double”转换到“int”,可能丢失数据
F:\Matlab-Program\SeDuMi_1_3\bwblkslv.c(259): warning C4244: “=”: 从“const double”转换到“int”,可能丢失数据

出错 install_sedumi (line 113)
eval( temp );

Octave 4.0, install failed

Run install_sedumi:
SeDuMi installation script
Directory: /home/airplus/sedumi
Octave 4.0.0 on x86_64-pc-linux-gnu

Looking for existing binaries...none found; building...
Attempting to recompile the SeDuMi binaries:
Template: mex -O -DOCTAVE -lblas
.....
**At least one compilation failure occurred.

SeDuMi was not successfully installed.
Please attempt to correct the errors and try again.**

And if I run install_sedumi.m:
It further alters error: can't perform indexing operations for type

Any help is welcome.

Octave installation issues

I tried installing all octave versions on My Macbook pro, and all of them are not giving the right one. Any suggestions pls
IMG_20220306_193250

move private code to private subdirectory

Arguably none of the code here other than sedumi.m is needed by the end user. However, having a file with an innocuous name like ddot.m or vec.m in this directory means an end user can accidentally put a 'homonym' file somewhere in their path which causes a bug or gremlin. The solution would be to put all code other than sedumi.m and possibly the example problems in conversion into a subdirectory called private.

Unhelpful error message when building binaries wtih Octave on Linux

When running the script install_sedumi with Octave on Linux, it fails with the unhelpful error message "Compilation failed." To find out what was going on, I ran the manually the compilation command "mex -O2 -DOCTAVE -Wall -I/usr/include/openblas bwblkslv.c sdmauxFill.c sdmauxRdot.c", which then told me simply that I needed to install "liboctave-dev" in order to be able to build octofiles.

It would be nice if you would let this error message get through, as it is very easy to fix and then the compilation works. Perhaps it's worth remarking that I had done the default install of Octave, and it does not include liboctave-dev.

SET has been considered obsolete

Dear Joahn
please help me with this problem

Warning: Strict inequalities are not supported. A non-strict has been added instead')

In > (line 12)
In implementacao (line 31)
SET has been considered obsolete for many years, and the time has come...
Update your code. http://users.isy.liu.se/johanl/yalmip/pmwiki.php?n=Commands.set
Error using constraint/set (line 6)
Obsolete command

Error in implementacao (line 31)
LMIs=LMIs+set(P>0)+set([X sqrt(R)*Y; Y'*sqrt(R) P]>0);

this code
% SIMULAÇÃO DO PROCESSO DE 2a ORDEM MIMO DO TANQUE
% DADO AS SEGUINTES MATRIZES DE EQUAÇÃO DE ESTADOS

r1=[0.15 0.25]; r2=[0.2 0.3]; c1=5; c2=c1;

% OBTENDO AS INCERTEZAS DO PROCESSO
for i=1:2
for j=1:2
a{2*(i-1)+j}=[-r1(i)/c1 r1(i)/c1; r1(i)/c2 -((r1(i)/c2)+(r2(j)/c2))];
end
end
b(1,1)=1/c1; b(2,2)=1/c2; b(1,2)=0; b(2,1)=0; c=eye(2); d=zeros(2);

% APLICAÇÃO DO CONTROLE LQR-LMI NAS INCERTEZAS
for i=1:4
ahat{i}=[a{i} zeros(size(b)); -c zeros(size(d))];
end
bhat=[b; zeros(size(d))];

% PARAMETROS DAS MATRIZES DE PONDERAÇÃO
R=100*[1 0;0 1]; Q=[1 0 0 0;0 1 0 0;0 0 0.1 0;0 0 0 0.1];

% % gerando matrizes simetricas
LMIs=set([]);
X=sdpvar(2,2,'symmetric');
Y=sdpvar(2,4,'full');
P=sdpvar(4,4,'symmetric');
for i=1:4
LMIs=LMIs+set(P>0)+set([X sqrt(R)Y; Y'sqrt(R) P]>0);
LMIs=LMIs+set(ahat{i}P+Pahat{i}'-bhat
Y-Y'bhat'+eye(4)<0);
end
obj=trace(Q
P)+trace(X);
sol=solvesdp(LMIs,obj);
khat=double(Y)inv(double(P));
k=khat(1:2,1:2); ki=-khat(1:2,3:end);
r1=mean([0.15 0.25]); r2=mean([0.2 0.3]); c1=5; c2=5;
aa=[-r1/c1 r1/c1; r1/c2 -((r1/c2)+(r2/c2))];
A=[aa-b
k b
ki; -c zeros(size(d))];
B=[zeros(size(b)); eye(size(d))];
C=[c zeros(size(d))];
D=d;
x0=zeros(4,1); t=0:1:400; nit=length(t);
r=[0.2ones(1,ceil(nit/2)) 0.15ones(1,ceil(nit/2)-1);
0.1ones(1,ceil(nit/2)) 0.15ones(1,ceil(nit/2)-1)];
sys=ss(aa,b,c,d);
sysc=ss(A,B,C,D);
[y,t,x]=lsim(sysc,r,t,x0);
y=y+(1+2rand)1e-3randn(size(y));
x=x+(1+2
rand)1e-3randn(size(x));
u=(-khat*x')';

% Respostas no tempo
figure(1),subplot(2,1,1), plot(t,r(1,:)','k-.',t,y(:,1),'k-','linewidth',2), axis([0 nit-1 0 0.25]),
set(gca,'fontsize',10,'fontname','Times New Roman')
xlabel('Tempo(s)','fontsize',12,'fontname','Times NewRoman','fontangle','normal'),
ylabel('Altura h_1 (m)','fontsize',12,'fontname','Times NewRoman','fontangle','normal')
legend('ref','saida h_1'); grid
title('ALTURAS DO TANQUE','fontsize',12,'fontname','Times NewRoman','fontangle','normal')

subplot(2,1,2), plot(t,r(2,:)','k-.',t,y(:,2),'k-','linewidth',2),
axis([0 nit-1 0 0.25]),
set(gca,'fontsize',10,'fontname','Times New Roman')
xlabel('Tempo(s)','fontsize',12,'fontname','Times NewRoman','fontangle','normal'),
ylabel('Altura h_2 (m)','fontsize',12,'fontname','Times NewRoman','fontangle','normal')
legend('ref','saida h_2'); grid

figure(2),
subplot(2,1,1), plot(t,u(:,1),'k-','linewidth',2), axis([0 nit-1 -0.01
0.05]), grid
set(gca,'fontsize',10,'fontname','Times New Roman')
xlabel('Tempo(s)','fontsize',12,'fontname','Times NewRoman','fontangle','normal'),
ylabel('q_1 (m^3/s)','fontsize',12,'fontname','Times NewRoman','fontangle','normal')
title('VAZÕES DO TANQUE','fontsize',12,'fontname','Times NewRoman','fontangle','normal')

subplot(2,1,2), plot(t,u(:,2),'k-','linewidth',2), axis([0 nit-1 -0.01 0.05]), gridset(gca,'fontsize',10,'fontname','Times New Roman')
xlabel('Tempo(s)','fontsize',12,'fontname','Times NewRoman','fontangle','normal'),ylabel('q_2 (m^3/s)','fontsize',12,'fontname','Times NewRoman','fontangle','normal')

% Respostas na Frequencia
% Obtenção das incertezas na frequência
sys4=ss(double(a{4}),b,c,d); T4=sys4; S4=eye(2)-T4;
sys3=ss(double(a{3}),b,c,d); T3=sys3; S3=eye(2)-T3;
sys2=ss(double(a{2}),b,c,d); T2=sys2; S2=eye(2)-T2;
sys1=ss(double(a{1}),b,c,d); T1=sys1; S1=eye(2)-T1;
sys_ma=ss(aa,b,c,d);
T=sysc; %sensibilidade complementar
S=eye(2)-T; %sensibilidade
w=logspace(-3,2,200); %faixa de frequencia
M1=(sys1/sys_ma)-eye(2);
M2=(sys2/sys_ma)-eye(2);
M3=(sys3/sys_ma)-eye(2);
M4=(sys4/sys_ma)-eye(2);
s=tf('s');
Dm1=M1.cinv(sM1.e-M1.a)M1.b+M1.d;
Dm2=M2.c
inv(sM2.e-M2.a)M2.b+M2.d;
Dm3=M3.c
inv(s
M3.e-M3.a)M3.b+M3.d;
Dm4=M4.c
inv(s*M4.e-M4.a)*M4.b+M4.d;

figure(3),
sigma(T,'k-',T1,'k--',T2,'k--',T3,'k--',T4,'k--');
set(gca,'fontsize',10,'fontname','Times New Roman')
xlabel('Frequência','fontsize',12,'fontname','Times NewRoman','fontangle','normal'),
ylabel('Amplitude','fontsize',12,'fontname','Times NewRoman','fontangle','normal')
title('SVD Aplicado à T(s)','fontsize',12,'fontname','Times NewRoman','fontangle','normal')
legend('MTMF', 'MTMA');
grid;

figure(4),
sigma(S,'k-',S1,'k--',S2,'k--',S3,'k--',S4,'k--');
set(gca,'fontsize',10,'fontname','Times New Roman')
xlabel('Frequência','fontsize',12,'fontname','Times NewRoman','fontangle','normal'),
ylabel('Amplitude','fontsize',12,'fontname','Times NewRoman','fontangle','normal')
title('SVD Aplicado à S','fontsize',12,'fontname','Times NewRoman','fontangle','normal')
legend('MTMF', 'MTMA');
title('SVD Aplicado a S(s)');
grid

figure(5),
sigma(T/S,'k-',T1/S1,'k--',T2/S2,'k--',T3/S3,'k--',T4/S4,'k--');
set(gca,'fontsize',10,'fontname','Times New Roman')
xlabel('Frequência','fontsize',12,'fontname','Times NewRoman','fontangle','normal'),
ylabel('Amplitude','fontsize',12,'fontname','Times NewRoman','fontangle','normal')
title('SVD Aplicado à S','fontsize',12,'fontname','Times NewRoman','fontangle','normal')
legend('|GK|', 'G_i');
title('SVD Aplicado ao modelo controlado em MTMA');
grid

figure(6),
sigma(1/T,'k-',M1,'k--',M2,'k--',M3,'k--',M4,'k--');
set(gca,'fontsize',10,'fontname','Times New Roman')
xlabel('Frequência','fontsize',12,'fontname','Times NewRoman','fontangle','normal'),
ylabel('Amplitude','fontsize',12,'fontname','Times NewRoman','fontangle','normal')
title('SVD Aplicado à S','fontsize',12,'fontname','Times NewRoman','fontangle','normal')
legend('1/T', 'M(j\omega)');
title('Analise de Estabilidade Robusta');
grid

Ready for OS X 10.9 Mavericks?

Hi,

First of all, thanks for supporting Sedumi, I used it extensively and successfully in a Toolbox I implemented and in research work!

I heard from a fellow that the Toolbox I implemented and requires Sedumi crashed in functions calling Sedumi on a MAC recently upgraded to OS X 10.9.

Do you already have a version with the mex files for that OS? I've already been through the process of recompiling them on that same machine on OS X 10.8 and it was a long journey to get a compiler and reference it to the mex function. So if you do have them already I would love to let him try them first.

Cheers,

Guillaume

problem with sedumi installation on mac OS big sur and octave 6.2.0

Hi, I am receiving the following error message when I try to install sedumi on my macbook with Big Sur OS and Octave 6.2.0.

---------------------------------------------------------------------------
SeDuMi installation script
   Directory: /Users/alexandre/lmi-solvers/sedumi-1.3.5
   Octave 6.2.0 on x86_64-apple-darwin18.7.0
---------------------------------------------------------------------------
Looking for existing binaries...none found; building...
Attempting to recompile the SeDuMi binaries:
Template: mex -O2 -DOCTAVE -Wall -I/usr/local/opt/openblas/include %s -L/usr/local/opt/openblas/lib -lopenblas
   bwblkslv.mex:   bwblkslv.c sdmauxFill.c sdmauxRdot.c
In file included from bwblkslv.c:45:
./blksdp.h:41:10: fatal error: 'f77blas.h' file not found
#include "f77blas.h"  /* defines "blasint" data type */
         ^~~~~~~~~~~
1 error generated.
warning: mkoctfile: building exited with failure status
Compilation failed.
error: ---------------------------------------------------------------------------
SeDuMi was not successfully installed.
Please attempt to correct the errors and try again.

For example, try setting the compilation command:

  install_sedumi -rebuild 'mex -O2 -DOCTAVE -Wall -I/usr/local/opt/openblas/include %s -L/usr/local/opt/openblas/lib -lopenblas'
error: called from
    install_sedumi at line 263 column 3

I tried the option rebuild but didn't work as well. When I add the sedumi paths I received the message:

warning: function /Users/alexandre/lmi-solvers/sedumi-1.3.5/vec.m shadows a built-in function
warning: called from
    /Users/alexandre/.octaverc at line 2 column 3

I am not familiar with software installation and I would be thankful with any help to solve this problem.

SeDumi not installed successfully on Matlab_R2017b

I have downloaded Sedumi from https://github.com/SQLP/SeDuMi and installed it, however it is still not working. When I tried to re-build it, I got this message saying:

'' Warning: Xcode is installed, but its license has not been accepted. Run Xcode
and accept its license agreement.

At least one compilation failure occurred.

SeDuMi was not successfully installed.
Please attempt to correct the errors and try again.''

I don't know what the Xcode is.

Also ''its license has not been accepted" what does that mean?
Could you help me?

greatly appreciate your help.

Octave 5.1 flatpak installation errors

Full disclosure, I don't really know what I'm doing.

I had SeDuMi working fine in Octave 4.4.1 on Ubuntu. Then I installed Octave version 5.1.0. Then when I tried to use SeDuMi, I got error messages like

error: pretransfo: /path/to/sedumi/whichcpx.mex: failed to load: liboctinterp.so.6: cannot open shared object file: No such file or directory
error: called from
    pretransfo at line 211 column 5
    sedumi at line 261 column 26

I don't really know what this means, but I think it means that I need to recompile the mex files in Octave 5.1.0. I attempted to do this with

install_sedumi('-rebuild')

but this resulted in many error messages.

For what it's worth, it appears a new version of Octave, 6.1.0, is right around the corner. Not sure if or how that will affect things.

Error trying run example

I am running MATLAB 2017a on a 2016 MacBook Pro

I am trying to run the example ../sedumi/examples/archo0.mat that loads the variables At, b, c, K and then typing [x,y,info] = sedumi(At,b,c,K) as the command window.

A large number of errors are returned that I am missing symbols required for the Mex file
/sedumi/whichcpx.mexmaci64

followed by:
Error in pretransfo (line 211)
cpx = whichcpx(K);

Error in sedumi (line 261)
[A,b,c,K,prep,origcoeff] = pretransfo(A,b,c,K,pars);

Sedumi: Wregion (Line 98), Wrong ues of psdinvjmul 'reflect.c' line 290 fail (m>1)

Hi Professors and Sedumi team administrators, sincerely appreciate for all your great work about Sedumi.

I am using Sedumi(latest release)+SmrsoftV12(shown as attached)+Mosek in Matlab R2019a, win10 x64 system.

When I am running the SEDUMI to solve the SOSP, .m file shown in the attached file:

an error shown (for directly reading, I post the error report at the end. Hope no offensive).
image

Sorry that I am not familiar with the C++, so that I even have no idea what's wrong with the code. Could you leave a hint for further process if available? Hoping for your reply. Thanks!

Best regards,
WOKI

`Error using psdinvjmul
Assertion failed (m>1) at line 290 of file 'reflect.c'.

Stack trace:
[ 0] 0x000000001092b2c3 bin\win64\libmwfl.dll+00045763 foundation::core::diag::thread_context::unspecified_bool+00000051
[ 1] 0x0000000010929288 bin\win64\libmwfl.dll+00037512 foundation::core::diag::stacktrace_base::capture+00000024
[ 2] 0x00000000fc607f93 bin\win64\libmex.dll+00163731 cppmex_mexUnlock_with_error_check+00075219
[ 3] 0x00000000fc6108f9 bin\win64\libmex.dll+00198905 mexPrintAssertion_800+00001081
[ 4] 0x00000000f7272eb0 C:\Users\hjhuang\OneDrive??\2020CDC\matlab_example\Matlab-5b3e8f0b724b518674c6a58427d191fdcb4677b4
(2)\Matlab-5b3e8f0b724b518674c6a58427d191fdcb4677b4\Controlltheory_Robusttheory\sedumi-master\psdinvjmul.mexw64+00011952 mexFunction+00004512
[ 5] 0x00000000f72716e1 C:\Users\hjhuang\OneDrive??\2020CDC\matlab_example\Matlab-5b3e8f0b724b518674c6a58427d191fdcb4677b4
(2)\Matlab-5b3e8f0b724b518674c6a58427d191fdcb4677b4\Controlltheory_Robusttheory\sedumi-master\psdinvjmul.mexw64+00005857
[ 6] 0x00000000f7272072 C:\Users\hjhuang\OneDrive??\2020CDC\matlab_example\Matlab-5b3e8f0b724b518674c6a58427d191fdcb4677b4
(2)\Matlab-5b3e8f0b724b518674c6a58427d191fdcb4677b4\Controlltheory_Robusttheory\sedumi-master\psdinvjmul.mexw64+00008306 mexFunction+00000866
[ 7] 0x00000000fc634844 bin\win64\libmex.dll+00346180 MexRetrieveVersion+00003348
[ 8] 0x00000000fc634a3c bin\win64\libmex.dll+00346684 MexRetrieveVersion+00003852
[ 9] 0x00000000fc634ba4 bin\win64\libmex.dll+00347044 MexRetrieveVersion+00004212
[ 10] 0x00000000fc618089 bin\win64\libmex.dll+00229513 mexUnlock+00024825
[ 11] 0x0000000017299a66 bin\win64\pgo\m_dispatcher.dll+00039526 Mfh_file::dispatch_file_common+00000210
[ 12] 0x000000001732252e bin\win64\pgo\m_dispatcher.dll+00599342 Mfh_error::lookup+00005234
[ 13] 0x0000000017322dcd bin\win64\pgo\m_dispatcher.dll+00601549 Mfh_file::dispatch+00000045
[ 14] 0x000000001800b7a0 bin\win64\pgo\m_lxe.dll+00505760
[ 15] 0x000000001800be01 bin\win64\pgo\m_lxe.dll+00507393
[ 16] 0x00000000180b6ebc bin\win64\pgo\m_lxe.dll+01207996
mwboost::archive::detail::iserializermwboost::archive::binaryTerm_iarchive,ir::IrTree::load_object_data+00609492
[ 17] 0x00000000180b7ba3 bin\win64\pgo\m_lxe.dll+01211299
mwboost::archive::detail::iserializermwboost::archive::binaryTerm_iarchive,ir::IrTree::load_object_data+00612795
[ 18] 0x00000000180b9ced bin\win64\pgo\m_lxe.dll+01219821
mwboost::archive::detail::iserializermwboost::archive::binaryTerm_iarchive,ir::IrTree::load_object_data+00621317
[ 19] 0x00000000180b90cf bin\win64\pgo\m_lxe.dll+01216719
mwboost::archive::detail::iserializermwboost::archive::binaryTerm_iarchive,ir::IrTree::load_object_data+00618215
[ 20] 0x00000000180b95fc bin\win64\pgo\m_lxe.dll+01218044
mwboost::archive::detail::iserializermwboost::archive::binaryTerm_iarchive,ir::IrTree::load_object_data+00619540
[ 21] 0x0000000018009934 bin\win64\pgo\m_lxe.dll+00497972
[ 22] 0x00000000180102b5 bin\win64\pgo\m_lxe.dll+00524981
[ 23] 0x000000001800f85c bin\win64\pgo\m_lxe.dll+00522332
[ 24] 0x000000001800d9c5 bin\win64\pgo\m_lxe.dll+00514501
[ 25] 0x000000001800e2b5 bin\win64\pgo\m_lxe.dll+00516789
[ 26] 0x000000001800dbe5 bin\win64\pgo\m_lxe.dll+00515045
[ 27] 0x0000000017299a66 bin\win64\pgo\m_dispatcher.dll+00039526 Mfh_file::dispatch_file_common+00000210
[ 28] 0x000000001732252e bin\win64\pgo\m_dispatcher.dll+00599342 Mfh_error::lookup+00005234
[ 29] 0x0000000017322dcd bin\win64\pgo\m_dispatcher.dll+00601549 Mfh_file::dispatch+00000045
[ 30] 0x0000000018004fb9 bin\win64\pgo\m_lxe.dll+00479161
[ 31] 0x00000000181864f2 bin\win64\pgo\m_lxe.dll+02057458 MathWorks::lxe::StartupLxeEngine+00034326

Error in wregion (line 98)
psdinvjmul(vTAR,vfrm.s,dxmdz, K)];

Error in sedumi (line 478)
wregion(L,Lden,Lsd,...

Error in bamiso (line 298)
[x1,x2,x3]=sedumi(datsdmA,datsdmb,datsdmc,datsdmK,pars);

Error in badabest_f_fixv (line 60)
bamiso

Error in badabest_f (line 2)
badabest_f_fixv

Error in smrda (line 1999)
badabest_f

Error in example (line 82)
[bndC,MC,DatC]=smrda(fc,[],v);`

particular objective -> NaN

There are particular linear objective directions that will induce failure (NaN).

In the attached Matlab CVX code, changing matrix Y to the Identity or switching to sdpt3 will avert failure.

Version info is contained in the Matlab m file.

Remove mex files from repository?

Is it possible to have a clean repository without all the mex binaries? (Or does it require a bunch of dependencies to build?)

Just having a Makefile or a matlab script that calls "mex" would probably be a better long-term solution for the sanity of the repository.

Why unexplained crash in SeDuMi?

My sedumi on MAC says
"Nope, unexplained crash in SeDuMi! (could be memory issues or wrong binary)
Make sure you have a recent and compiled version"

Complex cones fails

% Create a positive (semi)definite matrix:
R=randn(5)+j*randn(5); R=R*R'; 
% Make sure it's Hermitian:
R=(R+R')/2;

% Primal formulation
clear At b c K
c=vec(eye(5));
At=vec(R);
b=1;
K.s=5;
K.scomplex=1;

[x,y,info]=sedumi(At,b,c,K);

% Normed eigenvector:
e=x(1:5)/norm(x(1:5));
% Verify the eigenvalue
[real(e'*R*e), max(eig(R))]

SeDumi 1.3 instalation fail in Octave 4.2.2 - Linux 64bits

Hello,

could someone give me some help?

I'm having problems to install SeDumi. I'm working with Linux Mint 19.3 Cinnamon - 64 bits and Octave 4.2.2.

I have successfully installed YALMIP and SDPT3. I got the latest version of YALMIP from here:

https://yalmip.github.io/download/

However SeDumi is not working.

I have doing the following steps:

  1. Add path for Sedumi;

  2. Running yalmiptest. Results: Fail

When I run yalmiptest it is able to list the Sedumi solver but it can not use it to solve the tests. The messages are something like this

Testing function complete_2

SeDuMi 1.3.4 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, theta = 0.250, beta = 0.500

SeDuMi had unexplained problems, maybe due to linear dependence?
YALMIP tweaks the problem (adds 1e6 magnitude bounds on all variables) and restarts...

SeDuMi 1.3.4 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, theta = 0.250, beta = 0.500
Nope, unexplained crash in SeDuMi! (could be memory issues or wrong binary)
Make sure you have a recent and compiled version

  1. Run install file install_sedumi.m. Results: Fail

I receive the following messages. It is a long list so I'm posting just part of them

install_sedumi


SeDuMi installation script
Directory: /home/luiz/YALMIP/sedumi-master
Octave 4.2.2 on x86_64-pc-linux-gnu

Looking for existing binaries...none found; building...
Attempting to recompile the SeDuMi binaries:
Template: mex -O2 -DOCTAVE -I/usr/include/openblas %s
bwblkslv.mex: bwblkslv.c sdmauxFill.c sdmauxRdot.c
In file included from bwblkslv.c:45:0:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /* defines "blasint" data type /
^~~~~~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status
choltmpsiz.mex: choltmpsiz.c
cholsplit.mex: cholsplit.c
dpr1fact.mex: dpr1fact.c auxfwdpr1.c sdmauxCone.c sdmauxCmp.c sdmauxFill.c sdmauxScalarmul.c sdmauxRdot.c blkaux.c
In file included from dpr1fact.c:52:0:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /
defines "blasint" data type /
^~~~~~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status
symfctmex.mex: symfctmex.c symfct.c
ordmmdmex.mex: ordmmdmex.c ordmmd.c
quadadd.mex: quadadd.c
In file included from quadadd.c:42:0:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /
defines "blasint" data type /
^~~~~~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status
sqrtinv.mex: sqrtinv.c sdmauxCone.c
In file included from triuaux.h:37:0,
from sqrtinv.c:43:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /
defines "blasint" data type */
^~~~~~~~~~~

  1. Trying to rebuild with install_sedumi -rebuild. Results: Fail

Again the results are the same. Posting just part of the messages.

install_sedumi -rebuild


SeDuMi installation script
Directory: /home/luiz/YALMIP/sedumi-master
Octave 4.2.2 on x86_64-pc-linux-gnu

Attempting to recompile the SeDuMi binaries:
Template: mex -O2 -DOCTAVE -I/usr/include/openblas %s
bwblkslv.mex: bwblkslv.c sdmauxFill.c sdmauxRdot.c
In file included from bwblkslv.c:45:0:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /* defines "blasint" data type /
^~~~~~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status
choltmpsiz.mex: choltmpsiz.c
cholsplit.mex: cholsplit.c
dpr1fact.mex: dpr1fact.c auxfwdpr1.c sdmauxCone.c sdmauxCmp.c sdmauxFill.c sdmauxScalarmul.c sdmauxRdot.c blkaux.c
In file included from dpr1fact.c:52:0:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /
defines "blasint" data type /
^~~~~~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status
symfctmex.mex: symfctmex.c symfct.c
ordmmdmex.mex: ordmmdmex.c ordmmd.c
quadadd.mex: quadadd.c
In file included from quadadd.c:42:0:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /
defines "blasint" data type /
^~~~~~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status
sqrtinv.mex: sqrtinv.c sdmauxCone.c
In file included from triuaux.h:37:0,
from sqrtinv.c:43:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /
defines "blasint" data type /
^~~~~~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status
givensrot.mex: givensrot.c auxgivens.c sdmauxCone.c
In file included from givensrot.c:41:0:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /
defines "blasint" data type /
^~~~~~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status
urotorder.mex: urotorder.c auxgivens.c sdmauxCone.c sdmauxTriu.c sdmauxRdot.c
In file included from urotorder.c:43:0:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /
defines "blasint" data type /
^~~~~~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status
psdframeit.mex: psdframeit.c reflect.c sdmauxCone.c sdmauxRdot.c sdmauxTriu.c sdmauxScalarmul.c
In file included from psdframeit.c:40:0:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /
defines "blasint" data type /
^~~~~~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status
psdinvjmul.mex: psdinvjmul.c reflect.c sdmauxCone.c sdmauxRdot.c sdmauxTriu.c sdmauxScalarmul.c blkaux.c
In file included from psdinvjmul.c:43:0:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /
defines "blasint" data type /
^~~~~~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status
bwdpr1.mex: bwdpr1.c sdmauxCone.c sdmauxRdot.c
In file included from bwdpr1.c:45:0:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /
defines "blasint" data type /
^~~~~~~~~~~
compilation terminated.
warning: mkoctfile: building exited with failure status
fwdpr1.mex: fwdpr1.c auxfwdpr1.c sdmauxCone.c sdmauxScalarmul.c
In file included from fwdpr1.c:44:0:
blksdp.h:41:10: fatal error: f77blas.h: No such file or directory
#include "f77blas.h" /
defines "blasint" data type */
^~~~~~~~~~~
compilation terminated.

Observations:

Obs1:
I had successfully installed the liblas and lapack on my computer. I have used the command:

$ sudo apt-get install libblas-dev liblapack-dev^C

Obs2:
After try to install Sedumi the SDPT3 solver do not work anymore.

Obs3:

Running sedumi(1,1,1) i receive:

sedumi(1,1,1)
SeDuMi 1.3.4 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
error: The SeDuMi binaries for your platform are not installed.
To rectify, run the following commands from the Octave command line:

cd /home/luiz/YALMIP/sedumi-master
install_sedumi

For more information, read /home/luiz/YALMIP/sedumi-master/Install.txt.
error: called from
sedumi_binary_error at line 15 column 1
partitA at line 40 column 1
sedumi at line 350 column 8

Could someone help me to make Sedumi run properly?

using sostool and sedumi on matlab 2018a, but sostool demo8 didn't work, compatibility issue?

Hi,
I am a beginner on sedumi and sostool. I installed them both on matlab 2018a and ran demo examples and found out that sostool demo8 didn't work correctly. The following are the error:

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);

This is because some of the input variable are null, so the dimension m is 0, causing the crash.

As this is a demo code, I don't expect something is wrong. I suspect either I installed sedumi and sostool incorrectly, or there is a compatibility issue. However, all other demo files in sostool works. sedumi (1,1,1) also worked as expect. So I suspect there is a compatibility issue between the three software.

If there is a compatibility issue, which matlab version I should use? Thank you very much in advance!

Since this could be compatibility issue between three softwares, I know it might not be the compatibility issue between sedumi and matlab 2018a, I am just trying to get as much information as I can.

Thank you!

Undefined function or variable 'qrK'

Hello!
So, I am a new user of Sedumi.
I try to solve a simple SOSP with SOSTOOLS using the Sedumi solver.
I use MATLAB R2018a, running on MAC OS Sierra.

I get the following error:

_Undefined function or variable 'qrK'.

Error in sdinit (line 86)
vfrm.s = qrK(d.u,K);

Error in sedumi (line 401)
[d, v,vfrm, y,y0, R] = sdinit(A,b,c,dense,K,pars);

Error in sossolve (line 149)
[x,y,info] = sedumi(At,b,c,K,pars);_

**The thing is that qrK.mexa64 and qrK.mexglx actually exist in my directory, so I don't know why MATLAB cannot find it. **

Any help?

sedumi:function handle problem in minpsdeig.m

in minpsdeig.m (line 70)

sedumi/minpsdeig.m

Lines 66 to 74 in 2996306

XX = reshape(XX,ki,ki);
XX = XX + XX';
if ki > 500
if nnz(XX) < 0.1 * numel(XX), XX = sparse(XX); end
[v,eigv(i),flag] = eigs(XX,1,'SA',struct('issym',true)); %#ok
if flag, eigv(i) = min(eig(XX)); end
else
eigv(i) = min(eig(XX));
end

there may be an issue in function eigs(XX,1,,‘SA'......)
matlab warn that XX is not a function handle.

Incorrect solution for LP

Consider the problem

min -x2
- x1 - 2x2 = 0
  x1 - 3x2 = 0
x1 free
x2 >= 0

with dual

max 0
-y1 +  y2 = 0
2y1 + 3y2 >= 1

The only feasible solution of the primal is (0, 0) and for the dual, the feasible solution is the ray (1, 1) starting at (1/5, 1/5).
SeDuMi returns the correct x (0, 0) but an incorrect (-1.2, 0.6).

The problem is the 13th test problem of MOI and it is used to verify the correctness of the Julia SeDuMi wrapper.
Here is what I get when using sedumi directly:

julia> A = [-1.0 -2.0; 1.0 -3.0]
2×2 Array{Float64,2}:
 -1.0  -2.0
  1.0  -3.0

julia> b = [0.0, 0.0]
2-element Array{Float64,1}:
 0.0
 0.0

julia> c = [0.0; -1.0]
2-element Array{Float64,1}:
  0.0
 -1.0

julia> using SeDuMi

julia> sedumi(A, b, c, SeDuMi.Cone(1, 1))
>> SeDuMi 1.32 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
Put 1 free variables in a quadratic cone
eqs m = 2, order n = 4, dim = 4, blocks = 2
nnz(A) = 4 + 0, nnz(ADA) = 4, nnz(L) = 3
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            1.25E+01 0.000
  1 :   0.00E+00 1.44E-06 0.000 0.0000 1.0000 1.0000   1.00  1  1  1.0E-06
  2 :   0.00E+00 5.75E-10 0.000 0.0004 0.9999 0.9999   1.00  1  2  3.5E-10

iter seconds digits       c*x               b*y
  2      0.4   Inf -3.2329888893e-11  0.0000000000e+00
|Ax-b| =   9.8e-10, [Ay-c]_+ =   1.6E-16, |x|=  1.4e+00, |y|=  1.3e+00

Detailed timing (sec)
   Pre          IPM          Post
3.601E-01    2.107E-01    2.660E-02    
Max-norms: ||b||=0, ||c|| = 1,
Cholesky |add|=0, |skip| = 1, ||L.L|| = 2.
([-4.67511e-10, 3.23299e-11], [-1.2, 0.6], Dict{String,Any}("timing"=>[0.360066 0.210701 0.0266042],"dinf"=>0.0,"pinf"=>0.0,"cpusec"=>1.66,"wallsec"=>0.597372,"feasratio"=>1.0,"r0"=>9.75092e-10,"iter"=>2.0,"numerr"=>0.0))

Any idea what's the issue ?

i have problem with sedumi i rebuilt it but it dont work

Invalid MEX-file '/Users/ayk/Downloads/sedumi-master/whichcpx.mexmaci64':
dlopen(/Users/.../Downloads/sedumi-master/whichcpx.mexmaci64, 6): Library not loaded: @loader_path/libmwlapack.dylib
Referenced from: /Users/.../Downloads/sedumi-master/whichcpx.mexmaci64
Reason: image not found.

SOCP runs into numerical problems

SeDuMi fails to converge for this problem. Code using CVX is attached; this data file contains the actual inputs to SeDuMi for testing without CVX.

e0 = [1;0];
e1 = [0;1];
ep = [1;1]/sqrt(2);
em = [1;-1]/sqrt(2);
R00 = e0 * e0';
R01 = e1 * e1';
R10 = ep * ep';
R11 = em * em';
R00 = (R00 + R00')/2;
R01 = (R01 + R01')/2;
R10 = (R10 + R10')/2;
R11 = (R11 + R11')/2;
dim = 2;
cvx_solver sedumi
cvx_begin sdp
    %#ok<*VUNUS>    % suppress MATLAB warnings for equality checks in CVX
    %#ok<*EQEFF>    % suppress MATLAB warnings for inequality checks in CVX     
    %cvx_precision best

    variable X000(dim,dim) symmetric
    variable X001(dim,dim) symmetric
    variable X010(dim,dim) symmetric
    variable X011(dim,dim) symmetric
    variable X100(dim,dim) symmetric
    variable X101(dim,dim) symmetric
    variable X110(dim,dim) symmetric
    variable X111(dim,dim) symmetric

    variable W0(dim,dim) symmetric
    variable W1(dim,dim) symmetric

    variable lambda

    minimize lambda

    X000 + X000 == R00/2;
    X001 + X001 == R01/2;
    X110 + X110 == R10/2;
    X111 + X111 == R11/2;

    X000 + X001 >= 0;
    X001 + X000 >= 0;

    X110 + X111 >= 0;
    X111 + X110 >= 0;

    X010 + X100 >= 0;
    X010 + X101 >= 0;
    X011 + X100 >= 0;
    X011 + X101 >= 0;

    X100 + X010 >= 0;
    X100 + X011 >= 0;
    X101 + X010 >= 0;
    X101 + X011 >= 0;

    W0 >= X000 + X010;
    W0 >= X001 + X011;
    W1 >= X100 + X110;
    W1 >= X101 + X111;

    W0 >= 0;
    W1 >= 0;

    lambda * eye(dim) >= W0 + W1 + W0 + W1;
 cvx_end

Problem in installation

Dear, Developer,

i am trying to install the Sedumi 1.3 in Matlab 2014a version and i have the Windows 10.

But when i try to run the install.m file it shows error like this
install_sedumi
Building SeDuMi binaries...
mex -O -DPC -largeArrayDims bwblkslv.c sdmauxFill.c sdmauxRdot.c "D:\MATLAB\extern\lib\win64\microsoft\libmwlapack.lib" -lmwblas
Error using mex
No supported compiler or SDK was found. For options, visit http://www.mathworks.com/support/compilers/R2014a/win64.

Error in install_sedumi (line 113)
eval( temp );

i also installed the Microsoft C visual 2015 but still showing the same error.

Please help me with this

Stop SeDuMi if b*y is NaN

Dear Sirs,
I am writing you to ask for some information about SeDuMi.
Sometimes (I think, in case of numerical problems) by, gap, delta, rate, feas and prec become NaN during the optimization. In these cases SeDuMi goes on working until the last iteration (the 150th iteration by default). But this can cause a a waste of computational time: for example if by is NaN at the 10th iteration the optimization is already failed and other 140 iterations are useless.
Therefore, my question is the following: there is a way to stop SeDuMi automatically if b*y assumes NaN value? (I am not so friendly with the SeDuMi code to modify it by myself).
Thank you in advance.
Yours faithfully,
Nicola Grillanda

SeDuMi installed unsuccessfully on MATLAB 2017a

This is part of what i get after running the install_sedumi.m

SeDuMi installation script
Directory: /Applications/MATLAB_R2017a.app/toolbox/sedumi-master
Matlab 9.2.0.556344 (R2017a) on MACI64

Attempting to recompile the SeDuMi binaries:
Template: mex -O -largeArrayDims -lmwblas
bwblkslv.mexmaci64: bwblkslv.c sdmauxFill.c sdmauxRdot.c
Building with 'Xcode with Clang'.
/Applications/MATLAB_R2017a.app/toolbox/sedumi-master/sdmauxRdot.c:47:12: warning: implicit declaration of function 'ddot__' is invalid in C99 [-Wimplicit-function-declaration]
return FORT(ddot)(&nn,(double*)x,&one,(double*)y,&one);
^
/Applications/MATLAB_R2017a.app/toolbox/sedumi-master/blksdp.h:45:17: note: expanded from macro 'FORT'
#define FORT(x) FORTRAN_WRAPPER(x)
^
/Applications/MATLAB_R2017a.app/extern/include/blas.h:24:28: note: expanded from macro 'FORTRAN_WRAPPER'
#define FORTRAN_WRAPPER(x) x ## _
^
:464:1: note: expanded from here
ddot__
^
1 warning generated.

Inappropriate use of full() in getada.m

The file getada.m in the sedumi-master branch has line 21
if spars(DAt.q > 0.2)
but should be
if spar(DAt.q) > 0.2.
With large-ish but sparse matrices, this obviously will cause SeDuMi to run out of memory on most systems.

Nathan

Incorrect solution for LP with duplicate row

Similar context than #42 but this time with the 11th test problem of MOI.

The issue is that SeDuMi stops early claiming that the problem is infeasible while it is feasible.
If we remove the duplicated row, it works correctly:

julia> A = [-1.0 1.0; -1.0 1.0]
2×2 Array{Float64,2}:
 -1.0  1.0
 -1.0  1.0

julia> b = [-1.0, -1.0]
2-element Array{Float64,1}:
 -1.0
 -1.0

julia> c = [-1.0, 2.0]
2-element Array{Float64,1}:
 -1.0
  2.0

julia> sedumi(A, b, c)
>> The problem is primal infeasible, there is no x such that Ax=b.
size(x) = (0, 0)
(Float64[], [-0.5, -0.5], Dict{String,Any}("pinf"=>1.0))

julia> sedumi(A[1:1,:], b[1:1], c)
>> SeDuMi 1.32 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
eqs m = 1, order n = 3, dim = 3, blocks = 1
nnz(A) = 2 + 0, nnz(ADA) = 1, nnz(L) = 1
 it :     b*y       gap    delta  rate   t/tP*  t/tD*   feas cg cg  prec
  0 :            7.56E+00 0.000
  1 :  -9.45E-01 1.70E+00 0.000 0.2248 0.9000 0.9000   1.26  1  1  1.5E+00
  2 :  -1.03E+00 1.68E-01 0.000 0.0988 0.9900 0.9900   1.64  1  1  7.9E-02
  3 :  -1.00E+00 1.07E-05 0.000 0.0001 1.0000 1.0000   0.99  1  1  
iter seconds digits       c*x               b*y
  3      0.1   Inf -1.0000000000e+00 -1.0000000000e+00
|Ax-b| =   0.0e+00, [Ay-c]_+ =   0.0E+00, |x|=  1.0e+00, |y|=  1.0e+00

Detailed timing (sec)
   Pre          IPM          Post
1.567E-02    6.908E-02    2.032E-03    
Max-norms: ||b||=1, ||c|| = 2,
Cholesky |add|=0, |skip| = 0, ||L.L|| = 1.
([1.0, 0.0], [1.0], Dict{String,Any}("timing"=>[0.0156708 0.0690803 0.00203177],"dinf"=>0.0,"pinf"=>0.0,"cpusec"=>0.09,"wallsec"=>0.0867829,"feasratio"=>1.0,"r0"=>0.0,"iter"=>3.0,"numerr"=>0.0))

Undefined function or variable 'y_s'

I have used sedumi to solve some problems and it worked well. But recently, when increasing the the number of variables in the problem, I get the following error:
SeDuMi had unexplained problems, maybe due to linear dependence?
YALMIP tweaks the problem (adds 1e6 magnitude bounds on all variables) and restarts...

Nope, unexplained crash in SeDuMi! (could be memory issues or wrong binary)
Make sure you have a recent and compiled version

For better diagnostics, use sdpsettings('debug',1)

Undefined function or variable 'y_s'
error callsedumi (line 75)
Primal = y_s;

error solvesdp (line 368)
eval(['output = ' solver.call '(interfacedata);']);

error optimize (line 31)
[varargout{1:nargout}] = solvesdp(varargin{:});

error OptValue7 (line 172)
optimize(set,f,ops);

Actually, I have scanned the issues in google group and github and updated the yalmip and sedumi the the latest version. The new combination also works with the old questions but failed when applied to the larger problem. How can I solve this problem? Thanks for your help in advance.

Is SeDuMi 1.32 the latest version?

Dear Sirs,
I installed today SeDuMi version 1.32 but I wonder if this is the latest version or not.
I read about a SeDuMi 1.34, but I have not found it anywhere. May I kindly ask you if 1.32 is the most recent version?
Thank you in advance.
Best regards,
Nicola

how to use sedumi?

hi,

I read the paper of "Parameterized modeling of multiport passive circuit blocks", and I am trying to model a six port transformer. Since I am new in the modeling field, and don't quite understand the full details of sedumi.
Can you explain how to setup the inputs by using sedumi, if I want to solve sum((|real(H(i))-real(H(jwi)|)^2)+sum((|img(H(i))-img(H(jwi)|)^2) with four constraints as you described in SECTION IV of this paper?

Thank you very much for your time.

pretransfo branch

I just checked in a new branch, "pretransfo", which as its name implies is a rather significant rewrite of the pretransfo.m file. There are are a number of reasons I decided to do this.

  • It was clear there was potential to eliminate a lot of MEX files without sacrificing performance. In this branch, pretransfo.m now relies on no mex files at all.
  • There seemed to be a number of opportunities for considerable simplification, partly based on the techniques I use to transform CVX models to SeDuMi.
  • I think it will be good to provide a path that allows modeling frameworks like YALMIP and CVX to bypass pretransfo.m altogether. To do this, I wanted to have a crystal clear understanding of how SeDuMi transforms models and their final output.
  • Eventually I would like to rewrite several of the numerical routines as well to better use BLAS/LAPACK instead of Jos' custom linear algebra. Obviously this also requires a deep understanding of the internal structure.

Feel free to play with this branch and try to break it. I will not merge it into the main branch until we agree it works well.

Invalid Mex

I've tried both the precomplied binaries (just downloading and using it out of the box) and also running install_sedumi (which reports a successful install) but in both cases I get

Invalid MEX-file 'C:\Program Files...\sedumi\qrK.mexw32': The specified module could not be found.

Error in ==> sdinit at 86
vfrm.s = qrK(d.u,K);

Are there special dependencies that aren't bundled with the solver that current versions of windows wouldn't have? I've used dependency walker and installed additional runtime libraries only to find that I already had them.

open if statement in prelp.m

This appears to be a bug:

if ~exist('loadata','file') || ~exist('preprocess','file')
if ~exist('loadata','file') | ~exist('preprocess','file')
    error('To use PRELP, you need to have LIPSOL installed.')
end

removing the second if fixes compilation errors in mcc

MEX files not compatible with R2017a

I'm finding that CVX's mex files, which include SeDuMI and SDPT3, are incompatible with MATLAB R2017a. This is quite unfortunate ;-( it is not clear to me if we can recompile them in a manner which is compatible with pre-R2017a versions as well, and if not, we'd have to make sure we can host both binaries somehow.

Sedumi installed successfully but not being called properly MATLAB R2017a

Greetings,

I have currently installed successfully the latest version of Sedumi (commit 702f40b) installed on MATLAB r2017a on the following MacBook system

Model Name: MacBook Pro
Model Identifier: MacBookPro13,3
Processor Name: Intel Core i7
Processor Speed: 2.9 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 8 MB
Memory: 16 GB

with MacOS High Sierra 10.13.3 (17D102).

I am using Sedumi with YALMIP and Gloptipoly 3.

Using both yalmiptest('sedumi') and the gloptipoly3demo I get a similar issue that starts whenever sedumi gets called:

For YALMIP ----

Testing function testsdpvar

Testing function feasiblelp

SeDuMi had unexplained problems, maybe due to linear dependence?
YALMIP tweaks the problem (adds 1e6 magnitude bounds on all variables) and restarts...

"SeDuMi had unexplained problems, maybe due to linear dependence?
YALMIP tweaks the problem (adds 1e6 magnitude bounds on all variables) and restarts..."

For Gloptipoly ----

See attached file. Output is too large for including here.

MOSEK runs fine with my current build and has been tested using both YALMIP and Gloptipoly.

As for the output running install_sedumi ----


SeDuMi installation script
Directory: /Users/wagnerdr/Documents/MATLAB/sedumi
Matlab 9.2.0.538062 (R2017a) on MACI64

Looking for existing binaries...found!
If for some reason you need to rebuild the binaries, use this command:
install_sedumi -rebuild

Adding SeDuMi to the Matlab path:
Base directory...already there.
Conversion directory...already there.
Examples directory...already there.

SeDuMi has been succesfully installed.
For more information, type "help sedumi" or see the user guide.

I'm kind of at a loss on this one. Could someone please help me?

  • Dan

Missing symbol '__Block_release' required by.txt

error in Sedumi run in matlab 2014

hello
I run sedumi 3.1 in MATLAB 2014
bur dosen't work

Untitled


SeDuMi installation script
Directory: C:\Users\Hagipoor\Desktop

Matlab 8.3.0.532 (R2014a) on PCWIN64

Looking for existing binaries...none found; building...
Attempting to recompile the SeDuMi binaries:
Template: mex -O -largeArrayDims -L"E:\Program Files\MATLAB\R2014a\extern\lib\win64\microsoft" -lmwblas
bwblkslv.mexw64: bwblkslv.c sdmauxFill.c sdmauxRdot.c
choltmpsiz.mexw64: choltmpsiz.c
cholsplit.mexw64: cholsplit.c
dpr1fact.mexw64: dpr1fact.c auxfwdpr1.c sdmauxCone.c sdmauxCmp.c sdmauxFill.c sdmauxScalarmul.c sdmauxRdot.c blkaux.c
symfctmex.mexw64: symfctmex.c symfct.c
ordmmdmex.mexw64: ordmmdmex.c ordmmd.c
quadadd.mexw64: quadadd.c
sqrtinv.mexw64: sqrtinv.c sdmauxCone.c
givensrot.mexw64: givensrot.c auxgivens.c sdmauxCone.c
urotorder.mexw64: urotorder.c auxgivens.c sdmauxCone.c sdmauxTriu.c sdmauxRdot.c
psdframeit.mexw64: psdframeit.c reflect.c sdmauxCone.c sdmauxRdot.c sdmauxTriu.c sdmauxScalarmul.c
psdinvjmul.mexw64: psdinvjmul.c reflect.c sdmauxCone.c sdmauxRdot.c sdmauxTriu.c sdmauxScalarmul.c blkaux.c
bwdpr1.mexw64: bwdpr1.c sdmauxCone.c sdmauxRdot.c
fwdpr1.mexw64: fwdpr1.c auxfwdpr1.c sdmauxCone.c sdmauxScalarmul.c
fwblkslv.mexw64: fwblkslv.c sdmauxScalarmul.c
qblkmul.mexw64: qblkmul.c sdmauxScalarmul.c
blkchol.mexw64: blkchol.c blkchol2.c sdmauxFill.c sdmauxScalarmul.c
vecsym.mexw64: vecsym.c sdmauxCone.c
qrK.mexw64: qrK.c sdmauxCone.c sdmauxRdot.c sdmauxScalarmul.c
finsymbden.mexw64: finsymbden.c sdmauxCmp.c
symbfwblk.mexw64: symbfwblk.c
whichcpx.mexw64: whichcpx.c sdmauxCone.c
ddot.mexw64: ddot.c sdmauxCone.c sdmauxRdot.c sdmauxScalarmul.c
makereal.mexw64: makereal.c sdmauxCone.c sdmauxCmp.c
partitA.mexw64: partitA.c sdmauxCmp.c
getada1.mexw64: getada1.c sdmauxFill.c
getada2.mexw64: getada2.c sdmauxCone.c sdmauxRdot.c sdmauxFill.c
getada3.mexw64: getada3.c spscale.c sdmauxCone.c sdmauxRdot.c sdmauxScalarmul.c sdmauxCmp.c
adendotd.mexw64: adendotd.c sdmauxCone.c
adenscale.mexw64: adenscale.c
extractA.mexw64: extractA.c
vectril.mexw64: vectril.c sdmauxCone.c sdmauxCmp.c
qreshape.mexw64: qreshape.c sdmauxCone.c sdmauxCmp.c
sortnnz.mexw64: sortnnz.c sdmauxCmp.c
iswnbr.mexw64: iswnbr.c
incorder.mexw64: incorder.c
findblks.mexw64: findblks.c sdmauxCone.c sdmauxCmp.c
invcholfac.mexw64: invcholfac.c triuaux.c sdmauxCone.c sdmauxRdot.c sdmauxTriu.c sdmauxScalarmul.c blkaux.c

At least one compilation failure occurred.

SeDuMi was not successfully installed.

Please attempt to correct the errors and try again.

SeDuMi can crash if pars.errors = 1

The current master branch can crash if pars.errors = 1. Specifically, the following script:

clear all;
A = ones(1,2);  b = ones(1,1); c = ones(1,2); K.f = 1; K.s = [1]; 
pars.errors = 1;
sedumi(A,b,c,K,pars);

generates the error:

Error in eigK (line 116)
    XX = x(xi+1:xi+qi);

Error in sedumi (line 797)
        info.err(2)=max(0,-min(eigK(full(x(origcoeff.K.f+1:end)),origcoeff.K)/(1+normb)));

The issue seems sensitive to the presence of free variables, i.e. the following script, where the free variable in the above script is changed to a non-negative variable, does NOT crash:

clear all
A = ones(1,2);  b = ones(1,1); c = ones(1,2); K.l = 1; K.s = [1]; 
pars.errors = 1;
sedumi(A,b,c,K,pars);

Bug installing Sedumi on matlab

I tried installing Sedumi in Matlab 2009b.

I get the error : Building SeDuMi binaries...
mex -O -DPC bwblkslv.c sdmauxFill.c sdmauxRdot.c "C:\Program Files (x86)\MATLAB\R2009b\extern\lib\win32\microsoft\libmwblas.lib"
Writing library for bwblkslv.mexw32
c:\users\agrawal\appdata\local\temp\mex_of~1\sdmauxrdot.obj .text: undefined reference to '_ddot'

C:\PROGRA~2\MATLAB\R2009B\BIN\MEX.PL: Error: Link of 'bwblkslv.mexw32' failed.

??? Error using ==> mex at 221
Unable to complete successfully.

Error in ==> install_sedumi at 114
eval( temp );

I saw another person with the same problem. did anyone encounter similar problems and has a solution?

Any help would be greatly appreciated.

fault occurs

Hi,
I am running sedumi with a simple example. but it failed as below, do you have any suggestion to solve this issue? Thanks

c=[1;-1;0;0];
A=[10,-7,-1,0;1,0.5,0,1];
b=[5;3];
sedumi(A,b,c)
SeDuMi 1.3 by AdvOL, 2005-2008 and Jos F. Sturm, 1998-2003.
Alg = 2: xz-corrector, Adaptive Step-Differentiation, theta = 0.250, beta = 0.500
eqs m = 2, order n = 5, dim = 5, blocks = 1
nnz(A) = 6 + 0, nnz(ADA) = 4, nnz(L) = 3
it : b_y gap delta rate t/tP_ t/tD* feas cg cg prec
0 : 6.02E+000 0.000


         Assertion detected at Fri Aug 22 19:44:49 2014

Assertion failed: mxGetM(X_IN) == lenud && mxGetN(X_IN) == 1, at line 123 of file "givensrot.c".
x size mismatch

Configuration:
MATLAB Version: 7.10.0.499 (R2010a)
MATLAB License: 161051
Operating System: Microsoft Windows XP
Window System: Version 5.1 (Build 2600: Service Pack 3)
Processor ID: x86 Family 6 Model 10 Stepping 9, GenuineIntel
Virtual Machine: Java 1.6.0_12-b04 with Sun Microsystems Inc. Java HotSpot(TM) Client VM mixed mode
Default Encoding: GBK

Fault Count: 1

Stack Trace:
[0] mcr.dll:_mnSignalHandler(0xffffffff, 0, 0, 0x7a139d60) + 362 bytes
[1] mcr.dll:void __cdecl ThrowAssertion(void)(0, 0x00c2dde4, 0x65737341, 0x6f697472) + 156 bytes
[2] mcr.dll:_MATLABAssertFcn(0x671850fc ": mxGetM(X_IN) == lenud && mxGet..", 0x6718504d "givensrot.c", 123, 0x671850e9 "x size mismatch") + 121 bytes
[3] libut.dll:_ut_assertstr(0x671850fc ": mxGetM(X_IN) == lenud && mxGet..", 0x6718504d "givensrot.c", 123, 0x671850e9 "x size mismatch") + 26 bytes

This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/ts/help_request_1.html

A technical support engineer might contact you with further information.

Thank you for your help. We recommend that you save your workspace and restart MATLAB as soon as possible.

Caught MathWorks::System::FatalException

Issues with fromsdpa.m handling of badly formed .dat-s files

I've uncovered a complicated situation involving the SDPA sparse format for semidefinite programming problems and SeDuMi. The issue arises when (most likely due to a problem formulation error), the same entry appears twice in a constraint matrix.

In this toy example the (1,2) entry in constraint 3 is first set to 1.0 and then set to 0.5 in the next line.

3
1
2
1000 900 5
0 1 1 2 3.0
1 1 1 1 1.0
2 1 2 2 1.0
3 1 1 2 1.0
3 1 1 2 0.5

test.txt

Different software packages handle this in different ways:

  1. SDPA replaces the 1.0 coefficient with 0.5. The solution has X(1,2)=X(2,1)=5.0.

  2. CSDP 6.1 adds the 1.0 and 0.5 to make the entry 1.5. The solution has X(1,2)=X(2,1)=1.6667.

  3. SeDuMi's fromsdpa.m function adds 1.0 to 0.5 to make the entry 1.5. The solution has X(1,2)=X(2,1)=1.6667.

  4. CSDP's MATLAB function readsdpa.m replaces the 1.0 coefficient with 0.5. The solution has X(1,2)=X(2,1)=5.0.

You can also fiddle with this by changing the indices from (1,2) to (2,1) in either or both of the entries- none of the results change. I expect that the behavior of duplicate entries in 0th constraint (the objective function matrix) would be similar.

There isn't any clear documentation of how this file should be interpreted and in most cases, the repeated entries are due to user error, so I think it would be best to issue a warning and proceed as SDPA does in this case. An alternative would be to treat it as an error and give up on reading the file.

The fromsdpa.m function uses the sparse function in MATLAB to put the entries into A. The help for sparse notes that "Any elements of s that have duplicate values of i and j are added together." It would
be necessary to identify duplicate entries before calling the sparse function. I don't have any suggestions for how to do that quickly.

results are not apparently deterministic?

I am hunting down a bug that we have traced back to sedumi not being deterministic. I have a MWE:

sed_A = sparse([1e-06 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.000374569348444187 0 -0.000143510377232224 0 -0.000107308290246781 0 -0.00023475302385101 0 -0.000222588804655496 0 -0.00039621568504792 0 -0.000175372571085547 0 0 0 0 0 0 0 0;0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0;0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0;0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0;0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0;-2 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;-2 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;-2 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;-2 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0;-2 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0;-2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0;-2 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0;-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0;0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00182361766281337 0 0.000300035708922513 0 5.25148072155411e-05 0 0.000172937546376846 0 0.000368772505991557 0 0.000258802261860665 0 9.13124417751099e-05 0 -1 0 0 0 0 0 0;0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00166011586827782 0 5.08618097827969e-05 0 0.000550274603301129 0 -1.24577387791141e-05 0 2.80912803114481e-05 0 0.000787997869564677 0 0 -1 0 0 0 0 0;0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00131496023553193 0 -2.85427725918689e-05 0 -6.40917512673142e-05 0 -6.48347565119609e-05 0 -9.88411732133345e-05 0 0 0 -1 0 0 0 0;0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00116855302122233 0 -1.40653733430151e-05 0 1.38084332511408e-05 0 0.00052463330628182 0 0 0 0 -1 0 0 0;0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00177126319840008 0 0.000136498835240328 0 -0.000139615027512656 0 0 0 0 0 -1 0 0;0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00218208935736517 0 -0.000117739846758266 0 0 0 0 0 0 -1 0;0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.00170708755797057 0 0 0 0 0 0 0 -1;-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0]);
sed_b = [-5e-08;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0];
sed_c = [0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;0;0;0;0;0;0;0];
sed_K = struct(sprintf('f'), {0}, sprintf('l'), {17}, sprintf('q'), {[2 2 2 2 2 2 2 8]}, sprintf('r'), {0});
pars = struct(sprintf('fid'), {0}, sprintf('maxiter'), {100});

% run sedumi 200 times, and hash the output:
for i=1:200
    [x,y,info]  = sedumi(sed_A,sed_b,sed_c,sed_K,pars);
    % get the md5 hash of x:
    myhash = java.security.MessageDigest.getInstance('MD5');
    myhash.update(typecast(x,'uint8'));
    hstr = lower(sprintf('%02X',typecast(myhash.digest,'uint8')));
    disp(hstr);
end

In any one Matlab instance, I tend to get the same results. In different Matlab instances, I can get different output. I have gotten all the following output hashes:

1347dafee66c8ff3680ff91ec51cc8bc
01b524f80080f1de14e910d6878ea380
1a8829b52cdf4e970f48ce4c2c0d5003
79f20e7f39ea5e1fba8c06f45d401960

and a few more. I have confirmed that the different hashes correspond to different output. Typically the variation is on the order of 1e-7, indicating some kind of single to double conversion might be at fault.

This is in Matlab r2007b on a linux machine. I have confirmed the results on a few diffferent linux machines all running r2007b. I have code which sets the random seed used by Matlab, and it does not appear to fix the issue. I have also tried setting maxNumCompThreads(1) to see if multithreading causes the problem. It does not appear to.

edit: I am using SeDuMi 1.21

Typo in eigK.m

At

sedumi/eigK.m

Line 77 in 6c49c13

li(li+1:li+nl) = x(xi+1:xi+nl);
, replace line 77:

li(li+1:li+nl) = x(xi+1:xi+nl);

with

lab(li+1:li+nl) = x(xi+1:xi+nl);

Sedumi does not handle mixes of real and complex PSD blocks.

At

K.s = K.s([vec(sperm); vec(cpx.s)]');
, pretransfo.m line 223 reorders the PSD blocks so that real blocks precede complex blocks. It does this by reordering K.s, but does not make the corresponding changes to At or c. To fix this issue, I believe it is sufficient to change the following code:

% ----------------------------------------
% Transform any complex data into internal format,
% which uses only MATLAB's real representation.
% ----------------------------------------
cpx = whichcpx(K);
cpx.s = K.scomplex;
cpx.dim = length(K.xcomplex) + sum(K.s(K.scomplex).^2);
At = makereal(sparse(At),K,cpx);
c = makereal(sparse(c),K,cpx);
K.f = K.f + length(cpx.f);          % Update cone K structure wrt complex
K.q = vec(K.q) + vec(cpx.q);
K.r = vec(K.r) + vec(cpx.r);
sperm = ones(length(K.s),1);
sperm(cpx.s) = 0;
sperm = find(sperm);
K.rsdpN = length(sperm);          % #real sym PSD blocks
K.s = K.s([vec(sperm); vec(cpx.s)]');
prep.cpx = cpx;
% ----------------------------------------

to the alternative:

% ----------------------------------------
% Find real-valued PSD blocks (the complement to K.scomplex).
% ----------------------------------------
sperm = ones(length(K.s),1);
sperm(K.scomplex) = 0;
sperm = find(sperm);
% ----------------------------------------
% Reorder K.s, c, and At to put real PSD blocks before Hermitian ones.
% ----------------------------------------
reorder_vec = zeros(sum(power(K.s, 2)), 1);
for ii = 1:length(sperm)
    reorder_start_index = sum(power(K.s(sperm(1:ii-1)), 2));
    orig_start_index = sum(power(K.s(1:sperm(ii)-1), 2));
    reorder_vec(reorder_start_index + (1:power(K.s(sperm(ii)), 2))) = orig_start_index + (1:power(K.s(sperm(ii)), 2));
end
for ii = 1:length(K.scomplex)
    reorder_start_index = sum(power(K.s(sperm), 2)) + sum(power(K.s(K.scomplex(1:ii-1)), 2));
    orig_start_index = sum(power(K.s(1:K.scomplex(ii)-1), 2));
    reorder_vec(reorder_start_index + (1:power(K.s(K.scomplex(ii)), 2))) = orig_start_index + (1:power(K.s(K.scomplex(ii)), 2));
end
reorder_vec = reorder_vec + K.f + K.l + length(K.q) + length(K.r);
At(K.f + K.l + length(K.q) + length(K.r) + 1:end, :) = At(reorder_vec, :);
c(K.f + K.l + length(K.q) + length(K.r) + 1:end) = c(reorder_vec);
K.s = K.s([vec(sperm); vec(K.scomplex)]');
K.scomplex = length(sperm)+1:length(K.s);
% ----------------------------------------
% Transform any complex data into internal format,
% which uses only MATLAB's real representation.
% ----------------------------------------
cpx = whichcpx(K);
cpx.s = K.scomplex;
cpx.dim = length(K.xcomplex) + sum(K.s(K.scomplex).^2);
At = makereal(sparse(At),K,cpx);
c = makereal(sparse(c),K,cpx);
K.f = K.f + length(cpx.f);          % Update cone K structure wrt complex
K.q = vec(K.q) + vec(cpx.q);
K.r = vec(K.r) + vec(cpx.r);
K.rsdpN = length(sperm);          % #real sym PSD blocks
prep.cpx = cpx;
% ----------------------------------------

Makefile for sedumi using Intel Compiler and gcc

Hello

I wrote a Makefile that allows the compilation of sedumi on mac using either icc (intel) or gcc. In order to do I had to fix some c sources. I wonder whether I could make the makefile (and sedumi) available on my github account. I test the new mexmaci64 on a mac running 2017b and it worked fine.

Many thanks.

Ed

Sedumi and Octave 4.2

When trying to use any example from examples directory I get following error:
sedumi(At,b,c,K)
error: whichcpx: Assertion failed: nlhs <= 1, at line 154 of file "whichcpx.c".
whichcpx generates 1 output argument.

I think that building did not pass correctly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.