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

Ensure all MPI communication to is handled by master thread #3090

Merged
merged 4 commits into from
Feb 6, 2024

Conversation

terhorstd
Copy link
Contributor

According to the MPI specifications, calls have to be done from the same thread (master) instead of from a single thread in MPI_FUNNELED mode . This means a number of omp single pragmas needed to be changed to omp master. This should not impact performance overly much, but needs checking!

⚠️ Since an exit-barrier is not implicit for omp master, I added explicit ones where not given anyway.

MPI calls have to be done from the *same* thread (`master`) instead of from a `single` thread in MPI_FUNNELED mode according to the specifications.
Copy link
Contributor

@heplesser heplesser left a comment

Choose a reason for hiding this comment

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

@terhorstd Thank you for this fix. While strictly speaking the resize calls could be done in single, since they do not perform MPI communication, it makes sense to place them in master so we are certain that the buffer data structures always are allocated on the thread performing MPI communication.

@heplesser heplesser changed the title Change MPI communication to specific thread Ensure all MPI communication to is handled by master thread Feb 6, 2024
@heplesser heplesser merged commit 8af12af into master Feb 6, 2024
46 checks passed
@terhorstd terhorstd added T: Bug Wrong statements in the code or documentation S: High Should be handled next I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels Mar 21, 2024
@terhorstd terhorstd added this to In progress in Kernel via automation Mar 21, 2024
@terhorstd terhorstd deleted the fix_single2master branch March 21, 2024 16:33
@heplesser heplesser moved this from In progress to PRs approved in Kernel Apr 8, 2024
@heplesser heplesser moved this from PRs approved to Done in Kernel Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: High Should be handled next T: Bug Wrong statements in the code or documentation
Projects
Kernel
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants