# Find a few eigenvalues of a HUGE sparse Hermitian matrix

I know that methods such as Arnoldi and FEAST can be employed to only find a few eigenvalues. But now I need to add another constraint as below.

The word "HUGE" in the title means that the matrix is so large that one has to only use its upper triangular elements (which means, approximately one need only store half of the data to alleviate computation resource burden, because of its Hermiticity, the whole information can be restored).

So, completely, the question should be: how to find a few eigenvalues of a sparse Hermitian matrix, only using its upper triangular elements?

• Some code to generate such an example (with scalable size) would be helpful. Is the matrix dense or sparse? Positive definite or not? Do you need the smallest or largest eigenvalues? Or some in between? – Henrik Schumacher Jun 15 '18 at 17:15
• Is huge larger than 40000x40000? – halirutan Jun 15 '18 at 22:32
• @HenrikSchumacher It is sparse, not positive definite. I need eigenvalues around zero. I have now no code to generate the mentioned matrix, but I can tell about its basic idea how it comes. The Bose-Hubbard Model, because two-body interaction is taken into consideration, one uses many-body wavefunction as basis, in the Hilbert space spanned by which, one establish the matrix for Hamiltonian. Because the number of basis increases very quickly along with the number of sites, the Hamiltonian matrix would be "HUGE", in the sense described above. – Αλέξανδρος Ζεγγ Jun 16 '18 at 8:01
• @halirutan Let me check it. – Αλέξανδρος Ζεγγ Jun 16 '18 at 8:18

To put my recent finding that I only mentioned in our chat-room to some use, let me give a preliminary answer without knowing the details. We found that the default parameters for Eigensystem are not optimal when matrices are really large.

For a pretty large matrix with a size of 40000x40000, I found that you can calculate a small number of eigenvalues and eigenvectors quite fast when you adjust the parameters for the "Arnoldi" method.

I'm using the example matrix that @b3m2a1 provided:

m = Import["https://www.wolframcloud.com/objects/b3m2a1/chem/data/H5_mat.mtx"];


Now, you can try

Eigensystem[m, 5]


to get the first 5 eigenvalues, but this ran for several hours without success. However, if you look up the documentation of Eigensystem you find further settings under Options -> Method -> Arnoldi.

I found that the size of the basis is the most important setting. Furthermore, if you have e.g. 16 cores, you might want to use them all for computation.

SetSystemOptions["ParallelOptions" -> {"MKLThreadNumber" -> 16}];
Eigensystem[m, 5,
Method -> {"Arnoldi", "BasisSize" -> 37}]; // AbsoluteTiming
(* {32.033, Null} *)


If you check the head of m, you'll find that it is not a full matrix, but a SparseArray which helps a lot in saving memory when your matrix is not completely dense. Using m a as normal matrix would increase the used memory by a factor of about 350 when my calculations are not completely off.