0
Fixed

eigs() support for sigma = 'sa'

Joe fa 10 mesos updated by Pavel Holoborodko fa 7 mesos 3

I've noticed that when using advanpix data structures with eigs(), I get erroneous results when requesting the smallest eigenvalue. 


Please refer to the following code using Matlab's data structure:


A_matlab = speye(25,25); %initialize Matlab sparse identity matrix
A_matlab(13,13) = 1/3;
eigs(A_matlab,1,'sa') %request smallest eigenvalue

When running this code, I receive the following output:

ans =

   0.333333333333333


Now consider a similar experiment with Advanpix:

A_advanpix = mp(speye(25,25),32); %initialize Advanpix sparse identity matrix
A_advanpix(13,13) = mp('1/3');
eigs(A_advanpix,1,'sa') %request smallest eigenvalue

When running this code, I receive the following output:  


ans = 

    0

I have noticed if I replace '1/3' with '-1/3' in the above experiments, I obtain the correct results, namely both return "-1/3" in the appropriate precision. I appreciate any help with this issue, thank you for your assistance!

Under review

Thank you for the report, investigating...

At the moment, the "eigs" in toolbox is targeted primarily for solving unsymmetric matrices (where ill-conditioning is the most probable). Symmetric/Hermitian matrices require special handling (to keep the symmetry/Hermitian property, etc.) - but this is not implemented yet in toolbox.

 

This is in our TODO list for "eigs", but it needs some time to be implemented.

Fixed

We have fixed the issue in EIGS, see https://www.advanpix.com/documentation/version-history/ 

The issue was is that for some badly-structured matrices (like pure diagonals or similar very sparse) our two-step re-orthogonalization of Krylov subspace was not enough. Now we use 5-step process with random restarts as a fall-back. Because of this EIGS has became slower (will improve this in next version), but handling of such matrices is much better now.

 

You can re-download toolbox using the same links provided in after-purchase email. Version of the toolbox are the same, but it has new EIGS.