zgesvd difference from MATLAB

zgesvd difference from MATLAB

I using zgesvd on a 16x16 complex matrix.

#define N = 16
MKL_Complex16 vt[N*N];
char jobu = 'A';
char jobvt = 'A';
int m = N;
int n = N;
int ldR = N;
double s[N];
MKL_Complex16 u[N*N];
int ldu = N;
MKL_Complex16 vt[N*N];
int ldvt = N;
int lwork = 2048;
MKL_Complex16 *work;
work = new MKL_Complex16[2048];
MKL_Complex16 R[N*N];
double rwork[100];
int iwork[100];
int info;

zgesvd(&jobu, &jobvt, &m, &n, R, &ldR, s, u, &ldu, vt, &ldvt, work, &lwork, rwork, &info);

When I compare the result to Matlab the 2 columns of vt are the same as the Matlab output and 2 rows of u are the same as the Matlab output. Also, I only get the first 2 eigenvalues correct from Intel MKL.

Am I calling zgesvd correctly?

I am using C++ in Visual Studio 2005.


1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.