- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm using a small program to test out MKL's ZGEMM and ZGESVD routines. First, with ZGEMM I find that there is only 8 digits of accuracy in some entries in the resulting matrix when I compare it against the result from MATLAB. I have definitely made sure that the matrices that are being multiplied have the same representation in MATLAB as they do in my program (upto 14 digits). However, the result of the multiplication varies too much. I am not quite sure if I am making a mistake in choosing compiler options. Second, I cannot get the ZGESVD to work at all. I get a segmentation fault inside the SVD routine. Again I am not quite sure if it because I am missing some compiler option. I see these two problems in all four types of linking to MKL ( static linking to sequential MKL, dynamic linking to sequential MKL, static linking to threaded MKL and dynamic linking to threaded MKL).
I've attached my makefile, main file and the matrix that I am using.
makefile
main.f90
tmp.bin
I am testing the code on Intel 64 architecture with SUSE Linux Enterprise Server 9. The compiler I'm using is Intel Fortran (11.1.072) and the MKL version is 10.2.5.035.
The main program that I have attached loads the matrix (A) and computes the product A times A transpose (A*A'). And also performs (I should say doesn't perform) SVD on A.
Any help is greatly appreciated.
EDIT: Please disregard this post. I found out the problem. It was programming error in the case of ZGESVD. However, I'm still not sure why there is a discrepancy in ZGEMM.
I'm using a small program to test out MKL's ZGEMM and ZGESVD routines. First, with ZGEMM I find that there is only 8 digits of accuracy in some entries in the resulting matrix when I compare it against the result from MATLAB. I have definitely made sure that the matrices that are being multiplied have the same representation in MATLAB as they do in my program (upto 14 digits). However, the result of the multiplication varies too much. I am not quite sure if I am making a mistake in choosing compiler options. Second, I cannot get the ZGESVD to work at all. I get a segmentation fault inside the SVD routine. Again I am not quite sure if it because I am missing some compiler option. I see these two problems in all four types of linking to MKL ( static linking to sequential MKL, dynamic linking to sequential MKL, static linking to threaded MKL and dynamic linking to threaded MKL).
I've attached my makefile, main file and the matrix that I am using.
makefile
main.f90
tmp.bin
I am testing the code on Intel 64 architecture with SUSE Linux Enterprise Server 9. The compiler I'm using is Intel Fortran (11.1.072) and the MKL version is 10.2.5.035.
The main program that I have attached loads the matrix (A) and computes the product A times A transpose (A*A'). And also performs (I should say doesn't perform) SVD on A.
Any help is greatly appreciated.
EDIT: Please disregard this post. I found out the problem. It was programming error in the case of ZGESVD. However, I'm still not sure why there is a discrepancy in ZGEMM.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no discrepancy in the results from ZGEMM. It is incorrect to compare two numbers such as (2D-7, 3D-15) and (2D-7, 3.00001D-15) and conclude that there are only five digits of accuracy.
A better test, if we call these numbers z1 and z2, is to look at |z1-z2|/|z1|. I found only one matrix element (out of 1404 X 198) in your product matrix CZGEMM where this indicator was larger than 10^{-13}, with z1 the result from calling MKL ZGEMM and z2 was from computing sum_k [A_i,k X A_j,k] with a DO loop.
And, just to record the correction that you already discovered:
The call to ZGESVD is missing U after S in the argument list.
A better test, if we call these numbers z1 and z2, is to look at |z1-z2|/|z1|. I found only one matrix element (out of 1404 X 198) in your product matrix CZGEMM where this indicator was larger than 10^{-13}, with z1 the result from calling MKL ZGEMM and z2 was from computing sum_k [A_i,k X A_j,k] with a DO loop.
And, just to record the correction that you already discovered:
The call to ZGESVD is missing U after S in the argument list.

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