Hi all, I’m running a Matlab to resolve an optimization problem with CVX, and at a certain point, it throws a
Out of memory. Type HELP MEMORY for your options. Error in cvx_reshape (line 41) x = sparse( ii, jj, x, s( 1 ), s( 2 ) ); Error in * (line 188) z2 = cvx_reshape( z2, [ nA, nz ], tt ); Error in laplacian_learning (line 86) Objective = trace(Sk'*Ck*Sk) + param.mu* norm(L_recovered,'fro')
This is the CVX code:
cvx_clear cvx_begin quiet variable L_recovered(param.N,param.N) semidefinite variable Ck(param.K,param.K) semidefinite Objective = trace(Sk'*Ck*Sk) + param.mu* norm(L_recovered,'fro') minimize Objective subject to L_recovered*Uk==Uk*Ck L_recovered*ones(param.N,1)==zeros(param.N,1) triu(L_recovered,1)<=0; % off diagonal <=0 diag(L_recovered)>=0; trace(L_recovered)==trace_constraint; cvx_end
The Objective is a CVX object and: Sk is a 64x400 matrix, Ck is a 64x64 matrix and L_recovered is a 76x76 matrix and is the variable I want to learn through the optimization problem together with Ck.
My PC has 8 GB of RAM DDR3, and an Intel i3 (I know…) … but the problem I think is the RAM. Which step should I follow to resolve this problem?
Thank you in advance
EDIT: I tried also with a 16GB RAM DDR3. Before the solver is called, MATLAB reachs 16GB of RAM and a bit later, it throws the OUT OF MEMORY error, due to the sparse and cvx_reshape functions of CVX.