Where A, x, and b are all complex. Without changing any of the code, this problem gets solved in two different ways on two different machines. On machine 1, I get a message stating “For improved efficiency, sedumi is solving the dual problem.” but on machine 2 I receive no such message. Both machines give the same answer in the end, but machine 2 take about 5 times longer to get to that answer. My question is Why does CVX decide to solve the dual problem on one machine, yet does not on the other machine? Do I have any control over this?

Thanks for the interesting question! As you may know, all convex optimization problems have a dual problem, and this dual is also convex. In nearly all useful cases, solving the primal problem allows you to obtain the full solution to the dual problem, and vice versa. Sometimes the primal problem is a better fit for the underlying solver, and sometimes the dual is. CVX has to use a heuristic approach to determine which one would be the most efficient choice for a given solver. I call this “automatic dualization.”

Unfortunately, that heuristic is not perfect, as you are seeing. If you wouldn’t mind filing a bug report to http://support.cvxr.com with an example data set, I’ll see if there are obvious flaws in the heuristic that should be corrected in this case. Otherwise, it might be reasonable for me to consider whether or not I should expose the ability to force CVX to solve the dual problem (or prevent it from doing so), so that users can override the heuristic.

I should point out that at this time, CVX does not perform automatic dualization in Gurobi, because its solver interface doesn’t provide quite the level of primal/dual symmetry that I would like. I’m in regular contact with them, though, and as their solver evolves I will revisit this choice. In my view, CVX should not be doing automatic dualization at all—the solver should! Indeed, Gurobi and MOSEK do perform automatic dualization in some cases, but I would like to see them do more. SDPT3 and SeDuMi are unlikely to ever do so, so CVX will always need automatic dualization in its code.