Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- HEEVR and computing eigenvectors

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

lrobison_arl

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-17-2012
02:54 PM

83 Views

HEEVR and computing eigenvectors

Furthermore I've tried to specify the il and iu parmeters by il=1 and iu=3, but MKL prints an error that indicates an invalid argument to CHEEVR at the il position. I can't tell from documentation if it is necessary to specify il and iu in order to compute eigenvectors.

[fortran]program heevr_test use lapack95 implicit none complex :: A(3,3), Z(3,3) real :: W(3) integer :: M, isuppz(512), info integer :: il,iu M = 3 isuppz(:) = 0 info = 0 A(1,:) = (/ (02., 00.), (06.,-02.), (10.,-04.) /) A(2,:) = (/ (06., 02.), (10., 00.), (14.,-02.) /) A(3,:) = (/ (10., 04.), (14., 02.), (18., 00.) /)

call heevr(A,W,UPLO='U',Z=Z,M=M,ISUPPZ=isuppz,INFO=info,abstol=1.0E-25) print *,'info,M are ',info,M print *,'Eigen Values',W print *,'Eigen Vectors' print *,Z(:,1) print *,Z(:,2) print *,Z(:,3) end program heevr_test [/fortran]

This is IVF12 on Windows XP in VS2008.

Link Copied

6 Replies

Chao_Y_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-17-2012
10:41 PM

83 Views

Which version of Intel MKL are you using now?I could get the following result. Is this the same with your?

info,M are 0 3

Eigen Values -3.574176 -2.1457672E-06 33.57416

Eigen Vectors

(-0.8100331,0.2077581) (-0.1458781,0.1038791) (0.5182776,0.0000000E+00)

(-0.4082486,4.4703484E-08) (0.8164966,5.9604645E-08) (-0.4082481,0.0000000E+00)

(-0.3368758,0.1432858) (-0.5441777,7.1642905E-02) (-0.7514797,0.0000000E+00)

Thanks,

Chao

mecej4

Black Belt

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-18-2012
01:56 AM

83 Views

The determinant is zero.

lrobison_arl

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-18-2012
08:01 AM

83 Views

Thanks for pointing that out. I should have gathered as much from the 0 eigen value. If you change the matrix to have A(1,1) = 1 then the rank is 3 and this is no longer a problem.

Chao Y,

I have whatever MKL was provided with ComposerXE2011. It's not clear to me what version that is.

Yes, that is the result I get given that UPLO='U', but when UPLO='L' the values are completely different.

After updating the matrix so that A(1,1) = 1, the rank is now 3 and I reran my program. Using UPLO='U' gives the same answer as Matlab. Using UPLO='L' gives different answers from matlab but Z*W - A*V < 0.001 in both cases, so this must be a normalization difference.

I still haven't been able to specify any inputs using the il or iu arguments without throwing an MKL error. Any insight into why that might be?

Gennady_F_Intel

Moderator

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-18-2012
08:15 AM

83 Views

Chao_Y_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-18-2012
11:50 PM

83 Views

I can reproduct this problem here. We are further checkingthe problem, and will prvoide you an update.

Thanks,

Chao

Alexander_K_Intel3

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

01-20-2012
01:19 AM

83 Views

The difference in eigenvectors is ok.

As comes from eigenvalues definition Ax=lx, where x is eigenvector and l is eigenvalue, the x is defined up to scaling by a constant. Since x is normalized, for real cases we see allways the the same eigenvalues. However for complex case there is still a dimenson of freedom ofscaling bydifferentcomplex numbers which has modulesequal toone (rotation of the vector).

Thus you could have different correcteigenvectors for the same eigenvalue in complex case, but for every pair of such egenvectors x1 and x2 the following applies: x1=c*x2, where c is complex number with norm=1.

For upper and lower cases order of simple mathematicaloperation in the algorithm differs (only the half of matrix is readed, but it is always readedcolumnwise for performance reasons), this causes that algorithm comes to different corret eigenvalues just due approximations during computations.

I've just checked that the rule of x1=c*x2, norm(c)=1works for all of the eigenvectorsin your testcase.

And one could conclude from your observations that MATLAB does UPLO='U'... :)

Also I've tried putting IL=1 and IU=3 and didn't found any error reports. EQ this way:

call heevr(A,W,UPLO='U',Z=Z,M=M,ISUPPZ=isuppz,IL=1,IU=3,abstol=1.0E-25,INFO=info)

W.B.R.,

Alexander

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.