-
Notifications
You must be signed in to change notification settings - Fork 308
mpi_t: Remove invalid error check #7565
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
base: main
Are you sure you want to change the base?
Conversation
|
test:mpich/ch4/most |
|
test:mpich/ch4/ucx |
MPL_env2str is used to check for CVARs with string or enum type. It returns only 0 or 1 based on whether the environment variable is found. It never returns -1, so we can safely remove the error check.
Whether or not the user has set an environment variable is tracked by the return codes of various MPL_env2* functions. If a variable is set and debugging is enabled, the setting gets printed out for the user. Rename got_rc->is_set to better indicate what the value represents.
|
Updated variable name based on today's dev call discussion. |
|
test:mpich/ch4/most |
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 pr is overall a gratuitous/unnecessary change. Suggest drop.
| elsif ($p->{type} eq 'string' or $p->{type} eq 'enum') { | ||
| print OUTPUT_C <<EOT; | ||
| rc = MPL_env2${env_fn}("$env_name", &tmp_str); | ||
| MPIR_ERR_CHKANDJUMP1((-1 == rc),mpi_errno,MPI_ERR_OTHER,"**envvarparse","**envvarparse %s","$env_name"); |
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.
It doesn't hurt to leave the error check in. Even though MPL_env2str never returns error, it could in design. I think leave the error check in for uniformity is easier to maintain.
| rc = MPL_env2${env_fn}("$env_name", &($var_name)); | ||
| MPIR_ERR_CHKANDJUMP1((-1 == rc),mpi_errno,MPI_ERR_OTHER,"**envvarparse","**envvarparse %s","$env_name"); | ||
| got_rc += rc; | ||
| is_set += rc; |
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.
Not sure the renaming is any better.
I think the pr is overall a gratuitous/unnecessary change.
Pull Request Description
MPL_env2str is used to check for CVARs with string or enum type. It returns only 0 or 1 based on whether the environment variable is found. It never returns -1, so we can safely remove the error check.
Author Checklist
Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
Commits are self-contained and do not do two things at once.
Commit message is of the form:
module: short descriptionCommit message explains what's in the commit.
Whitespace checker. Warnings test. Additional tests via comments.
For non-Argonne authors, check contribution agreement.
If necessary, request an explicit comment from your companies PR approval manager.