Skip to content

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.
@heplesser heplesser requested review from heplesser and mlober February 5, 2024 11:02
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
@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 deleted the fix_single2master branch March 21, 2024 16:33
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

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants