Skip to content

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

Open
@HugoStrand

Description

@HugoStrand

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions