From 9766c01e5046b84c72b9919caf9b87952408252c Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Thu, 22 Jun 2006 19:48:27 +0000 Subject: [PATCH] * Per discussion at quarterly meeting and bug #91, print out the bug contact point when printing version and help strings This commit was SVN r10484. --- orte/tools/orterun/help-orterun.txt | 6 ++++++ orte/tools/orterun/orterun.c | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/orte/tools/orterun/help-orterun.txt b/orte/tools/orterun/help-orterun.txt index 5a737e9b05..61226162b9 100644 --- a/orte/tools/orterun/help-orterun.txt +++ b/orte/tools/orterun/help-orterun.txt @@ -22,12 +22,18 @@ Open RTE was unable to initialize properly. The error occured while attempting to %s. Returned value %d instead of ORTE_SUCCESS. [orterun:usage] +%s (%s) %s + Usage: %s [OPTION]... [PROGRAM]... Start the given program using Open RTE %s + +Report bugs to %s [orterun:version] %s (%s) %s + +Report bugs to %s [orterun:allocate-resources] %s was unable to allocate enough resources to start your application. This might be a transient error (too many nodes in the cluster were diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index d307fba34d..3d61802d98 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -837,7 +837,8 @@ static int parse_globals(int argc, char* argv[]) /* print version if requested. Do this before check for help so that --version --help works as one might expect. */ - if (orterun_globals.version) { + if (orterun_globals.version && + !(1 == argc || orterun_globals.help)) { char *project_name = NULL; if (0 == strcmp(orterun_basename, "mpirun")) { project_name = "Open MPI"; @@ -845,7 +846,8 @@ static int parse_globals(int argc, char* argv[]) project_name = "OpenRTE"; } opal_show_help("help-orterun.txt", "orterun:version", false, - orterun_basename, project_name, OPAL_VERSION); + orterun_basename, project_name, OPAL_VERSION, + PACKAGE_BUGREPORT); /* if we were the only argument, exit */ if (2 == argc) exit(0); } @@ -854,9 +856,17 @@ static int parse_globals(int argc, char* argv[]) if (1 == argc || orterun_globals.help) { char *args = NULL; + char *project_name = NULL; + if (0 == strcmp(orterun_basename, "mpirun")) { + project_name = "Open MPI"; + } else { + project_name = "OpenRTE"; + } args = opal_cmd_line_get_usage_msg(&cmd_line); opal_show_help("help-orterun.txt", "orterun:usage", false, - orterun_basename, args); + orterun_basename, project_name, OPAL_VERSION, + orterun_basename, args, + PACKAGE_BUGREPORT); free(args); /* If someone asks for help, that should be all we do */