[mpich2-commits] r3966 - mpich2/trunk/src/pm/hydra/launcher/mpiexec
balaji at mcs.anl.gov
balaji at mcs.anl.gov
Sat Mar 7 15:47:37 CST 2009
Author: balaji
Date: 2009-03-07 15:47:37 -0600 (Sat, 07 Mar 2009)
New Revision: 3966
Modified:
mpich2/trunk/src/pm/hydra/launcher/mpiexec/mpiexec.c
mpich2/trunk/src/pm/hydra/launcher/mpiexec/utils.c
Log:
Cleanup some help output.
Modified: mpich2/trunk/src/pm/hydra/launcher/mpiexec/mpiexec.c
===================================================================
--- mpich2/trunk/src/pm/hydra/launcher/mpiexec/mpiexec.c 2009-03-07 19:02:20 UTC (rev 3965)
+++ mpich2/trunk/src/pm/hydra/launcher/mpiexec/mpiexec.c 2009-03-07 21:47:37 UTC (rev 3966)
@@ -16,6 +16,7 @@
static void usage(void)
{
+ printf("\n");
printf("Usage: ./mpiexec [global opts] [exec1 local opts] : [exec2 local opts] : ...\n\n");
printf("Global Options (passed to all executables):\n");
Modified: mpich2/trunk/src/pm/hydra/launcher/mpiexec/utils.c
===================================================================
--- mpich2/trunk/src/pm/hydra/launcher/mpiexec/utils.c 2009-03-07 19:02:20 UTC (rev 3965)
+++ mpich2/trunk/src/pm/hydra/launcher/mpiexec/utils.c 2009-03-07 21:47:37 UTC (rev 3966)
@@ -133,6 +133,13 @@
local_params_started = 0;
while (--argc && ++argv) {
+ /* Help options */
+ if (!strcmp(*argv, "-h") || !strcmp(*argv, "--help") || !strcmp(*argv, "-help")) {
+ /* Just return from this function; the main code will show the usage */
+ status = HYD_INTERNAL_ERROR;
+ goto fn_fail;
+ }
+
/* Check what debug level is requested */
if (!strcmp(*argv, "-v") || !strcmp(*argv, "-vv") || !strcmp(*argv, "-vvv")) {
CHECK_LOCAL_PARAM_START(local_params_started, status);
@@ -410,6 +417,12 @@
if (proc_params->user_num_procs == 0)
proc_params->user_num_procs = 1;
+ /*
+ * We use the following priority order to specify the host file:
+ * 1. Specified to mpiexec using -f
+ * 2. Specified through the environment HYDRA_HOST_FILE
+ * 3. Specified through the environment HYDRA_USE_LOCALHOST
+ */
if (proc_params->host_file == NULL && got_hostfile == 0 && getenv("HYDRA_HOST_FILE"))
proc_params->host_file = MPIU_Strdup(getenv("HYDRA_HOST_FILE"));
if (proc_params->host_file == NULL && got_hostfile == 0 && getenv("HYDRA_USE_LOCALHOST"))
More information about the mpich2-commits
mailing list