### dstedc and workspace array

Posted:

**Mon Mar 30, 2009 3:15 pm**Hi,

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)

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!

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 info;

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!