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

Compilation error of Python bindings on linux-64 #5

Open
adriendelsalle opened this issue Jul 4, 2022 · 3 comments
Open

Compilation error of Python bindings on linux-64 #5

adriendelsalle opened this issue Jul 4, 2022 · 3 comments

Comments

@adriendelsalle
Copy link
Contributor

Description

I got some compilation errors when compiling the Python bindings on linux-64:

  • the auto deduction of return type in multiple overloads causes pybind11::overload_cast compilation error on MeridionalGrid<T>::operator().

    • after investigating a bit, gcc=11 should help on that (see the comment I left on related pybind11 issue) but it looks like it's not for our case. I would need to spend more time on that to understand what's going on
    • I propose to wrap the call in a lambda or to use a template parameter for return type to solve this compilation error
  • the reducer used in gbs-mesh/gbs::msh_curves_set_sizes causes a compilation error using gcc=10

    • gcc>=11.2 doesn't complain. I found a bug in std::reduce overload using a binary functor in gcc=10, tracked here
    • for compatibility with current reference conda toolchain using gcc=10 it would be better to use std::accumulate instead of std::reduce in upstream project gbs, which is not buggy
@ssg-aero
Copy link
Owner

ssg-aero commented Jul 4, 2022

Did you try with gcc>=11.2?

I think it's a minimum requirement:

@adriendelsalle
Copy link
Contributor Author

Yes I understand the perspective to get better performance using std::reduce. Maybe it would be a good thing to start a developer documentation to mention minimum version of gcc.

The binding of MeridionalGrid<T>::operator() still needs to be wrapped in a lambda. We could investigate later how to remove that limitation (returning a template parameter already works).

@ssg-aero
Copy link
Owner

ssg-aero commented Jul 5, 2022

Yes didn't find a workaround either for MeridionalGrid::operator(), so I've merged the PR

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