- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well after a "rough landing" with dsyevr, I moved to zgeev, to get the eigenvalues and eigenvectors of a matrix, for this I use the following commands...
[cpp]
#include
//Input values for zgeev
char jobvl= 'V';
char jobvr= 'N';
int n = 500;
int n2 = 2*n;
int lda = n;
complex
int ldvl = n;
int ldvr = n;
int lwork = 2*n-1 ;
complex
double *rwork = new double[n2];
//Output values of zgeev
double *wr = new double
double *wi = new double
complex
complex
complex
zgeev(&jobvl, &jobvr, &n, H, &lda, w, vl, &ldvl, vr, &ldvr, work, &lwork, rwork, &info);
[/cpp]
But it was strange beacuse send me this error, when compiling with the instruction "icc file.cpp -lmkl_em64t -openmp "
error: argument of type "std::complex
*" is incompatible with parameter of type "MKL_Complex16 *"
zgeev(&jobvl, &jobvr, &n, H, &lda, w, vl, &ldvl, vr, &ldvr, work, &lwork, rwork, &info);
For H, work, vl,vr, in summary all the arrays of the system, wich I was expecting to work smoothly... I don't know what's happening, "googled" the error but didn't find anything useful... so i wish to ask how to declare the matrix of the system...
thanks in advances...
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to my understanding, C99 _Complex is supported by MKL, but not C++ std::complex. I couldn't see how you were using the MKL headers or how you invoked icpc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to my understanding, C99 _Complex is supported by MKL, but not C++ std::complex. I couldn't see how you were using the MKL headers or how you invoked icpc.
Sure, I didn't post that part of the program but is included... in the include section: #include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some parameters of zgeev should be MKL_Complex* type. See below citations from the header files.
void zgeev( char *jobvl, char *jobvr, MKL_INT *n, MKL_Complex16 *a, MKL_INT *lda, MKL_Complex16 *w, MKL_Complex16 *vl, MKL_INT *ldvl, MKL_Complex16 *vr, MKL_INT *ldvr, MKL_Complex16 *work, MKL_INT *lwork, double *rwork, MKL_INT *info );
/* Complex type (double precision). */
#ifndef MKL_Complex16
typedef
struct _MKL_Complex16 {
double real;
double imag;
} MKL_Complex16;
#endif

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