-
Notifications
You must be signed in to change notification settings - Fork 53
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
num_contexts patch #1122
Merged
davidozog
merged 6 commits into
Sandia-OpenSHMEM:main
from
davidozog:pr/num_contexts_patch
May 1, 2024
Merged
num_contexts patch #1122
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4aeb123
teams: set config to defaults if config_mask is 0
aa1e722
NOMERGE/teams: point tests submodule @Elliots fork
625a986
teams: preallocate num_contexts if config_mask set
2c498da
teams: point tests-sos submodule to latest ref
e9e7f59
teams: warn if non-null config with 0 config_mask
6198b74
teams: warn if masked config is non-null in "get"
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[submodule "modules/tests-sos"] | ||
path = modules/tests-sos | ||
url = ../../openshmem-org/tests-sos.git | ||
branch = main | ||
url = ../../ronawho/tests-sos.git | ||
branch = fix_team_get_config_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidozog - @dalcinl and I disagree. 🙂 We started getting warnings in shmem4py. We checked the specification and we do not see it saying
config
should beNULL
ifconfig_mask == 0
. In fact, we are not even sure if a NULL pointer is allowed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In here, Marcin is talking about the standard: there is no explicit wording saying that if the
config_mask
is 0, then config may beNULL
. Or did we miss something? What if some implementation decides to add a checkassert(config != NULL)
irrespective of the value ofconfig_mask
? Would such behavior be in contradiction of the 1.5 standard?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrogowski @dalcinl I agree there is a "blind spot" in this section of the standard right now (v1.5), and I have a note to try to fix it for the upcoming new version (v1.6). I would prefer to add the following statement to the v1.6 standard (do you think it's sufficient?):
Another option is to simply prohibit a null
config
pointer, but my hunch is that's a bit more restrictive than what was intended for v1.5, but I'm open to it!We also might want something like this for improved clarity:
So if
config_mask
is 0 andconfig
is non-null, then that's perfectly fine. Given the state of OpenSHMEM v1.5, we opted to include an SOS warning in this special case, but I think we could also move it to "DEBUG" output or simply remove it altogether - I'd prefer to remove it myself, especially if the statements above are added to OpenSHMEM v1.6.Any preferences from @wrrobin and @stewartl318?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with your previous suggestions with a small addition for maximum clarity:
I guess that would be good enough. Extra points if you guys ever allow for these warnings as an opt-in via some environment variable.
Indeed, there is little point in such restriction. Moreover, it is kind of a backward incompatible change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the internet robustness principle states it well: be conservative in what you do, be liberal in what you accept from others
I think there is no real value in any sort of debug or error message when mask is 0 but config is non-null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dalcinl @stewartl318 - Thanks for the input!
This sounds like what I meant by "DEBUG" message above. The
DEBUG_MSG
macro in SOS will only print tostderr
if theSHMEM_DEBUG
environment variable is set.I tend to agree... but maybe the debug message is a good compromise since the spec is pretty under-defined for this special case. Let's move the discussion to PR #1138, which proposes changing this to a debug message.