Skip to content

Fix potential false sharing in ReduceOps.eval with OMP #4618

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

Conversation

AlexanderSinn
Copy link
Member

Summary

Looking at the code I noticed that eval() with OMP could be prone to false sharing.
TBD if this is actually the case and if this PR improves it

Additional background

Checklist

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@AlexanderSinn
Copy link
Member Author

Initial benchmarks show only a very small difference, if any

@WeiqunZhang
Copy link
Member

In any way, it will not hurt.

@WeiqunZhang WeiqunZhang merged commit 04afe76 into AMReX-Codes:development Aug 19, 2025
75 checks passed
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

Successfully merging this pull request may close these issues.

2 participants