Skip to content

sync_builtin: check for 64-bit atomic support #1659

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
merged 2 commits into from
May 17, 2016
Merged

Conversation

hjelmn
Copy link
Member

@hjelmn hjelmn commented May 9, 2016

This commit adds an additional check for 64-bit atomic support for _sync
builtins. If 64-bit support is not available the opal_atomic
*_64 atomics
are disabled.

Signed-off-by: Nathan Hjelm hjelmn@me.com

@hjelmn
Copy link
Member Author

hjelmn commented May 9, 2016

@ggouaillardet @PHHargrove I went ahead and added a check for 64-bit __sync atomics. It shouldn't be necessary (a macro exists that indicated whether a platform supports 64-bit asm) but this is safer than relying on that macro.

This commit adds an additional check for 64-bit atomic support for __sync
builtins. If 64-bit support is not available the opal_atomic_*_64 atomics
are disabled.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
@PHHargrove
Copy link
Member

Works for me now. 👍
-Paul

This commit changes the asm configure logic to fall back on inline asm
atomics on systems that 1) have __sync atomics, 2) do not have 64-bit
__sync atomics, and 3) support 64-bit asm.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
@hjelmn
Copy link
Member Author

hjelmn commented May 10, 2016

@PHHargrove addressed your other concern. The second commit will fall back on inline asm on x86 if the compiler does not implement 64-bit __sync atomics.

@PHHargrove
Copy link
Member

@hjelmn
This looks better now, using the inline asm on two IA32 platforms I tried, and still using __sync atomics on an x86-64.

@hjelmn hjelmn merged commit f693886 into open-mpi:master May 17, 2016
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