Skip to content

Commit e67d1aa

Browse files
authored
Merge pull request #10850 from jsquyres/pr/fix-ompi-info-help
cmd_line: fix "ompi_info --help"
2 parents f42993c + 9df04a1 commit e67d1aa

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

opal/util/cmd_line.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* All rights reserved.
1313
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
1414
* reserved.
15-
* Copyright (c) 2012-2015 Cisco Systems, Inc. All rights reserved.
15+
* Copyright (c) 2012-2022 Cisco Systems, Inc. All rights reserved
1616
* Copyright (c) 2015-2017 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
1818
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
@@ -217,7 +217,7 @@ int opal_cmd_line_make_opt3(opal_cmd_line_t *cmd, char short_name, const char *s
217217

218218
e.ocl_description = desc;
219219

220-
e.ocl_otype = OPAL_CMD_LINE_OTYPE_NULL;
220+
e.ocl_otype = OPAL_CMD_LINE_OTYPE_GENERAL;
221221

222222
return make_opt(cmd, &e);
223223
}
@@ -690,17 +690,6 @@ char *opal_cmd_line_get_usage_msg(opal_cmd_line_t *cmd)
690690
}
691691
}
692692
}
693-
if (otype == OPAL_CMD_LINE_OTYPE_NULL || otype == OPAL_CMD_LINE_OTYPE_GENERAL) {
694-
char *argument_line
695-
= "\nFor additional mpirun arguments, run 'mpirun --help <category>'\n\nThe following "
696-
"categories exist: general (Defaults to this option), debug,\n output, input, "
697-
"mapping, ranking, binding, devel (arguments useful to OMPI\n Developers), "
698-
"compatibility (arguments supported for backwards compatibility),\n launch "
699-
"(arguments to modify launch options), and dvm (Distributed Virtual\n Machine "
700-
"arguments).";
701-
702-
opal_argv_append(&argc, &argv, argument_line);
703-
}
704693
if (NULL != argv) {
705694
ret = opal_argv_join(argv, '\n');
706695
opal_argv_free(argv);

opal/util/cmd_line.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* University of Stuttgart. All rights reserved.
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
13-
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
13+
* Copyright (c) 2012-2022 Cisco Systems, Inc. All rights reserved
1414
* Copyright (c) 2015-2016 Intel, Inc. All rights reserved.
1515
* Copyright (c) 2016-2017 Los Alamos National Security, LLC. All rights
1616
* reserved.
@@ -182,7 +182,10 @@ typedef enum opal_cmd_line_type_t opal_cmd_line_type_t;
182182
* mpirun --help output.
183183
*/
184184
enum opal_cmd_line_otype_t {
185-
OPAL_CMD_LINE_OTYPE_GENERAL,
185+
OPAL_CMD_LINE_OTYPE_GENERAL, /* This type is shown via --help by
186+
default (i.e., if no arg is
187+
specified to narrow the help
188+
scope) */
186189
OPAL_CMD_LINE_OTYPE_DEBUG,
187190
OPAL_CMD_LINE_OTYPE_OUTPUT,
188191
OPAL_CMD_LINE_OTYPE_INPUT,

0 commit comments

Comments
 (0)