eigenvalues with pzlahqr

Open discussion regarding features, bugs, issues, vendors, etc.

eigenvalues with pzlahqr

Postby Iana » Tue Mar 06, 2007 4:50 pm

Hi,

I need to calculate all the eigenvalues of a large (double) complex matrix. I have a program to do this using LAPACK with a call to zgehrd, followed by a call to zlahqr. The problem is, when I try to emulate the program in SacLAPACK using pzgehrd and pzlahqr, the eigenvalues returned do not match.

I've tried by-passing pzgehrd (by reading in the output of zgehrd instead) and so I know that the problem is isolated to pzlahqr. I've looked at the "current notes / restrictions" section of pzlahqr and tried to satisfy all those conditions, but still no joy.

Does anyone know of any other unrecorded problems with pzlahqr, or something I might be doing wrong?

Thanks,

Ian
Iana
 
Posts: 8
Joined: Tue Mar 06, 2007 2:48 pm

Re: eigenvalues with pzlahqr

Postby ake » Wed Mar 14, 2007 9:09 am

Iana wrote:Hi,

I need to calculate all the eigenvalues of a large (double) complex matrix. I have a program to do this using LAPACK with a call to zgehrd, followed by a call to zlahqr. The problem is, when I try to emulate the program in SacLAPACK using pzgehrd and pzlahqr, the eigenvalues returned do not match.

I've tried by-passing pzgehrd (by reading in the output of zgehrd instead) and so I know that the problem is isolated to pzlahqr. I've looked at the "current notes / restrictions" section of pzlahqr and tried to satisfy all those conditions, but still no joy.

Does anyone know of any other unrecorded problems with pzlahqr, or something I might be doing wrong?

Ian


There are problems with all p*lahqr when complied with high optimization. Which compiler and flags did you use?
ake
 
Posts: 9
Joined: Wed Mar 14, 2007 8:49 am

Postby Iana » Wed Mar 14, 2007 1:47 pm

HI Ake, thanks for the reply

I compiled with the intel fortran compiler (ifort v9.1 20060706) and using the following compiler flags

F77 = mpif77
CC = mpicc
NOOPT = -fltconsistency -fp-port
F77FLAGS = -funroll-loops -O3 $(NOOPT)
DRVOPTS = $(F77FLAGS)
CCFLAGS = -O4
SRCFLAG =
F77LOADER = $(F77)
CCLOADER = $(CC)
F77LOADFLAGS =
CCLOADFLAGS =

I'll try again with a more conservative set of options and see what happens.

Thanks,
Ian.
Iana
 
Posts: 8
Joined: Tue Mar 06, 2007 2:48 pm

Postby Iana » Wed Mar 14, 2007 8:52 pm

Hi,

I've now tried with the following options as well (still using gcc and ifort v9.1)

F77 = mpif77
CC = mpicc
NOOPT = -fltconsistency -fp-port
F77FLAGS = $(NOOPT)
DRVOPTS = $(F77FLAGS)
CCFLAGS = -O2
SRCFLAG =
F77LOADER = $(F77)
CCLOADER = $(CC)
F77LOADFLAGS =
CCLOADFLAGS =

still with no joy. The spectrum is almost correct, but there are some worrying problems. The case I'm investigating has the property that if a is an eigenvalue then so are a*, -a and -a*. Among the eigenvalues returned by pzlahqr, if a is an eigenvalue then so is -a*, but not necessarily -a or a*.

any ideas?
Iana
 
Posts: 8
Joined: Tue Mar 06, 2007 2:48 pm

Postby ake » Thu Mar 15, 2007 2:54 am

Iana wrote:Hi,

I've now tried with the following options as well (still using gcc and ifort v9.1)

F77 = mpif77
CC = mpicc
NOOPT = -fltconsistency -fp-port
F77FLAGS = $(NOOPT)
DRVOPTS = $(F77FLAGS)
CCFLAGS = -O2
SRCFLAG =
F77LOADER = $(F77)
CCLOADER = $(CC)
F77LOADFLAGS =
CCLOADFLAGS =

still with no joy. The spectrum is almost correct, but there are some worrying problems. The case I'm investigating has the property that if a is an eigenvalue then so are a*, -a and -a*. Among the eigenvalues returned by pzlahqr, if a is an eigenvalue then so is -a*, but not necessarily -a or a*.

any ideas?


Not really, but if you could test running that case with a blocking >= N and see what happens. I know its weird but the scalapack test cases indicate that there is a problem here...
ake
 
Posts: 9
Joined: Wed Mar 14, 2007 8:49 am

Postby Iana » Fri Mar 16, 2007 4:26 pm

Hi, thanks for the suggestions,

OK, I've tried running with nb=n and nb>n, both return exactly the same results (but still not quite the correct spectrum), also these differ the results with nb < n (which again are still not quite correct).

does this help?

Thanks,
Ian.
Iana
 
Posts: 8
Joined: Tue Mar 06, 2007 2:48 pm

Postby ake » Sat Mar 17, 2007 5:12 am

Iana wrote:Hi, thanks for the suggestions,

OK, I've tried running with nb=n and nb>n, both return exactly the same results (but still not quite the correct spectrum), also these differ the results with nb < n (which again are still not quite correct).

does this help?

Thanks,
Ian.


Yes. I have a set of patches that at least should make sure you get the same result no matter what nb you use. There is probably still a problem with the actual result returned but i'm working on that at least partially.

I'm still testing these patches so i won't send them to anyone just yet.
ake
 
Posts: 9
Joined: Wed Mar 14, 2007 8:49 am

Postby Iana » Sat Mar 17, 2007 10:38 pm

Thanks for looking into this. If you want me to test anything, just let me know.

Thanks.
Ian.
Iana
 
Posts: 8
Joined: Tue Mar 06, 2007 2:48 pm

Postby ake » Mon Mar 19, 2007 11:52 am

Iana wrote:Thanks for looking into this. If you want me to test anything, just let me know.

Thanks.
Ian.


I now have something that might be worth testing.
The patch is big (contains lots of fixes not just to lahqr) so i would prefer to send it directly to you.
Whats your adress?
ake
 
Posts: 9
Joined: Wed Mar 14, 2007 8:49 am

Postby Iana » Mon Mar 19, 2007 12:08 pm

I've sent my email address to your account as a pm.

Thanks.
Ian.
Iana
 
Posts: 8
Joined: Tue Mar 06, 2007 2:48 pm

Postby Iana » Tue Mar 20, 2007 1:59 am

Hi ake,

Thanks so much! The patches worked perfectly.

All eigenvalues now agree with those calculated using the scalar routines. I've checked with nb=n and nb<n, and all cases agree. I hope you commit those changes as soon as possible.

Thank you for all your help,

Ian.
Iana
 
Posts: 8
Joined: Tue Mar 06, 2007 2:48 pm

Postby ake » Tue Mar 20, 2007 2:03 am

Iana wrote:Hi ake,

Thanks so much! The patches worked perfectly.

All eigenvalues now agree with those calculated using the scalar routines. I've checked with nb=n and nb<n, and all cases agree. I hope you commit those changes as soon as possible.

Thank you for all your help,

Ian.


VERY nice to hear :-)
I will submit them just as soon as i have fixed a few more uses of uninitialized vars in lahqr.
ake
 
Posts: 9
Joined: Wed Mar 14, 2007 8:49 am

Postby reg_1013 » Sat Apr 28, 2007 9:29 pm

I have the same problem. Thanks all the above! :D
reg_1013
 
Posts: 1
Joined: Sat Apr 28, 2007 9:22 pm

Re: eigenvalues with pzlahqr

Postby anto_n » Wed Jul 11, 2012 5:25 am

Hi! I know that this is an old discussion but I have the same problem. Is possible have these patches? Thanking you in advance.
anto_n
 
Posts: 5
Joined: Wed Jul 11, 2012 5:13 am

Re: eigenvalues with pzlahqr

Postby ake » Wed Jul 11, 2012 11:49 am

As far as i can remember the patches are in versions from 1.8.0 onwards.
The svn log says that it was added 2007-03-29 (r14)
ake
 
Posts: 9
Joined: Wed Mar 14, 2007 8:49 am

Next

Return to User Discussion

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests