I'm running into some errors using the routine dstedc. After querying for the workspace sizes and executing dstedc my program crashes. The c++ code I'm running is basically the following (for several different values of n)
- Code: Select all
char type = 'V';
int n = 30;
double* work = new double[lwork]; // lwork = 3091
double* iwork = new int[liwork]; // liwork = 936
// eVals - double[n]
// subDiag - double[n-1]
// eVecs - double[n*n]
dstedc( &type, &n, eVals, subDiag, eVecs, &n, work, &lwork, iwork, &liwork, &info );
If I increase lwork and liwork the routine works properly. This happens with MKL (10.1) as well as the netlib version (3.1). ACML (4.2.0), which doesn't require inputting the workspace sizes, gives a similar error.
Thanks in advance for any help!