Page 1 of 1

ARPACK simple eigenvalue example?

PostPosted: Thu Mar 21, 2013 1:37 am
by Eigen_solver
Dear All,

Where can I find the Arpack eigenvalue examples, I've already tried the examples provided at the Arpack original example folder, but either they are complicated or not easy to read and computer freezes during the execution I'm looking for the more simplistic examples. I googled for a while but that didn't retrieved anything usards,eful so can you guide me or provide me any useful examples on that topic?

Regards,

Re: ARPACK simple eigenvalue example?

PostPosted: Thu Mar 21, 2013 10:26 am
by Julien Langou
On my end, it is a very long time I have used ARPACK. ARPACK is kind of outdated and is not any longer supported. There are some issues which we tried to fix lately. Mainly, ARPACK relies on LAPACK version 2 (which is from 1995). We never came to it. I mentioned earlier ARPACK because it is used by Matlab "eigs". Maybe, please consider the alternatives I listed, they are better supported and more up-to-date algorithms. (I have used BLOPEX and PRIMME in the past and they worked great for me.) Cheers, Julien.

Re: ARPACK simple eigenvalue example?

PostPosted: Fri Mar 22, 2013 12:34 am
by Eigen_solver
Thank you sincerely Julie,

If I'm looking for the highest or lowest eigenvalues then which type of package should I use. SPARSE ITERATIVE SOLVERS or Sparse Eigenvalue Solvers as the name implies it seems that I should use the Sparse eigen solvers, I deliberately go one by one in that list but so far I couldn't succeeded to compile any of them(I'm focusing on Primme).

BTW I used the Msys which I found troublesome for compiling, it forced me to look into another alternative as CygWin, if you've compiled your codes with cygwin can share your experience with me if its less troublesome ?

Regards,

Re: ARPACK simple eigenvalue example?

PostPosted: Mon Mar 25, 2013 11:59 am
by Julien Langou
Even if your matrix is dense, if you are looking for a few of the eigenvalues of this matrix (say the largest or the smallest), you should be better off with an iterative methods than with a "direct" methods.
Iterative methods are often referred to as "sparse iterative eigensolvers" but they work for sparse matrices and dense matrices. Cheers, Julien.

Re: ARPACK simple eigenvalue example?

PostPosted: Tue Mar 26, 2013 7:15 am
by Eigen_solver
Thank you very much sincerely Julie,

I'm about to complete the compilation, if there doesn't occur any further hassle, of Primme. I though that all of these codes can be used in any platform without any code changing simply by compiling the code with compiler suit terminal targeted for specific platforms. Now I learn that it's not such an easy path .

When I try to solve the eigenvalue problem I encounter, the following errors in output is printed. I can not find any real part in none of the eigenvalues.
My problem dimension is 96 and I'm sure that both of A and B matrices are positive definite and they don't have the zero value in their diagonal
Is there something misconfigured or misinterpreted in the given code?


Eigenvalue( 1) & is numerically infinite or undetermined
ALPHAR( 1) = 2.1902E+06 , ALPHAI( 1) = 0.0000E+00 , BETA( 1) = 1.1978E+01

Eigenvalue( 2) & is numerically infinite or undetermined
ALPHAR( 2) = 2.0576E+06 , ALPHAI( 2) = 0.0000E+00 , BETA( 2) = 1.2556E+01

Eigenvalue( 3) & is numerically infinite or undetermined
ALPHAR( 3) = 1.8441E+06 , ALPHAI( 3) = 0.0000E+00 , BETA( 3) = 1.4328E+01

Eigenvalue( 4) & is numerically infinite or undetermined
ALPHAR( 4) = 1.7180E+06 , ALPHAI( 4) = 0.0000E+00 , BETA( 4) = 1.4965E+01


Code: Select all
NB = 64; LWORK = test*(7+NB)
LDVR =test; N = test; Lda=test; LDb =test;
allocate(A(test,test), AlphaI(test), AlphaR(test), B(test,test), BETA(test), dummy(1,1), VR(LDVR,test), Work(LWork) )
A = assem; B = mass_m;
CALL DGGEV('No left vectors','Vectors (right)',N,A,LDA,B,LDB,ALPHAR,ALPHAI,BETA,DUMMY,1,VR,LDVR,WORK,LWORK,INFO)


Your help will be appreciated,

Re: ARPACK simple eigenvalue example?

PostPosted: Tue Mar 26, 2013 10:29 am
by Julien Langou
I'm about to complete the compilation, if there doesn't occur any further hassle, of Primme. I though that all of these codes can be used in any platform without any code changing simply by compiling the code with compiler suit terminal targeted for specific platforms. Now I learn that it's not such an easy path .


You are saying something very true here. The truth of the matter is that all these codes started as research development codes somehow.
They were meant for an individual or a group to be used as a tool to develop his/her/its own research agenda. Then they got transitioned
to be widely available. This is an issue. Maintenance over time for these projects is another issue. The authors of these projects mean well
and tried/try their best to give their research available in the best / easiest format.

Cheers,
Julien.

Re: ARPACK simple eigenvalue example?

PostPosted: Tue Mar 26, 2013 10:36 am
by Julien Langou
When I try to solve the eigenvalue problem I encounter, the following errors in output is printed. I can not find any real part in none of the eigenvalues.
My problem dimension is 96 and I'm sure that both of A and B matrices are positive definite and they don't have the zero value in their diagonal
Is there something misconfigured or misinterpreted in the given code?


1) You do find real eigenvalues. If:
Code: Select all
ALPHAR( 1) = 2.1902E+06 , ALPHAI( 1) = 0.0000E+00 , BETA( 1) = 1.1978E+01

Then the generalized eigenvalue is real (since ALPHAI is ZERO) and is 1.8285e+05 (ALPHAR / BETA).

2) If both A and B are positive definite (I understand that they are symmetric), then you want to use DSYGV, you do not want to use DGEGV. DGEGV will work sure,
but they could be issues. (Like orthogonality of your eigenvectors, realness of your eigenvalues, speed of computation, etc. ) DSYGV is especially designed for symmetric
positive definite generalized eigenproblems.

Julien.

Re: ARPACK simple eigenvalue example?

PostPosted: Tue Mar 26, 2013 11:10 am
by Eigen_solver
ALPHAR( 1) = 2.1902E+06 , ALPHAI( 1) = 0.0000E+00 , BETA( 1) = 1.1978E+01

If the above was correct why does it print "Eigenvalue( XX) & is numerically infinite or undetermined"? As you mentioned in one of previous mails AlphaR stands for real and AlphaI stands for Imaginary part. Additionally (AlphaR/Beta) corresponds to squared eigenvalue,so I need to take the square root, right?
What actually is that Beta ?


2.) Sure it would have been better if I use DSYGV as an optimum solution. But I just wanted to take all the general case into consideration.

My last question :
Can you share with me an example of eigenvalue solution intended for Blopex and Primme packages?

Thanks in advance,

Re: ARPACK simple eigenvalue example?

PostPosted: Tue Mar 26, 2013 11:15 am
by Julien Langou
If the above was correct why does it print "Eigenvalue( XX) & is numerically infinite or undetermined"?


Oh, I see. No idea.

As you mentioned in one of previous mails AlphaR stands for real and AlphaI stands for Imaginary part. Then what is that Beta for ?


BETA is just a scaling. It is convenient to express infinity for example. To express infinite eigenvalues, you set BETA to zero. It makes sense to have ALPHA on one side and BETA on the other.

I would advice that you take a simple pencil (A and B), you know the eigenvalues, and you check all this!

Can you share with me an example of eigenvalue solution intended for Blopex and Primme packages?


Nope. This would take me way too much time to dig, and it is unlikely I find anything. I worked with PRIMME and BLOPEX in 2005 or so.

Cheers,
J.