-
Notifications
You must be signed in to change notification settings - Fork 248
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
[External] Update pybind11 to last version #12788
[External] Update pybind11 to last version #12788
Conversation
Making draft, CI is failing, and still having link issues with Intel LLVM |
Traceback (most recent call last):
File "/__w/Kratos/Kratos/bin/Custom/kratos/tests/test_model_part.py", line 893, in test_model_part_iterators
for subpart in model_part1.SubModelParts:
RuntimeError: return_value_policy = move, but type Kratos::PointerHashMapSet<Kratos::ModelPart, std::hash<std::string>, Kratos::ModelPart::GetModelPartName, std::shared_ptr<Kratos::ModelPart> > is neither movable nor copyable! Clearly this requires a major refactor |
Sigh. Please ignore this, I was thinking of |
As inrecall the goal of thwt container is to allow indexing by a hash id. The important case is that of someone not giving you an id for the geoemtries but rather one wants to identify them by the connectivity. Having said this...i am not much into the technical.details. can someone provide more insight? |
My previous comment is irrelevant, please ignore it. As for the error, the problem is that The easiest fix would be to return the sub model part container by shared ptr. However, this is impossible right now because Kratos/kratos/includes/model_part.h Line 1978 in 505d9c0
We don't have this issue with Lines 927 to 935 in 505d9c0
Another fix would be to return a view over the sub model parts instead of the container itself. The view could be copied without any performance-related issues, and it would be also be safer because users wouldn't be able manipulate the container directly (e.g.: add or remove sub model parts to/from the container directly instead of the |
ERROR: test_select_node_list (test_variable_utils.TestVariableUtils)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/__w/Kratos/Kratos/bin/Custom/kratos/tests/test_variable_utils.py", line 599, in test_select_node_list
node_list = KratosMultiphysics.VariableUtils().SelectNodeList(KratosMultiphysics.VISCOSITY, 0.01, model_part.Nodes)
RuntimeError: return_value_policy = move, but type Kratos::PointerVectorSet<Kratos::Node, Kratos::IndexedObject, std::less<unsigned long>, std::equal_to<unsigned long>, Kratos::intrusive_ptr<Kratos::Node>, std::vector<Kratos::intrusive_ptr<Kratos::Node>, std::allocator<Kratos::intrusive_ptr<Kratos::Node> > > > is neither movable nor copyable! We should do a view for the Nodes/Conditions/Elements as well... |
Okay, looks like with these 2 minor changes it works now |
BTW, this new version gives support for Eigen conversion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This View
is fine for now, but (in another PR) I'd like a proper View
template we can use throughout Kratos (and not only for python bindings).
By proper I mean a standard-conforming container interface, complete with type aliases and proper iterators.
Oh whoops, I didn't notice the automerge. Sorry. |
Ups |
Kokkos uses view for everything... |
📝 Description
Update pybind11 to last version (2.13).
I am trying to compile Kratos with Intel LLVM and this update is required. See pybind/pybind11#927
🆕 Changelog