Skip to content

[5.0.x] Force alignment of opal_atomic_int128_t to be 16B #13282

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

Merged

Conversation

devreal
Copy link
Contributor

@devreal devreal commented May 28, 2025

Some architectures will align 128bit integer on 8B but require 16B alignment for 128bit CAS instructions and otherwise fall back to a lock-based atomicity model. By forcing 16bit alignment we can ensure that the variables are properly aligned and the fall-back is not triggered.

Thanks to Ulrich Weigand for the analysis and proposed fix in #10988 (comment).

Backport of #13281 to v5.0.x

(cherry picked from commit d5c84ea)

Some architectures will align 128bit integer on 8B but require 16B alignment
for 128bit CAS instructions and otherwise fall back to a lock-based
atomicity model. By forcing 16bit alignment we can ensure that the variables
are properly aligned and the fall-back is not triggered.

Thanks to Ulrich Weigand for the analysis and proposed fix in open-mpi#10988 (comment).

Signed-off-by: Joseph Schuchart <[email protected]>
(cherry picked from commit d5c84ea)
@devreal devreal requested a review from bosilca May 28, 2025 20:36
@github-actions github-actions bot added this to the v5.0.8 milestone May 28, 2025
@janjust janjust merged commit 5dbc209 into open-mpi:v5.0.x Jun 9, 2025
15 checks passed
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.

3 participants