 General CULA Dense (LAPACK & BLAS) support and troubleshooting. Use this forum if you are having a general problem or have encountered a bug.

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

Posts: 15
Joined: Wed Jun 20, 2012 2:58 am

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

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?

Posts: 15
Joined: Wed Jun 20, 2012 2:58 am

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

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.

xSYEV uses a direct reduction to traditional form then QR iterations to find the Eigenpairs.
kyle

Posts: 301
Joined: Fri Jun 12, 2009 7:47 pm

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

it was a wrapper bug! instead of returning the z value as eigenvectors it returns the w value!

Thanks 