- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am using the function dsyevr in Visual Studio 2008 todo eigenvalue and eigenvectordecomposition for an input matrix. The function is used in a console application.
The code is as below:
#include "stdafx.h"
#include
#include
#include "mkl.h"
using namespace std;
#definen 5
int main()
{
double a[n*n] = {
0.67, 0.00, 0.00, 0.00, 0.00,
-0.20, 3.82, 0.00, 0.00, 0.00,
0.19, -0.13, 3.27, 0.00, 0.00,
-1.06, 1.06, 0.11, 5.86, 0.00,
0.46, -0.48, 1.10, -0.98, 3.54
};
char JOBZ = 'V';
char range = 'A';
char UPLO = 'L';
int info;
int lda = n;
int lwork;
double vl, vu;
int il = 1, iu = n;
double abstol = -1.0;
int ldz = n;
double wkopt;
int liwork;
int iwkopt;
int m;
vector
vector
vector
lwork = n*26;
liwork = n*10;
vector
vector
dsyevr(&JOBZ, &range, &UPLO, &n, &a[0], &lda, &vl, &vu, &il, &iu,
&abstol, &m, &w[0], &z[0], &ldz, &isuppz[0], &work[0], &lwork, &iwork[0], &liwork, &info);
return 0;
}
When I step in the codefor the Debug version I can see that the function dsyevr returns the correct eigenvalues and eigenvectors. However, when the main function is returning I get the below error message:
Windows has triggered a breakpoint in SVD_testing.exe.
This may be due to a corruption of the heap, which indicates a bug in SVD_testing.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while SVD_testing.exe has focus.
The output window may have more diagnostic information.
Does anybody know whyI get this error message?
Thank you.
Erasmo.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it seems to work now.
Thank you very much.
Erasmo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Array very long, it is likely it will not work . Lapack's routines assume that the input data stored in contiguous memory, but if I'm not mistaken this is not always the case if we are talking about the stl.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page