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

ofi: follow user specified include/exclude list to select providers #12234

Merged
merged 2 commits into from
Jan 19, 2024

Conversation

wenduwan
Copy link
Contributor

This PR addresses #12233

Since 5.0.x, we introduced an optional FI_HMEM capability in ofi provider selection logic(both mtl and btl) in order to support accelerator memory. As described in the issue, this introduced a bug that can cause the wrong ofi provider to be selected, even if the user explicitly includes/excludes the provider name.

This change refactors the selection logic to correctly handle the include/exclude list, and therefore fixes the bug.

@wenduwan wenduwan requested a review from hppritcha January 13, 2024 21:48
@wenduwan wenduwan self-assigned this Jan 13, 2024
@wenduwan wenduwan force-pushed the ofi_provider_include_exclude branch 2 times, most recently from c131639 to 2c348b1 Compare January 13, 2024 21:51
@open-mpi open-mpi deleted a comment from github-actions bot Jan 13, 2024
@hppritcha
Copy link
Member

@BrendanCunningham i don't know if opx supports FI_HMEM but esp. if it does can you double check this?

This PR addresses open-mpi#12233

Since 5.0.x, we introduced an optional FI_HMEM capability in ofi provider
selection logic(both mtl and btl) in order to support accelerator memory.
As described in the issue, this introduced a bug that can cause the wrong
ofi provider to be selected, even if the user explicitly includes/excludes
the provider name.

This change refactors the selection logic to correctly handle the
include/exclude list, and therefore fixes the bug.

Signed-off-by: Wenduo Wang <[email protected]>
@wenduwan wenduwan force-pushed the ofi_provider_include_exclude branch from 2c348b1 to 29efcef Compare January 16, 2024 17:50
@shijin-aws
Copy link
Contributor

I think we should still add FI_REMOTE_COMM in the hints' caps. It doesn't make sense to pick shm even if user explicitly include it.

For BTL, btl/sm should handle same-node communication, and btl/ofi
is expected to handle inter-node communication. Here we request the
FI_REMOTE_COMM capability to enforce this.

Signed-off-by: Wenduo Wang <[email protected]>
@wenduwan
Copy link
Contributor Author

@shijin-aws I talked to Brian about this and learned that btl/sm is expected to handle same-node communication, so btl/ofi should only worry about inter-node. I added a commit for this.

@hppritcha Please see my second commit which adds FI_REMOTE_COMM capability.

@wenduwan
Copy link
Contributor Author

Hi @BrendanCunningham did you find any issue with the change? AWS is currently blocked by this. We would like to include it in the upcoming Open MPI 5.0.2 release.

@wenduwan
Copy link
Contributor Author

@BrendanCunningham I checked with Howard. We agree to merge this fix first - please let me know if you find out any issues.

@wenduwan wenduwan merged commit 4129b86 into open-mpi:main Jan 19, 2024
9 of 10 checks passed
@wenduwan wenduwan deleted the ofi_provider_include_exclude branch January 19, 2024 17:17
@tmh97
Copy link

tmh97 commented Jan 19, 2024

Hey @wenduwan I'll take a look on Monday and will let you know if OPX has any issues with this change, thanks!

@shijin-aws
Copy link
Contributor

@BrendanCunningham i don't know if opx supports FI_HMEM but esp. if it does can you double check this?

I am a bit confused, if opx supports FI_HMEM, it should be picked up by btl/ofi even without the PR.

If opx doesn't support FI_HMEM, this PR should fix the bug that will cause shm to be selected (and then excluded)

What is the goal of the check here?

@tmh97
Copy link

tmh97 commented Jan 22, 2024

@wenduwan @hppritcha Verified this change! OPX provider is found without issue, I tested using OSU MB's, and with the following options, which are typically preferred for OPX runs --mca mtl ofi --mca btl self,vader

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.

4 participants