CVX + Gurobi in Ubuntu slows down with multiple executions

Dear all,

I am using CVX (version 2.0 beta) with Gurobi as a solver (version 5.10) under Ubuntu (12.04 - 64 bits).

When I run the same optimization problem multiple times I experience a slow down in the time CVX takes to solve the problem. Did anybody else experience this problem? If so, does anybody know a solution?

I attach here a simple test program that solves for 10 times a L1 norm regularization problem on identical data. The ten executions take on my pc:
1.35s - 2.20s - 3.06s - 3.75s - 4.57s - 4.52s - 5.59s - 6.50s - 6.43s - 7.29s

Here comes the code:

% Initialization
n = 6000;   % length of signal x and y
m = n-2;    % length of Dx
lambda = 30;

% data generation
rand('state',0); randn('state',0);      % make data reproducible
y = randn(n,1);     % input data 

% Operator matrices 
I2  = speye(n-2,n-2);
O2  = zeros(n-2,1);
D   = [I2 O2 O2]+[O2 -2*I2 O2]+[O2 O2 I2];

% select solver
cvx_solver gurobi;

% repeat for 10 times
for repeat=1:10
    cvx_begin
        cvx_precision low
        variable x(n)
        minimize( 0.5*sum_square(y-x)+lambda*norm(D*x,1) )
    cvx_end
end

thank you for your attention

Sepideh

That’s very interesting! I have two questions: first, does it occur with other solvers; and second, can you tell from Gurobi’s output if the slowdown is inside its code?

I tried the same code with SDPT3 and SeDuMi solvers and the problem doesn’t exist for them. The execution times that I wrote are based on the output of the Gurobi. But, when I use Gurobi directly (without using CVX) I don’t have this problem!

Thank you for the report. I use a particular mix of Gurobi control parameters that you probably do not when running Gurobi by itself. I’ve confirmed that my parameters cause some sort of memory leak or other issue with Gurobi. I’m filing a report with Gurobi.
Thanks again!