cmd_line: fix "ompi_info --help" #10850
Merged
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.
cmd_line.c was previously given some mpirun-specific functionality, ignoring the fact that it is used by other executables (in this case, ompi_info). This commit removes an mpirun-specific output message when generating the help message from an ompi_cmd_line_t (since Open MPI's mpirun doesn't even use opal_cmd_line_t any more) and also changes the default for all cmd_line options to be of type OPAL_CMD_LINE_OTYPE_GENERAL (instead of OPAL_CMD_LINE_OTYPE_NULL) so that " --help" (with no argument) will, by default, show that option's description/help message.
Thanks to George Katevenis (@gkatev) for pointing out the issue and suggesting a fix.
Signed-off-by: Jeff Squyres [email protected]
@gkatev In digging into #10842, I opted to just make all options created by
_opt3
be of typeOTYPE_GENERAL
(instead ofOTYPE_NULL
) in order to preserve the difference between "this help content is shown by default" vs. "this help content is shown when all help is specifically requested".