Arpack.jl icon indicating copy to clipboard operation
Arpack.jl copied to clipboard

Turn off UMPACK's iterative refinement when called from Arpack

Open WouterJRV opened this issue 4 years ago • 9 comments

Perhaps someone can enlighten us on this ?

https://stackoverflow.com/questions/25065649/arpack-sparse-eigen-solver-many-times-slower-than-equivalent-matlab-eigs

It also aligns with my experience when using Arpack.eigs in Julia vs eigs in matlab

WouterJRV avatar Feb 23 '21 12:02 WouterJRV

Somebody said (perhaps in Slack or somewhere in the issues here), that MATLAB dropped its dependency on Arpack and has its own eigs.

dkarrasch avatar Feb 23 '21 13:02 dkarrasch

So there is no way to get the same performance to get Julia near the same performance of MATLAB?

This seems to be a bit surprising to me since MATLAB isn't really using a very secret magic algorithm; with the debugging mode one can just enter its code, so I'm trying to understand why Julia (or other languages) aren't able to be on par with its performance. There seems to be a slight difference in default parameters: MATLAB's tolerance seems two orders looser than the one of Arpack, and the starting vector is random instead of zeros. But even changing these parameters in Julia doesn't seem to lead to significant speedup.

WouterJRV avatar Feb 24 '21 02:02 WouterJRV

In my experience with solving generalized eigenvalue problems with positive definite matrices, Arpack.eigs usually is faster than in Matlab, in some cases 2x. In my case I had to set accordingly the explicittransform=:auto parameter which is not yet in the documentation AFAIT. I managed to see it by using the Julia help command

carlomontec avatar Mar 28 '21 09:03 carlomontec

In my experience with solving generalized eigenvalue problems with positive definite matrices, Arpack.eigs usually is faster than in Matlab, in some cases 2x. In my case I had to set accordingly the explicittransform=:auto parameter which is not yet in the documentation AFAIT. I managed to see it by using the Julia help command

Thanks for your answer. I can't retrieve the precise matrix anymore, but I remember that it was a complex, non-hermitian one (standard, non-generalized EV); and I was looking for the smallest EV's in real or imaginary part rather than the largest.

WouterJRV avatar Mar 30 '21 03:03 WouterJRV

I suppose that if matlab is no longer using Arpack, then performance issues may be best filed against other packages that people generally prefer to use nowadays (discussed in various issues in this repo).

ViralBShah avatar Oct 11 '21 20:10 ViralBShah

We should probably document the native Julia packages in the README.md here should people coming to Arpack.jl want to try out those packages.

KrylovKit.jl and ArnoldiMethod.jl have been suggested in https://github.com/JuliaLinearAlgebra/Arpack.jl/issues/87

ViralBShah avatar Oct 11 '21 20:10 ViralBShah

As reported in this Discourse post, the time for a standard eigenproblem using Arpack.eigs can be reduced to within 1.2x the time required by Matlab's eigs function by setting SuiteSparse.UMFPACK.umf_ctrl[8] = 0

simonp0420 avatar Feb 03 '23 03:02 simonp0420

Turning off UMFPACK's iterative refinement should probably be the default when using Arpack.

ViralBShah avatar Feb 04 '23 04:02 ViralBShah

@rayegun I believe we have turned off UMFPACK's iterative refinement by default for a while now. Can you confirm?

ViralBShah avatar Feb 12 '24 20:02 ViralBShah