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 a valid communicator. #13471

Merged
merged 1 commit into from Mar 3, 2022
Merged

Use a valid communicator. #13471

merged 1 commit into from Mar 3, 2022

Conversation

bangerth
Copy link
Member

@bangerth bangerth commented Mar 1, 2022

Fixes #13469.

/rebuild

Copy link
Member

@masterleinad masterleinad left a comment

Choose a reason for hiding this comment

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

Looks reasonable.

Comment on lines -112 to +114
if (sub_comm != MPI_COMM_NULL)
if (sub_comm != MPI_COMM_SELF)
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for tackling this!

I am not sure if this is equivalent to the previous code: this only works if MPI_COMM_WORLD and MPI_COMM_SELF are not the same (and if a subcommunicator of size one is not equivalent to MPI_COMM_SELF) for a serial execution. Is this the case?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, good question. In this particular case, the test is only ever run with 4 processors, so I think this should work. I didn't mean to suggest that this is a generally good approach. I think a better approach would be to just not create a p::d::T object on the unused processes. But that seemed like more work.

@bangerth
Copy link
Member Author

bangerth commented Mar 3, 2022

Rebased.

@tjhei tjhei merged commit ad8c4d8 into dealii:master Mar 3, 2022
@bangerth bangerth deleted the test-3 branch March 3, 2022 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

invalid communicator in tests/fullydistributed_grids/repartitioning_05.cc
5 participants