SDPT3-Maximum iterations or time limit exceeded

429 views
Skip to first unread message

XM XM

unread,
Oct 10, 2016, 10:25:40 PM10/10/16
to YALMIP, joh...@isy.liu.se
Hi Johan,

I am working with the following code:

r = sdpvar(len_r, 1); %
r_mean = ones(len, 1); % this is a user-defined value

e == sdpvar(M, 1);
Constraints = [-1 <= r <= r, others, e == R'\(- r_mean) ] % all constraints are linear 
Objective = e' * e;
options = sdpsettings('solver','sdpt3');
sol = solvesdp(Constraints,Objective, options);
if sol.problem == 0
 solution = sparse(double(r));
else
 display('Something went wrong!');
 yalmiperror(sol.problem);
end

I am now working on a problem of the size 45000 (in stead of 70000) and use sdpt3 as the solver. R here is sparse, as nnz(R)/numel(R) = 5.6667*e-4. I actually know the real r values and the purpose of this work is to show the solved optimal solution is very close to the real r values. I have checked the real r values satisfies all constraints and under this r, e'*e = 159, a satisfactory result.

However, when I am running the code, I encounter the error message of "Maximum iterations or time limit exceeded (SDPT3-4)". What do you think might be the problem? I saw in another post you said it might be because the problem is numerically ill-posed so that increase the sdpt3.maxit may not help. But I cannot see it is the case in my problem. Thanks!

Mark L. Stone

unread,
Oct 11, 2016, 12:25:31 AM10/11/16
to YALMIP, joh...@isy.liu.se
Try MOSEK if you have access to it.  I don't recall any problem for which SDPT3 or SeDuMi did better than MOSEK. But I have seen many problems which MOSEK solved, but SDPT 3 and//or SeDumI ran into numerical problems.

Mark L. Stone

unread,
Oct 11, 2016, 12:28:13 AM10/11/16
to YALMIP, joh...@isy.liu.se
Well, actually now that I see you just have a convex QP, you could use cplex (set numerical emphasis on) or GUROBI.  MOSEK as well. I'd pick any of those over SDPT3 or SeDuMi for your problem.

Mark L. Stone

unread,
Oct 11, 2016, 12:30:04 AM10/11/16
to YALMIP, joh...@isy.liu.se
I don't  know what solvers you have installed.  What solver does YALMIP pick if you don't specify solver?

Mark L. Stone

unread,
Oct 11, 2016, 1:02:30 AM10/11/16
to YALMIP, joh...@isy.liu.se
Did you try the obvious thing of increasing maximum number of iterations and time limit?  What was the SDPT3 output looking like?  Was there evidence of progress?  Did it just quit without (before) saying it ran into numerical troubles?

XM XM

unread,
Oct 11, 2016, 1:07:35 AM10/11/16
to YALMIP
Hi Mark, thanks for your comments! I only use SDPT3 as the solver because I did not install cplex or gurobi on my personal laptop. I will try Gurobi.

XM XM

unread,
Oct 11, 2016, 2:16:42 AM10/11/16
to YALMIP, joh...@isy.liu.se
Hi Mark, I tried Gurobi. It takes only 10 seconds to solve the problem. At least for my problem, I think Gurobi works better than SDPT3. Thanks again for your help.

Johan Löfberg

unread,
Oct 11, 2016, 2:20:08 AM10/11/16
to YALMIP, joh...@isy.liu.se
Gurobi is commercial software, whereas sdpt3/sedumi are research proof-of-concepts codes for mixed semidefinite-second order cone programs, so it is very much excepted that cplex/gurobi/mosek are orders of magnitudes faster for large-scale problems. You get what you pay for (unless you are in academia...)
Reply all
Reply to author
Forward
0 new messages