[mpich2-commits] r4067 - in mpich2/trunk/src/pm/hydra: launcher/mpiexec utils/args

balaji at mcs.anl.gov balaji at mcs.anl.gov
Sat Mar 14 16:00:02 CDT 2009


Author: balaji
Date: 2009-03-14 16:00:02 -0500 (Sat, 14 Mar 2009)
New Revision: 4067

Modified:
   mpich2/trunk/src/pm/hydra/launcher/mpiexec/utils.c
   mpich2/trunk/src/pm/hydra/utils/args/args.c
Log:
We were missing quote marks to contain the environment setting before
passing it to the proxy. Some environment variables (e.g., some of the
environment associated with the gnome keyring on my laptop) have spaces
in their values, causing -genvall to break. This commit fixes it and
makes -genvall default.


Modified: mpich2/trunk/src/pm/hydra/launcher/mpiexec/utils.c
===================================================================
--- mpich2/trunk/src/pm/hydra/launcher/mpiexec/utils.c	2009-03-14 17:00:00 UTC (rev 4066)
+++ mpich2/trunk/src/pm/hydra/launcher/mpiexec/utils.c	2009-03-14 21:00:02 UTC (rev 4067)
@@ -425,10 +425,8 @@
             proc_params->exec_proc_count = 1;
 
         if (handle.prop == HYD_ENV_PROP_UNSET && proc_params->prop == HYD_ENV_PROP_UNSET) {
-            /* By default we pass no environment as a lot of users
-             * have crazy environments which make passing them as
-             * strings a nightmare. */
-            proc_params->prop = HYD_ENV_PROP_NONE;
+            /* By default we pass the entire environment */
+            proc_params->prop = HYD_ENV_PROP_ALL;
         }
 
         proc_params = proc_params->next;

Modified: mpich2/trunk/src/pm/hydra/utils/args/args.c
===================================================================
--- mpich2/trunk/src/pm/hydra/utils/args/args.c	2009-03-14 17:00:00 UTC (rev 4066)
+++ mpich2/trunk/src/pm/hydra/utils/args/args.c	2009-03-14 21:00:02 UTC (rev 4067)
@@ -20,9 +20,11 @@
     while (env) {
         j = 0;
 
+        tmp[j++] = MPIU_Strdup("\"");
         tmp[j++] = MPIU_Strdup(env->env_name);
         tmp[j++] = MPIU_Strdup("=");
         tmp[j++] = env->env_value ? MPIU_Strdup(env->env_value) : MPIU_Strdup("");
+        tmp[j++] = MPIU_Strdup("\"");
         tmp[j++] = NULL;
 
         status = HYDU_String_alloc_and_join(tmp, &envstr);



More information about the mpich2-commits mailing list