### GEEV Question

Posted:

**Wed Nov 10, 2010 12:56 am**Hi, Kyle!

I'm using CULA 2.3 premium with CUDA 3.1.

There is something strange in using culaSgeev function.

It takes 7000ms to extract eigenvalue from 2048x2048 matrix.

But only 30ms is required by the eigenvalue code in CUDA SDK.

LAPACK Sgeev is even faster 5 times than culaSgeev with 128x128 matrix.

(CPU: Intel i5 2.67GHz, GPU: GTX480)

Here is my code. Please let me know how to resolve this problem.

Thank you in advance!

I'm using CULA 2.3 premium with CUDA 3.1.

There is something strange in using culaSgeev function.

It takes 7000ms to extract eigenvalue from 2048x2048 matrix.

But only 30ms is required by the eigenvalue code in CUDA SDK.

LAPACK Sgeev is even faster 5 times than culaSgeev with 128x128 matrix.

(CPU: Intel i5 2.67GHz, GPU: GTX480)

Here is my code. Please let me know how to resolve this problem.

Thank you in advance!

- Code: Select all
`culaStatus status = culaInitialize();`

int size = 2048;

float *dA, *dB, *dC, *dD, *dE;

float *hA = new float[size*size];

cublasAlloc(size*size, sizeof(float), (void**)&dA);

cublasAlloc(size, sizeof(float), (void**)&dB);

cublasAlloc(size, sizeof(float), (void**)&dC);

cublasAlloc(size*size, sizeof(float), (void**)&dD);

cublasAlloc(size, sizeof(float), (void**)&dE);

for (int i=0; i<size; i++)

for (int j=0; j<size; j++)

hA[i+j*size] = (float)i/(float)(j+1);

cublasSetMatrix(size, size, sizeof(float), hA, size, dA, size);

clock_t before = clock();

status = culaDeviceSgeev('N','V',size,dA,size,dB,dE,dC,1,dD,size);

float time = (float)(clock()-before);(float)CLOCKS_PER_SEC;

printf("%f", time);

culaShutdown();