- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I get wrong result while computing eigenvalues of a symmetric matrix in band storage using LAPACK routine "dsbev".
Here is code example. Consider matrix A=E. A is in band storage AB with one additional zero super-diagonal.
Here is code example. Consider matrix A=E. A is in band storage AB with one additional zero super-diagonal.
#include "include/mkl.h"
#define N 4
#define N 4
int main() {
double AB[2]={0,0,0,0,1,1,1,1};
int n=N;
int ldab=2;
int kd=1;
int lwork=3*N;
int ldz=1;
int info;
double work[3*N];
double w;
double z[1];
dsbev ("N", "U", &n, &kd, *AB, &ldab, w, z, &ldz, work, &info);
int n=N;
int ldab=2;
int kd=1;
int lwork=3*N;
int ldz=1;
int info;
double work[3*N];
double w
double z[1];
dsbev ("N", "U", &n, &kd, *AB, &ldab, w, z, &ldz, work, &info);
printf( "Eigenvalues: %g %g %g %g
", w[0], w[1], w[2], w[3]);
return 0;
}
}
The solution of MKL is:
-0.801938 0 0.554958 2.24698
But as we all know correct result is 1 1 1 1
What's wrong here?
-0.801938 0 0.554958 2.24698
But as we all know correct result is 1 1 1 1
What's wrong here?
Thank you.
Message Edited by galuha@gmail.com on 12-13-2004 06:50 PM
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for stupid question, just woke up with fresh head and fixed it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad we could help :-) --Bruce

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