Open
Conversation
Contributor
Author
|
test:mpich/ch4/most |
Contributor
Author
|
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.
Contributor
Author
|
Updated variable name based on today's dev call discussion. |
Contributor
Author
|
test:mpich/ch4/most |
hzhou
reviewed
Sep 18, 2025
Contributor
hzhou
left a comment
There was a problem hiding this comment.
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"); |
Contributor
There was a problem hiding this comment.
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; |
Contributor
There was a problem hiding this comment.
Not sure the renaming is any better.
I think the pr is overall a gratuitous/unnecessary change.
yfguo
approved these changes
Sep 19, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.