Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with eigenvalues and lanczos-tag #11

Closed
wolfgangp opened this issue Apr 2, 2014 · 4 comments
Closed

Trouble with eigenvalues and lanczos-tag #11

wolfgangp opened this issue Apr 2, 2014 · 4 comments

Comments

@wolfgangp
Copy link

When I do:

import pyviennacl as cl
gpuA = cl.Matrix( np.diag((1.,2.,3.)) )
tag = cl.linalg.lanczos_tag(num_eig=3)
EigVals = cl.linalg.eig(gpuA, tag)

I get:

ArgumentError: Python argument types in
    pyviennacl._viennacl.eig(matrix_row_float, lanczos_tag)
did not match C++ signature:
    eig(viennacl::matrix<float, viennacl::column_major, 1u>, viennacl::linalg::power_iter_tag)
    eig(viennacl::matrix<double, viennacl::column_major, 1u>, viennacl::linalg::power_iter_tag)
    eig(viennacl::matrix<float, viennacl::row_major, 1u>, viennacl::linalg::power_iter_tag)
    eig(viennacl::matrix<double, viennacl::row_major, 1u>, viennacl::linalg::power_iter_tag)

I tried with power_iter_tag, too, and it works. But it's not what I need.
Please advise.

Thanks for your effort! This is very promising stuff.
Cheers,
wolfgangp

@tsmithe
Copy link
Collaborator

tsmithe commented Apr 2, 2014

Hi there,

thanks for the report. It looks like I had accidentally left that code path disabled during some testing earlier. I've re-enabled it now in the git master branch -- could you try that and see if it works?

I really ought to have a unit test for these bits; I'm surprised I missed it!

Cheers,

Toby

@wolfgangp
Copy link
Author

Hi Toby,
It's working fine now.
wolfgangp

@tsmithe
Copy link
Collaborator

tsmithe commented Apr 3, 2014

Great. I'll include the fix (and a unit test!) in the next release; for now, keep using the git version (it won't change much, if at all, over the next few months), and do report any more issues you encounter.

@tsmithe tsmithe closed this as completed Apr 3, 2014
@tsmithe
Copy link
Collaborator

tsmithe commented Apr 3, 2014

Hi wolfgangp -- just FYI: I realised that I had also failed to enable eigenvalue computations for sparse (compressed/coordinate) matrices, and I've now fixed that, too. If you need that functionality, you'll have to pull from git again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants