Schur complement matrix not positive definite' : How to resolve it?

linsysolve: Schur complement matrix not positive definite
switch to LU factor. splu 12 ^25
81|0.600|0.672|2.4e-08|4.3e-09|3.9e-05| 3.158678e-01 3.158327e-01| 0:1:37| splu 11 ^ 2
82|0.001|0.000|2.6e-07|5.9e-09|3.9e-05| 3.158677e-01 3.158327e-01| 0:1:39| splu 11 30
83|0.045|0.000|3.3e-07|7.7e-09|3.7e-05| 3.158663e-01 3.158327e-01| 0:1:40|
stop: progress is too slow
stop: progress is bad
stop: progress is bad*
stop: steps too short consecutively

number of iterations = 83
primal objective value = 3.15866323e-01
dual objective value = 3.15832718e-01
gap := trace(XZ) = 3.74e-05
relative gap = 2.29e-05
actual relative gap = 2.06e-05
rel. primal infeas (scaled problem) = 3.28e-07
rel. dual " " " = 7.73e-09
rel. primal infeas (unscaled problem) = 0.00e+00
rel. dual " " " = 0.00e+00
norm(X), norm(y), norm(Z) = 1.7e+03, 2.8e+02, 2.9e+02
norm(A), norm(b), norm© = 2.4e+03, 2.0e+00, 7.7e+01
Total CPU time (secs) = 100.41
CPU time per iteration = 1.21
termination code = -5
DIMACS: 3.3e-07 0.0e+00 3.0e-07 0.0e+00 2.1e-05 2.3e-05

Status: Error
Optimal value (cvx_optval): NaN

Requested 1x2149991424 (16.0GB) array exceeds maximum array size preference.
Creation of arrays greater than this limit may take a long time and cause
MATLAB to become unresponsive. See array size limit
or preference panel for more information.

Error in cvx_sdpt3>solve (line 405)
x(1,tvec{k}) = x(1,tvec{k}) + xx{k}(:)’ * xvec{k};

Error in cvxprob/solve (line 423)
[ x, status, tprec, iters, y ] = shim.solve( At, b, c, cones,
quiet, prec, solv.settings, eargs{:} );

Error in cvx_end (line 88)
solve( prob );

This can be caused by a bad problem formulation i.e. bad scaling or an illposed problem.

You can also try another optimizer that hopefully is numerically more robust or just have better luck.

As the author MOSEK I can recommend that.

Thanks sir for your suggestion. Yes, by using mosek solver the problem has been resolved. But i am using a for loop inside cvx which really takes a lot of time (Almost 90% of the computation time). Is there any other way to write it ?

cvx_solver mosek
variable X(4NN+1,1);
variables sig_dif(NN) sig_max(NN) K(NN);
subject to
for i=1:NN
i-3,1) X(4i-1,1) 0;X(4i-1,1) X(4i-2,1) 0;0 0 X(4i,1)]+sig_max(i)eye(3)== semidefinite(3);
i-3,1) X(4i-1,1) 0;X(4i-1,1) X(4i-2,1) 0;0 0 X(4i,1)]-(sig_max(i)-sig_dif(i))eye(3) == semidefinite(3);
{sig_dif(i),K(i),1} rotated_lorentz(1);