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

Use MPI_Comm_dup to separate ArborX comm context from user's #135

Merged
merged 2 commits into from
Oct 9, 2019

Conversation

aprokop
Copy link
Contributor

@aprokop aprokop commented Oct 9, 2019

This call should normally not involve any communication.

This call should normally not involve any communication.
@aprokop aprokop added the enhancement New feature or request label Oct 9, 2019
Copy link
Contributor

@dalg24 dalg24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming that we want the duplication, you must call MPI_Comm_free(_comm) in the destructor.

{
MPI_Comm_dup(comm, &_comm);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to comment about the duplication. I do not understand what is different from copying since it duplicate the attributes of the original communicator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copying communicator does not create new context. Duplicating does. Having a different context means that the messages sent by user cannot be received by the library and vice versa, even if they have the exact same information and tags.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment in the code.

Co-authored-by: Damien L-G <dalg24@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants