- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This testprogram creates an access violation under VS C++ 6.0 with MKL 8.0.1
The values 350x320 is important while for some combinations of sizes it works correctly
For example: 350x220 is faulty, 350x219 is ok, 500x314 is faulty, 500x313 is ok.
What can be the problem?
char jobu = 'S';
char jobvt = 'S';
int m = 350;
int n = 320;
int minmn= m>n?n:m;
int maxmn= m>n?m:n;
double* a = new double[m*n];
double* u = new double[m*minmn];
double* s = new double[minmn];
double* vt= new double[minmn*n];
int lda = m;
int ldu = m;
int ldvt = minmn;
int info = 0;
for ( int i = 0 ; i < m*n ; i++ ) a=((double)rand())/((double)RAND_MAX);
int lwork = -1;
double* work = new double[1];
dgesvd(&jobu , &jobvt , &m , &n , a , &lda , s , u, &ldu , vt , &ldvt , work , &lwork , &info );
lwork = (int)work[0];
delete work;
work = new double[lwork];
dgesvd(&jobu , &jobvt , &m , &n , a , &lda , s , u, &ldu , vt , &ldvt , work , &lwork , &info );
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://softwareforums.intel.com/en-us/forums//topic/49120
Somebody has similar problems as I see.
if I switch jobu to 'N' it works fine (obviously it doesn't calculate U).
The only solution was to complete the matrix to square form with zeros and than extract the solution from the resulting two NxN and Nx1 matrices. This is bad and waste and hack but works till there is a fix for it.
Laszlo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Beau Paisley
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page