Error when solving basic SDP problem


so far, I have been working with CVX (Version 2.2, Build 1148) on only Windows and I just switched to Linux (just mentioning this in case it’s relevant, although I don’t think this is the root of the problem). However, when I run the code that worked perfectly fine on my PC, I get an error-message where I have no clue what the problem is and how to fix it.

I managed to isolate the problem and create a minimal example that still causes the same error (while running perfectly fine on my Windows machine).

cvx_begin sdp
cvx_solver mosek
variable rho(4,4) hermitian semidefinite
minimize -lambda_min(rho)

I know this problem is kind of pointless, as it is unbounded, but at least I expect the solver to tell me that it is unbounded. However, when I run these lines on my new machine, Matlab (2022b) terminates once it comes to the line where I tell it to minimize -lambda_min(rho), throwing the following error-message:

One or more output arguments not assigned during call to “varargout”.

Error in minimize (line 14)

  • x = evalin( ‘caller’, sprintf( '%s ', varargin{:} ) );*

The same problem occurs when I run the problem with SDPT3.

When I look into the function “minimize”, I see that when my error occurs, non of the pre-defined “problems” takes place, so it tries to read out varargin{1}, which seems to be empty.

I have no clue what could be the reason for this error and hope some of you can help me!

Thank you in advance!

Your CVX program is fine, other than being an unbounded problem, as you noted. When I ran it under Windows, the solver (Mosek) reported dual infeasible, which corresponds to CVX’s reported status of Unbounded, exactly as should happen.

As for your Linux troubles, it would appear to be a messed up CVX installation and/or corrupted MATLAB session and/or bug or incompatibility in Linux version of CVX.

You can try a new MATLAB session, reinstalling CVX 2.2, and perhaps rebooting. If none of those work, you can file a bug report per Support — CVX Users' Guide , although I have no idea whether anything would be done with such a report.