Eig is reliable in my experience. Are you sure it’s not eigs which is the culprit?
–> EDIT: However, googling shows me that this error message does occasionally occur with eig. <—
eig is called in line 67 or 69 of TFOCS version 1.3.1 of prox_trace.m if largescale is false. If largescale is true and K <= min(M,N)/2, eigs is called in line 100, which is:
[V,D] = eigs( X, K, SIGMA, opts );
eigs is very unreliable in my experience. You can increase opts.,maxit or opts.tol, but it still can not be relied on to converge at all points in the middle of an optimization. If you look at the code, you can see some finagling with opts.tol, but opts.maxit is left at its default value of 300.
You can increase opts.maxit, but my suggestion is to call eig instead of eigs. I.e., my recommendation is to call eig rather than eigs regardless of the value of largescale.
I occasionally use eigs interactively. I learned my lesson and stopped using it for evaluation of objective function, gradient, Hessian, constraints, Jacobiian, etc. within an optimization.
If indeed the error message refers to line 69, and it is this same version of prox_trace.m, that does sound damning of eig rather than eigs, but my advice to avoid eigs still stands. If eig is failing, perhaps you could capture one or more matrices on which it is failing and post them in a mat file? I’m willing to change my mind about the reliability of eig, and if it fails, perhaps that should be brought to the attention of the MATLAB developers, although there are apparently some examples of this happening, but I have never seen the matrices in question.
As far as I know, eig is deterministic, i.e., will produce exactly the same solution given the exact same input, and this is true even if parallel threads are employed. If the starting vector opts.vo is not provided, eigs is NOT deterministic, i.e…, the solution depends on random numbers which are drawn.