-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARPACK fails with identity matrix #378
Comments
Isn't that an ill-case? Any random vector can be an eigen vector: as there is no unique solution, not surprising to me that arpack hits numerical problems |
It is actually not an ill case because any vector is an eigenvector and Arnoldi should converge on one step, as the residual is zero after the first iteration. Unfortunately I don't speak Fortran and cannot follow the algorithm, but a trivial Python implementation of implicitly restarted Arnoldi as described by the original paper actually captures this case. And Arpack itself worked with it fine in earlier versions (pulled from this repo some years ago, or in Matlab or in other software using it, such as Numpy). |
Did you try to initialize your Can you checkout before merge of #80 and #143: do you reproduce the problem initializing
Witch version / commit? |
You need to change both
works
Not sure what it "works" anyway: any random vector is eigen vector with lambda = 1. Not sure to understand what the expected result should be: there is no unique solution. |
Closing this as eigenvalues are OK. |
Apologies, but this seems to be a symptom of something more fundamental, even if I botched the test code above. The test I produced was a somewhat artificial way to reproduce something that I am observing in my own work with arpack, which is that if the initial estimate is close to an eigenvector, the library does not detect this and has problems to converge. In my work I am solving PDE's that are progressively solved in finer and finer grids. This means that I solve for a grid with 2^(N+1) points starting from the solution with 2^N which is a very good approximation. In some circumstances it is so god, that Arpack simply fails with an error. In other circumstances the algorithm does not break, but it takes a time to converge that grows exponentially with the problem size. When I mentioned I did not have the errors before, I referred to Arpack-2 as delivered by Debian (https://packages.debian.org/buster/libarpack2). Unfortunately, even for this version the exponential growth in convergence time is still there. In comparison, when using Primme to solve the same eigenvalue problem, the convergence time does not grow, but rather decreases with problem size, as interpolation provides a good enough starting point that becomes better with "N". |
Is your error tolerance small enough to allow for looking for better solution from 2^N to 2^(N+1) grid? Line 17 in db55a7f
|
Expected behavior
Given the identity matrix it should be able to return the right eigenvalues.
When substituting in
TESTS/icb_arpack_c.c
the matrix multiplication routine forthe test should run and return the right vectors.
Actual behavior
Program fails on first iteration without meaningful message. In code that I have and which uses arpack, an error related to "non convergence" is returned.
Where/how to reproduce the problem
Steps to reproduce the problem
TESTS/icb_arpack_c.c
as described aboveicb_arpack_c
fails.Error message
Notes, remarks
This is related to this issue #142
I did not have this problem with earlier versions of ARPACK so it seems a regression.
The text was updated successfully, but these errors were encountered: