-
Notifications
You must be signed in to change notification settings - Fork 39
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
Double free when making copies of a distributed tree #368
Comments
This is not the only problem from copying communicators. If a user copies a distributed tree, then the MPI calls and requests from different trees may overlap, potentially resulting in undefined behavior and/or deadlocks. The fix is straightforward: copy constructor and copy assignment operators must duplicate the communicator. |
Time for |
Good suggestion, but maybe overkill for now. |
Why overkill? Isn't thinking about copy/move semantics worth it? |
@masterleinad Probably not. I would rather not get distracted by possibly multiple places to get spotted by the tool at the moment. But it could be interesting to just post the results of it here just to see where we are at. |
This occurred to me when reviewing ECP-copa/Cabana#295
The implicitly-declared copy constructor and copy assignment operator are problematic because they make copies of the communicator data member and when an object gets out of scope
MPI_Comm_free
gets called on it.ArborX/src/ArborX_DistributedSearchTree.hpp
Line 45 in 4834bff
The text was updated successfully, but these errors were encountered: