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

prov/util: Fix setting of mr_mode #5667

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions prov/util/src/util_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,10 @@ static void fi_alter_domain_attr(struct fi_domain_attr *attr,
FI_MR_BASIC : FI_MR_SCALABLE;
} else {
if ((hints_mr_mode & attr->mr_mode) != attr->mr_mode) {
if (attr->mr_mode & FI_MR_BASIC) {
attr->mr_mode &= ~FI_MR_BASIC;
attr->mr_mode |= FI_MR_ALLOCATED | FI_MR_PROV_KEY | FI_MR_VIRT_ADDR;
Copy link
Member

@shefty shefty Feb 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provider should indicate what mr_mode bits it requires. It may also indicate if it can handle BASIC and/or SCALABLE. If the app requests BASIC, then only BASIC may be returned, not the individual bits, which the app may not know how to interpret.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is a requirement and the util code is doing the right thing by unsetting the bits that a provider doesn't require.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rajachan - I didn't completely follow your comment. Are you saying that the current code is correct?

Copy link
Member

@rajachan rajachan Feb 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was agreeing with you that providers should set the bits they require and the util code should not have to do what this PR is doing. I haven't looked at the shm/uber test failure that necessitated this change yet, but looks like that could be a provider/test bug.

Edit: #5672 makes more sense.

}
attr->mr_mode = ofi_cap_mr_mode(info_caps,
attr->mr_mode & hints_mr_mode);
}
Expand Down