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

Failing to wrap nda::basic_array<> when upgrading nda/1.3.x from 35a5a2e to 39f6e14 #57

Open
HugoStrand opened this issue Dec 13, 2024 · 0 comments

Comments

@HugoStrand
Copy link
Member

Dear cpp2py developers,

I have a Triqs application with c++ code wrapped by cpp2py. Today rebuilding Triqs the c++/python wrapping stopped compiling. I have narrowed down the error as stemming from a change of nda/1.3.x at commit 35a5a2e to current latest commit 39f6e14.

If I manually checkout nda/1.3.x at 35a5a2e in my cmake directory ./deps/nda_src and rebuild and install Triqs, my application compiles again.

The compilation error message is:

[ 14%] Generating impurity_wrap.cxx
[ 18%] Building CXX object python/fastdiag/CMakeFiles/impurity.dir/impurity_wrap.cxx.o
In file included from /.../dev/ppsc-soe/cbuild/python/fastdiag/impurity_wrap.cxx:39:
/.../apps/cppdlr/include/nda_py/cpp2py_converters.hpp:94:75: error: type/value mismatch at argument 5 in template parameter list for 'template<class ValueType, int Rank, class Layout, char Algebra, class ContainerPolicy> class nda::basic_array'
   94 |   struct py_converter<nda::basic_array<T, R, nda::C_layout, Algebra, nda::heap>> {
      |                                                                           ^~~~
/.../apps/cppdlr/include/nda_py/cpp2py_converters.hpp:94:75: note:   expected a type, got 'heap'
/.../apps/cppdlr/include/nda_py/cpp2py_converters.hpp:94:79: error: template argument 1 is invalid
   94 |   struct py_converter<nda::basic_array<T, R, nda::C_layout, Algebra, nda::heap>> {
      |                                                                               ^~
make[2]: *** [python/fastdiag/CMakeFiles/impurity.dir/impurity_wrap.cxx.o] Error 1
make[1]: *** [python/fastdiag/CMakeFiles/impurity.dir/all] Error 2

Looking at nda it seems like the nda::heap nowadays needs a template argument, like nda::heap<mem::Host>, which is missing in the generated wrapper code impurity_wrap.cxx.

Where does the py_converters for nda::basic_array live? cpp2py or nda?

Where should one start digging to try to solve this issue.

Best regards,
Hugo

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

1 participant