Arpack is too slow?

Hi everyone.
I have a code for computing Surface Wave dispersion velocity (seismology) and it takes about 6 s to run. Of those, 4.5 s are spent on this for loop that calls Arpack to solve the generalised eigenvalue and eigenvector problem (I need both) many times.

for o=1:fnum
    x[:,:,o] = real.(xp);
    d[:,:,o] = real.(dp);

After some testing the fastest way is to use skip more inputs (tol, which, etc).

A and B are 972x972 sparse matrixes (symmetric but none diagonal ) that are build on each iteration. But the total time of building them is around 0.15 s, so it is not THAT bad.

I wonder if you guys know a faster way to run this line… or if there is a faster alternative in another package.

You want the largest eigenvalues? That is the default when which is not given…

Are you including the compilation time that happens when you run it the first time? (Are you running Julia as a “script”, re-launching Julia each time you do a new calculation?) Are you benchmarking in global scope? Did you read the performance tips?


Yes. LM is what I want

Well, you get the LM of the invert no? so SM in fact.

The full time of the code is re-running the main code in Julia Pro Repel (@time).

The time of the for loop is running that in the Repel.

I checked the perfomance tips… but I don’t thing of the @ helped.

You got me here… just got the largest ones… right?