Page 1 of 1

Posted: Wed Sep 12, 2012 2:57 am
I am trying to see the performance of different eigendecomposition on cula. At first I used culaDeviceDsyev and everything works fine.Now I tried to use the iterative method using culaDeviceDsyevx but I'm getting wrong answer.
let's say matrix "k" has eigenvalues vector(w) and eigenvectors (v) .so the equation k=U*diag(W)*U^-1 should hold , but it doesn't.The eigenvalues are ok in compare with culaDeviceDsyev. also I use python (Pycula). My code:

k_gpu=cula.cula_gpuarray_like(k_)
uplo='L'
evrange='A'
abstol=(2.2204460492503131e-16)*2
(m,n) = k_gpu.shape
assert m==n
lda = len(k_gpu)
jobz = 'V'
w = np.zeros(n,k_gpu.dtype)
w_gpu = cula.cula_gpuarray_like(w)
il=0
iu=0
vl=0
vu=0
m=ctypes.c_int(n)
z = np.zeros((lda,max(1,m.value)),k_gpu.dtype)
z_gpu = cula.cula_gpuarray_like(z)
ldz = len(z)
ifail=ctypes.c_int()

why it's happening ?

Thanks

### Re: culaDeviceDsyevx returns wrong value!?!

Posted: Wed Sep 12, 2012 4:07 am
I think I made a mistake. in the iterative method we can not check the correctness of value by np.dot(np.dot(v,np.diag(w)),np.transpose(v)) != k.

right?how can I check it? is culaDeviceDsyevx using Lanczos algorithm?

### Re: culaDeviceDsyevx returns wrong value!?!

Posted: Wed Sep 12, 2012 5:32 am
At first I used culaDeviceDsyev and everything works fine.Now I tried to use the iterative method using culaDeviceDsyevx but I'm getting wrong answer.

xSYEV and xSYEVX use the same algorithm under the hood if you are searching for all eigenvalues (range = 'A') so then answers should be the same. You might have a mistake in your wrapper code or perhaps there is an error in the 3rd party Pycula.

In the iterative method we can not check the correctness of value by np.dot(np.dot(v,np.diag(w)),np.transpose(v)) != k. right? How can I check it?

You can check the Eigendecomposition, A =V*diag(w)*inv(V). In your example, it looks like you are taking the transpose and not the inverse.