viennacl / pyviennacl-dev

Developer repository for PyViennaCL. Visit http://viennacl.sourceforge.net/ for latest releases.
MIT License
32 stars 6 forks source link

Problem with tag #44

Open wreckdump opened 6 years ago

wreckdump commented 6 years ago

I'm trying to use eigenvalue solver and I am getting the following error messages.

Here is the code

import pyviennacl as p
import numpy as np

A = np.array([[1, 8, 3],[3, 4, 3],[2, 6, 9]])

# Transfer the system matrix to the compute device
A = p.Matrix(A)

tag = p.linalg.lanczos_tag(num_eig=1)
eig = p.linalg.eig(A,tag)

And here is the error messages

      return _v.eig(A.vcl_leaf, tag.vcl_tag).as_ndarray()
Boost.Python.ArgumentError: Python argument types in
    pyviennacl._viennacl.eig(matrix_row_long, lanczos_tag)
did not match C++ signature:
    eig(viennacl::coordinate_matrix<float, 128u>, viennacl::linalg::power_iter_tag)
    eig(viennacl::coordinate_matrix<double, 128u>, viennacl::linalg::power_iter_tag)
    eig(viennacl::compressed_matrix<float, 1u>, viennacl::linalg::power_iter_tag)
    eig(viennacl::compressed_matrix<double, 1u>, viennacl::linalg::power_iter_tag)
    eig(viennacl::coordinate_matrix<float, 128u>, viennacl::linalg::lanczos_tag)
    eig(viennacl::coordinate_matrix<double, 128u>, viennacl::linalg::lanczos_tag)
    eig(viennacl::compressed_matrix<float, 1u>, viennacl::linalg::lanczos_tag)
    eig(viennacl::compressed_matrix<double, 1u>, viennacl::linalg::lanczos_tag)
    eig(viennacl::matrix<float, viennacl::column_major, 1u>, viennacl::linalg::lanczos_tag)
    eig(viennacl::matrix<double, viennacl::column_major, 1u>, viennacl::linalg::lanczos_tag)
    eig(viennacl::matrix<float, viennacl::row_major, 1u>, viennacl::linalg::lanczos_tag)
    eig(viennacl::matrix<double, viennacl::row_major, 1u>, viennacl::linalg::lanczos_tag)
    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)

Its seems like some other users have encountered this problem in the past and it was solved From this issue posting, it says: "It looks like I had accidentally left that code path disabled during some testing earlier. "

Could this be the same problem?

Thank you.