Skip to content

cmd_line: fix "ompi_info --help" #10850

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

Merged
merged 1 commit into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions opal/util/cmd_line.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* All rights reserved.
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2022 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2015-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
Expand Down Expand Up @@ -217,7 +217,7 @@ int opal_cmd_line_make_opt3(opal_cmd_line_t *cmd, char short_name, const char *s

e.ocl_description = desc;

e.ocl_otype = OPAL_CMD_LINE_OTYPE_NULL;
e.ocl_otype = OPAL_CMD_LINE_OTYPE_GENERAL;

return make_opt(cmd, &e);
}
Expand Down Expand Up @@ -690,17 +690,6 @@ char *opal_cmd_line_get_usage_msg(opal_cmd_line_t *cmd)
}
}
}
if (otype == OPAL_CMD_LINE_OTYPE_NULL || otype == OPAL_CMD_LINE_OTYPE_GENERAL) {
char *argument_line
= "\nFor additional mpirun arguments, run 'mpirun --help <category>'\n\nThe following "
"categories exist: general (Defaults to this option), debug,\n output, input, "
"mapping, ranking, binding, devel (arguments useful to OMPI\n Developers), "
"compatibility (arguments supported for backwards compatibility),\n launch "
"(arguments to modify launch options), and dvm (Distributed Virtual\n Machine "
"arguments).";

opal_argv_append(&argc, &argv, argument_line);
}
if (NULL != argv) {
ret = opal_argv_join(argv, '\n');
opal_argv_free(argv);
Expand Down
7 changes: 5 additions & 2 deletions opal/util/cmd_line.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2022 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
* Copyright (c) 2016-2017 Los Alamos National Security, LLC. All rights
* reserved.
Expand Down Expand Up @@ -182,7 +182,10 @@ typedef enum opal_cmd_line_type_t opal_cmd_line_type_t;
* mpirun --help output.
*/
enum opal_cmd_line_otype_t {
OPAL_CMD_LINE_OTYPE_GENERAL,
OPAL_CMD_LINE_OTYPE_GENERAL, /* This type is shown via --help by
default (i.e., if no arg is
specified to narrow the help
scope) */
OPAL_CMD_LINE_OTYPE_DEBUG,
OPAL_CMD_LINE_OTYPE_OUTPUT,
OPAL_CMD_LINE_OTYPE_INPUT,
Expand Down