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

MPI_Comm_split with uninitialized key value? #46

Closed
adammoody opened this issue Oct 25, 2023 · 1 comment
Closed

MPI_Comm_split with uninitialized key value? #46

adammoody opened this issue Oct 25, 2023 · 1 comment

Comments

@adammoody
Copy link
Contributor

adammoody commented Oct 25, 2023

I'm working with @kosinovsky to debug an XOR rebuild problem. While looking through the code, this line caught my eye:

MPI_Comm_split(comm, provided == 0 ? 0 : MPI_UNDEFINED, rank, &backends);

I don't think rank has been initialized at this point, which means it could have an arbitrary value. That could then lead to a potential random reordering of rank values in the backends communicator as compared to the parent communicator.

A potential fix would be to replace rank with 0 or otherwise move the MPI_Comm_rank(comm, &rank) higher up in the function.

@bnicolae
Copy link
Contributor

Correct, I've fixed it

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