-
Notifications
You must be signed in to change notification settings - Fork 65
Fixed SHMEM_SYMMETRIC_SIZE #1216
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
Fixed SHMEM_SYMMETRIC_SIZE #1216
Conversation
Hi @markbrown314, apologies for the tag. |
Thanks! I will take a look at as soon as I can. |
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.
Thanks for the commit. Please clean up the commit message. Here is an example you can use:
Improved SHMEM_SYMMETRIC_SIZE Validation
Issue #1185
If SHMEM_SYMMETRIC_SIZE contains invalid characters, return error.
Signed-off by: Your Real Name <email address>
It would be best if your signed off name be your real name rather than a pseudonym. As well as the Author Name (user.name git config).
src/shmem_env.c
Outdated
|
||
n = sscanf(str, "%lf%c", &p, &f); | ||
if (2 == sscanf(str, "%lf%c%n", &p, &f, &n)) { | ||
if (str[n] != '\0') { exit(1); } |
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.
You need to return 1 rather than exit(1)
When the atol_scaled()
returns a non-zero value it prints "Invalid size in environment variable" to user. Exit will just shut it down abruptly.
9d4acf4
to
3a241fd
Compare
Issue Sandia-OpenSHMEM#1185 If SHMEM_SYMMETRIC_SIZE contains invalid characters, return error. Signed-off-by: Kitibodee Phuphanwoe <kitibodee.ph@ksu.ac.th>
3a241fd
to
389f4f8
Compare
The previous one was mistyped. I forgot to use |
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.
This looks good. 🎉 Thank you for the PR.
i inspired by OpenMPI
#1185