Skip to content

spectrum fails for constant matrices 2x2 and larger #291

Description

@vasdommes

If SDP contains e.g. 2x2 constant matrix, spectrum fails:

Warning: Failed to compute spectrum for block_4 block_path="/home/vasdommes/bootstrap/sdpb/test/data/end-to-end_tests/1d-isolated-zeros/input/json/constant_x=4%3_dim=2_rank=2.json":
Hermitian matrices must be square

The error is caused by this code:

auto block = c_minus_By_block;
El::Matrix<El::BigFloat> eigenvalues;
// Parameter tuning - copied from src/sdp_solve/SDP_Solver/run/step/step_length/min_eigenvalue.cxx
El::HermitianEigCtrl<El::BigFloat> hermitian_eig_ctrl;
hermitian_eig_ctrl.tridiagEigCtrl.dcCtrl.cutoff = block.Height() / 2 + 1;
hermitian_eig_ctrl.tridiagEigCtrl.dcCtrl.secularCtrl.maxIterations
= 16384;
El::HermitianEig(El::UpperOrLowerNS::LOWER, block, eigenvalues,
hermitian_eig_ctrl);

Here c_minus_By is a vector (elements indexed by {rsk}), which should be converted to a square matrix (elements indexed by {r,s}):

// m_j_{r, s}(x_k) = (c - B.y) _{j, r, s, k}

P.S. Note that these matrices can have rank>1, so fixing this issue without #285 will lead to computing wrong lambda.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions