CULA R11 errors cf. LAPACK
7 posts
• Page 1 of 1
CULA R11 errors cf. LAPACK
Hi there,
I'm using the cula_zheev and lapack zheev routines to diagonalize a hermitian matrix in my code. I have found some significant differences (enough to ruin the calculations) in the returned eigenvalues between CULA R11 (and R10) and LAPACK. I have verified that the matrix being fed to both routines is identical.
I have attached an excel spreadsheet displaying these differences. I will try replicate this error with smaller matrices.
Nick
I'm using the cula_zheev and lapack zheev routines to diagonalize a hermitian matrix in my code. I have found some significant differences (enough to ruin the calculations) in the returned eigenvalues between CULA R11 (and R10) and LAPACK. I have verified that the matrix being fed to both routines is identical.
I have attached an excel spreadsheet displaying these differences. I will try replicate this error with smaller matrices.
Nick
 Attachments

 Evalues.xlsx
 (86.66 KiB) Downloaded 329 times
 gusgw
 Posts: 21
 Joined: Wed Nov 17, 2010 9:50 pm
Re: CULA R11 errors cf. LAPACK
If you have matrix data in binary format, then we will have a look at it. One thing to expect is that eigenvalues will differ slightly between LAPACK implementations and due to different algorithms. (Even though eignvalues are unique to a matrix). A good test of the quality of computed eigenvalues is to check the closeness of A*VR = VR*W. You should not expect that two different implementations are within machine epsilon of one another. If the matrix was constructed specifically to have known eigenvalues, then you could check the results of CULA vs those.
 john
 Administrator
 Posts: 587
 Joined: Thu Jul 23, 2009 2:31 pm
Re: CULA R11 errors cf. LAPACK
Unfortunately, I only have the matrix in ASCII format. I can upload this if it is useful. This matrix was not designed to have known eigenvalues, unfortunately. I'm unfamiliar with the test of A*VR=VR*W, could you please describe it? Is this just the eigenvalue equation?
I have tried the diagonalization with cula_zheevx with abstol set to two times the machine underflow, but this produces identical results to the regular cula_zheev routine.
I have tried the diagonalization with cula_zheevx with abstol set to two times the machine underflow, but this produces identical results to the regular cula_zheev routine.
 gusgw
 Posts: 21
 Joined: Wed Nov 17, 2010 9:50 pm
Re: CULA R11 errors cf. LAPACK
ASCII format is fine as long as there is no loss in precision.
For the eigenvalue test, John was simply describing the eigenvalue definition:
A * (eigenvectors) = (diagonal of eigenvalues) * (eigenvectors)
For the eigenvalue test, John was simply describing the eigenvalue definition:
A * (eigenvectors) = (diagonal of eigenvalues) * (eigenvectors)
 kyle
 Administrator
 Posts: 301
 Joined: Fri Jun 12, 2009 7:47 pm
Re: CULA R11 errors cf. LAPACK
Sure, I will do the eigenvalue test later today and report for both LAPACK and CULA.
The input matrix is attached as matrix.txt inside matrix.rar, with values printed as real and imaginary parts in pairs, i.e. the file is 750*375, where each row contains 375 pairs;
Re[1,1] Im[1,1] Re[1,2] Im[1,2] ....
Re[2,1] Im[2,1] Re[2,2] Im[2,2] ....
....
Each value is printed to 18 places, which should be greater than machine precision.
Let me know if anything needs to be altered in terms of the format.
Cheers!
N
The input matrix is attached as matrix.txt inside matrix.rar, with values printed as real and imaginary parts in pairs, i.e. the file is 750*375, where each row contains 375 pairs;
Re[1,1] Im[1,1] Re[1,2] Im[1,2] ....
Re[2,1] Im[2,1] Re[2,2] Im[2,2] ....
....
Each value is printed to 18 places, which should be greater than machine precision.
Let me know if anything needs to be altered in terms of the format.
Cheers!
N
 Attachments

 matrix.rar
 (21.37 KiB) Downloaded 439 times
 gusgw
 Posts: 21
 Joined: Wed Nov 17, 2010 9:50 pm
Re: CULA R11 errors cf. LAPACK
I was able to import your matrix into our testing system and I'm not seeing any significant errors in accuracy when performing identity tests,
norm( MKL) = 2.57847e034
norm( CULA ) = 3.48469e034
where the norms are calculated by: norm( A*V  V*E ).
I've also ported the matrix to MATLAB format for some quick testing as well (attached).
norm( MKL) = 2.57847e034
norm( CULA ) = 3.48469e034
where the norms are calculated by: norm( A*V  V*E ).
I've also ported the matrix to MATLAB format for some quick testing as well (attached).
 Attachments

 matlab.rar
 (11.66 KiB) Downloaded 331 times
 kyle
 Administrator
 Posts: 301
 Joined: Fri Jun 12, 2009 7:47 pm
Re: CULA R11 errors cf. LAPACK
Thank you for testing the matrix, I'm yet to calculate the norms, but I will do so and report.
I have some good news however! I have just installed cuda 4 and cula R12 and the returned eigenvalues are indeed closer to lapack (average relative error for R12 compared with lapack is 5.37E4, and R10/R11 was 2.47E3). See the attached spreadsheet.
I will calculate norms and get back to you.
I have some good news however! I have just installed cuda 4 and cula R12 and the returned eigenvalues are indeed closer to lapack (average relative error for R12 compared with lapack is 5.37E4, and R10/R11 was 2.47E3). See the attached spreadsheet.
I will calculate norms and get back to you.
 Attachments

 Evalues.xlsx
 (147.08 KiB) Downloaded 320 times
 gusgw
 Posts: 21
 Joined: Wed Nov 17, 2010 9:50 pm
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest