[mpich2-commits] r7729 - in mpich2/trunk/src/pm/hydra: include pm/pmiserv tools/bootstrap/external tools/bootstrap/include tools/bootstrap/persist tools/bootstrap/src utils/launch

balaji at mcs.anl.gov balaji at mcs.anl.gov
Fri Jan 14 10:16:54 CST 2011


Author: balaji
Date: 2011-01-14 10:16:54 -0600 (Fri, 14 Jan 2011)
New Revision: 7729

Modified:
   mpich2/trunk/src/pm/hydra/include/hydra.h
   mpich2/trunk/src/pm/hydra/pm/pmiserv/pmip_cb.c
   mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmci.c
   mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c
   mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v2.c
   mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_utils.c
   mpich2/trunk/src/pm/hydra/tools/bootstrap/external/external.h
   mpich2/trunk/src/pm/hydra/tools/bootstrap/external/external_launch.c
   mpich2/trunk/src/pm/hydra/tools/bootstrap/external/ll.h
   mpich2/trunk/src/pm/hydra/tools/bootstrap/external/ll_launch.c
   mpich2/trunk/src/pm/hydra/tools/bootstrap/external/slurm.h
   mpich2/trunk/src/pm/hydra/tools/bootstrap/external/slurm_launch.c
   mpich2/trunk/src/pm/hydra/tools/bootstrap/include/bsci.h.in
   mpich2/trunk/src/pm/hydra/tools/bootstrap/persist/persist_client.h
   mpich2/trunk/src/pm/hydra/tools/bootstrap/persist/persist_launch.c
   mpich2/trunk/src/pm/hydra/tools/bootstrap/persist/persist_server.c
   mpich2/trunk/src/pm/hydra/tools/bootstrap/src/bsci_launch.c
   mpich2/trunk/src/pm/hydra/utils/launch/launch.c
Log:
Redo the quoting of arguments from r7696 and r7709. We now explicitly
quote the executable (again) before passing it to a remote
launcher. This is similar to the approach used in r7696, but we don't
use chdir anymore.

Modified: mpich2/trunk/src/pm/hydra/include/hydra.h
===================================================================
--- mpich2/trunk/src/pm/hydra/include/hydra.h	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/include/hydra.h	2011-01-14 16:16:54 UTC (rev 7729)
@@ -464,8 +464,8 @@
 
 /* launch */
 struct HYDT_bind_cpuset_t;
-HYD_status HYDU_create_process(const char *base_path, char **client_arg,
-                               struct HYD_env *env_list, int *in, int *out, int *err, int *pid,
+HYD_status HYDU_create_process(char **client_arg, struct HYD_env *env_list,
+                               int *in, int *out, int *err, int *pid,
                                struct HYDT_bind_cpuset_t cpuset);
 
 /* others */

Modified: mpich2/trunk/src/pm/hydra/pm/pmiserv/pmip_cb.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/pmiserv/pmip_cb.c	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/pm/pmiserv/pmip_cb.c	2011-01-14 16:16:54 UTC (rev 7729)
@@ -671,7 +671,7 @@
             client_args[arg++] = NULL;
 
             HYDT_bind_pid_to_cpuset(process_id, &cpuset);
-            status = HYDU_create_process(NULL, client_args, force_env,
+            status = HYDU_create_process(client_args, force_env,
                                          HYD_pmcd_pmip.downstream.pmi_rank[process_id] ? NULL :
                                          &HYD_pmcd_pmip.downstream.in,
                                          &HYD_pmcd_pmip.downstream.out[process_id],

Modified: mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmci.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmci.c	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmci.c	2011-01-14 16:16:54 UTC (rev 7729)
@@ -157,8 +157,7 @@
                        HYD_server_info.user_global.bindlib);
     HYDU_ERR_POP(status, "unable to initializing binding library");
 
-    status = HYDT_bsci_launch_procs(HYD_server_info.base_path, proxy_args, node_list,
-                                    control_fd);
+    status = HYDT_bsci_launch_procs(proxy_args, node_list, control_fd);
     HYDU_ERR_POP(status, "launcher cannot launch processes\n");
 
     for (i = 0, proxy = HYD_server_info.pg_list.proxy_list; proxy; proxy = proxy->next, i++)

Modified: mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v1.c	2011-01-14 16:16:54 UTC (rev 7729)
@@ -551,7 +551,7 @@
     status = HYD_pmcd_pmi_fill_in_exec_launch_info(pg);
     HYDU_ERR_POP(status, "unable to fill in executable arguments\n");
 
-    status = HYDT_bsci_launch_procs(HYD_server_info.base_path, proxy_args, node_list, NULL);
+    status = HYDT_bsci_launch_procs(proxy_args, node_list, NULL);
     HYDU_ERR_POP(status, "launcher cannot launch processes\n");
     HYDU_free_node_list(node_list);
 

Modified: mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v2.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v2.c	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_pmi_v2.c	2011-01-14 16:16:54 UTC (rev 7729)
@@ -732,7 +732,7 @@
     status = HYD_pmcd_pmi_fill_in_exec_launch_info(pg);
     HYDU_ERR_POP(status, "unable to fill in executable arguments\n");
 
-    status = HYDT_bsci_launch_procs(HYD_server_info.base_path, proxy_args, node_list, NULL);
+    status = HYDT_bsci_launch_procs(proxy_args, node_list, NULL);
     HYDU_ERR_POP(status, "launcher cannot launch processes\n");
     HYDU_free_node_list(node_list);
 

Modified: mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_utils.c
===================================================================
--- mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_utils.c	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/pm/pmiserv/pmiserv_utils.c	2011-01-14 16:16:54 UTC (rev 7729)
@@ -12,7 +12,8 @@
 
 HYD_status HYD_pmcd_pmi_fill_in_proxy_args(char **proxy_args, char *control_port, int pgid)
 {
-    int arg, use_ddd, use_valgrind, use_strace;
+    int i, arg, use_ddd, use_valgrind, use_strace;
+    char *path_str[HYD_NUM_TMP_STRINGS];
     HYD_status status = HYD_SUCCESS;
 
     arg = 0;
@@ -44,7 +45,14 @@
         proxy_args[arg++] = HYDU_strdup("-ff");
     }
 
-    proxy_args[arg++] = HYDU_strdup("hydra_pmi_proxy");
+    i = 0;
+    path_str[i++] = HYDU_strdup(HYD_server_info.base_path);
+    path_str[i++] = HYDU_strdup("hydra_pmi_proxy");
+    path_str[i] = NULL;
+    status = HYDU_str_alloc_and_join(path_str, &proxy_args[arg++]);
+    HYDU_ERR_POP(status, "unable to join strings\n");
+    HYDU_free_strlist(path_str);
+
     proxy_args[arg++] = HYDU_strdup("--control-port");
     proxy_args[arg++] = HYDU_strdup(control_port);
 

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/external.h
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/external.h	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/external.h	2011-01-14 16:16:54 UTC (rev 7729)
@@ -14,8 +14,8 @@
 #include "sge.h"
 #include "pbs.h"
 
-HYD_status HYDT_bscd_external_launch_procs(const char *base_path, char **args,
-                                           struct HYD_node *node_list, int *control_fd);
+HYD_status HYDT_bscd_external_launch_procs(char **args, struct HYD_node *node_list,
+                                           int *control_fd);
 HYD_status HYDT_bscd_external_launcher_finalize(void);
 HYD_status HYDT_bscd_external_query_env_inherit(const char *env_name, int *ret);
 HYD_status HYDT_bscd_external_query_native_int(int *ret);

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/external_launch.c
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/external_launch.c	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/external_launch.c	2011-01-14 16:16:54 UTC (rev 7729)
@@ -12,14 +12,15 @@
 
 static int fd_stdout, fd_stderr;
 
-HYD_status HYDT_bscd_external_launch_procs(const char *base_path, char **args,
-                                           struct HYD_node *node_list, int *control_fd)
+HYD_status HYDT_bscd_external_launch_procs(char **args, struct HYD_node *node_list,
+                                           int *control_fd)
 {
     int num_hosts, idx, i, host_idx, fd, exec_idx, offset, lh;
     int *pid, *fd_list, *dummy;
     int sockpair[2];
     struct HYD_node *node;
     char *targs[HYD_NUM_TMP_STRINGS], *path = NULL, *extra_arg_list = NULL, *extra_arg;
+    char quoted_exec_string[HYD_TMP_STRLEN], *original_exec_string;
     struct HYD_env *env = NULL;
     struct HYDT_bind_cpuset_t cpuset;
     HYD_status status = HYD_SUCCESS;
@@ -114,6 +115,14 @@
     for (i = 0; args[i]; i++)
         targs[idx++] = HYDU_strdup(args[i]);
 
+    /* Store the original exec string */
+    original_exec_string = targs[exec_idx];
+
+    /* Create a quoted version of the exec string, which is only used
+     * when the executable is not launched directly, but through an
+     * external launcher */
+    HYDU_snprintf(quoted_exec_string, HYD_TMP_STRLEN, "\"%s\"", targs[exec_idx]);
+
     /* pid_list might already have some PIDs */
     num_hosts = 0;
     for (node = node_list; node; node = node->next)
@@ -190,6 +199,10 @@
         else {
             offset = 0;
 
+            /* We are not launching the executable directly; use the
+             * quoted version */
+            targs[exec_idx] = quoted_exec_string;
+
             /* dummy is NULL only for launchers that can handle a
              * closed stdin socket. Older versions of ssh and SGE seem
              * to have problems when stdin is closed before they are
@@ -210,11 +223,15 @@
         /* The stdin pointer is a dummy value. We don't just pass it
          * NULL, as older versions of ssh seem to freak out when no
          * stdin socket is provided. */
-        status = HYDU_create_process(base_path, targs + offset, env, dummy, &fd_stdout,
-                                     &fd_stderr, &HYD_bscu_pid_list[HYD_bscu_pid_count++],
-                                     cpuset);
+        status = HYDU_create_process(targs + offset, env, dummy, &fd_stdout, &fd_stderr,
+                                     &HYD_bscu_pid_list[HYD_bscu_pid_count++], cpuset);
         HYDU_ERR_POP(status, "create process returned error\n");
 
+        /* Reset to the original exec string */
+        targs[exec_idx] = original_exec_string;
+
+        /* Reset the exec string to the original value */
+
         if (offset && control_fd) {
             close(sockpair[1]);
             HYDU_env_free(env);

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/ll.h
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/ll.h	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/ll.h	2011-01-14 16:16:54 UTC (rev 7729)
@@ -9,8 +9,7 @@
 
 #include "hydra.h"
 
-HYD_status HYDT_bscd_ll_launch_procs(const char *base_path, char **args,
-                                     struct HYD_node *node_list, int *control_fd);
+HYD_status HYDT_bscd_ll_launch_procs(char **args, struct HYD_node *node_list, int *control_fd);
 HYD_status HYDT_bscd_ll_query_proxy_id(int *proxy_id);
 HYD_status HYDT_bscd_ll_query_node_list(struct HYD_node **node_list);
 HYD_status HYDTI_bscd_ll_query_node_count(int *count);

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/ll_launch.c
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/ll_launch.c	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/ll_launch.c	2011-01-14 16:16:54 UTC (rev 7729)
@@ -12,13 +12,12 @@
 
 static int fd_stdout, fd_stderr;
 
-HYD_status HYDT_bscd_ll_launch_procs(const char *base_path, char **args,
-                                     struct HYD_node *node_list, int *control_fd)
+HYD_status HYDT_bscd_ll_launch_procs(char **args, struct HYD_node *node_list, int *control_fd)
 {
     int idx, i, total_procs, node_count;
-    int *pid, *fd_list;
+    int *pid, *fd_list, exec_idx;
     char *targs[HYD_NUM_TMP_STRINGS], *node_list_str = NULL;
-    char *path = NULL, *extra_arg_list = NULL, *extra_arg;
+    char *path = NULL, *extra_arg_list = NULL, *extra_arg, quoted_exec_string[HYD_TMP_STRLEN];
     struct HYD_node *node;
     struct HYDT_bind_cpuset_t cpuset;
     HYD_status status = HYD_SUCCESS;
@@ -66,9 +65,17 @@
     }
 
     /* Fill in the remaining arguments */
+    exec_idx = idx;
     for (i = 0; args[i]; i++)
         targs[idx++] = HYDU_strdup(args[i]);
 
+    /* Create a quoted version of the exec string, which is only used
+     * when the executable is not launched directly, but through an
+     * external launcher */
+    HYDU_snprintf(quoted_exec_string, HYD_TMP_STRLEN, "\"%s\"", targs[exec_idx]);
+    HYDU_FREE(targs[exec_idx]);
+    targs[exec_idx] = quoted_exec_string;
+
     /* Increase pid list to accommodate the new pid */
     HYDU_MALLOC(pid, int *, (HYD_bscu_pid_count + 1) * sizeof(int), status);
     for (i = 0; i < HYD_bscu_pid_count; i++)
@@ -88,7 +95,7 @@
     targs[idx++] = NULL;
 
     HYDT_bind_cpuset_zero(&cpuset);
-    status = HYDU_create_process(base_path, targs, NULL, NULL, &fd_stdout, &fd_stderr,
+    status = HYDU_create_process(targs, NULL, NULL, &fd_stdout, &fd_stderr,
                                  &HYD_bscu_pid_list[HYD_bscu_pid_count++], cpuset);
     HYDU_ERR_POP(status, "create process returned error\n");
 

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/slurm.h
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/slurm.h	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/slurm.h	2011-01-14 16:16:54 UTC (rev 7729)
@@ -9,8 +9,8 @@
 
 #include "hydra.h"
 
-HYD_status HYDT_bscd_slurm_launch_procs(const char *base_path, char **args,
-                                        struct HYD_node *node_list, int *control_fd);
+HYD_status HYDT_bscd_slurm_launch_procs(char **args, struct HYD_node *node_list,
+                                        int *control_fd);
 HYD_status HYDT_bscd_slurm_query_proxy_id(int *proxy_id);
 HYD_status HYDT_bscd_slurm_query_node_list(struct HYD_node **node_list);
 

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/slurm_launch.c
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/slurm_launch.c	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/slurm_launch.c	2011-01-14 16:16:54 UTC (rev 7729)
@@ -59,12 +59,12 @@
     goto fn_exit;
 }
 
-HYD_status HYDT_bscd_slurm_launch_procs(const char *base_path, char **args,
-                                        struct HYD_node *node_list, int *control_fd)
+HYD_status HYDT_bscd_slurm_launch_procs(char **args, struct HYD_node *node_list,
+                                        int *control_fd)
 {
-    int num_hosts, idx, i;
+    int num_hosts, idx, i, exec_idx;
     int *pid, *fd_list;
-    char *targs[HYD_NUM_TMP_STRINGS], *node_list_str = NULL;
+    char *targs[HYD_NUM_TMP_STRINGS], *node_list_str = NULL, quoted_exec_string[HYD_TMP_STRLEN];
     char *path = NULL, *extra_arg_list = NULL, *extra_arg;
     struct HYD_node *node;
     struct HYDT_bind_cpuset_t cpuset;
@@ -114,9 +114,17 @@
     }
 
     /* Fill in the remaining arguments */
+    exec_idx = idx;
     for (i = 0; args[i]; i++)
         targs[idx++] = HYDU_strdup(args[i]);
 
+    /* Create a quoted version of the exec string, which is only used
+     * when the executable is not launched directly, but through an
+     * external launcher */
+    HYDU_snprintf(quoted_exec_string, HYD_TMP_STRLEN, "\"%s\"", targs[exec_idx]);
+    HYDU_FREE(targs[exec_idx]);
+    targs[exec_idx] = quoted_exec_string;
+
     /* Increase pid list to accommodate the new pid */
     HYDU_MALLOC(pid, int *, (HYD_bscu_pid_count + 1) * sizeof(int), status);
     for (i = 0; i < HYD_bscu_pid_count; i++)
@@ -141,7 +149,7 @@
     }
 
     HYDT_bind_cpuset_zero(&cpuset);
-    status = HYDU_create_process(base_path, targs, NULL, NULL, &fd_stdout, &fd_stderr,
+    status = HYDU_create_process(targs, NULL, NULL, &fd_stdout, &fd_stderr,
                                  &HYD_bscu_pid_list[HYD_bscu_pid_count++], cpuset);
     HYDU_ERR_POP(status, "create process returned error\n");
 

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/include/bsci.h.in
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/include/bsci.h.in	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/include/bsci.h.in	2011-01-14 16:16:54 UTC (rev 7729)
@@ -51,8 +51,7 @@
 
     /* Launcher functions */
     /** \brief Launch processes */
-    HYD_status(*launch_procs) (const char *base_path, char **args, struct HYD_node *node_list,
-                               int *control_fd);
+    HYD_status(*launch_procs) (char **args, struct HYD_node *node_list, int *control_fd);
 
     /** \brief Finalize the bootstrap control device */
     HYD_status(*launcher_finalize) (void);
@@ -97,7 +96,6 @@
 /**
  * \brief HYDT_bsci_launch_procs - Launch processes
  *
- * \param[in]   base_path       Base path to launch processes from
  * \param[in]   args            Arguments to be used for the launched processes
  * \param[in]   node_list       List of nodes to launch processes on
  * \param[out]  control_fd      Control socket to communicate with the launched process
@@ -115,8 +113,7 @@
  * but allow proxies to query their ID information on each node using
  * the HYDT_bsci_query_proxy_id function.
  */
-HYD_status HYDT_bsci_launch_procs(const char *base_path, char **args, struct HYD_node *node_list,
-                                  int *control_fd);
+HYD_status HYDT_bsci_launch_procs(char **args, struct HYD_node *node_list, int *control_fd);
 
 
 /**

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/persist/persist_client.h
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/persist/persist_client.h	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/persist/persist_client.h	2011-01-14 16:16:54 UTC (rev 7729)
@@ -11,8 +11,8 @@
 #include "bscu.h"
 #include "persist.h"
 
-HYD_status HYDT_bscd_persist_launch_procs(const char *base_path, char **args,
-                                          struct HYD_node *node_list, int *control_fd);
+HYD_status HYDT_bscd_persist_launch_procs(char **args, struct HYD_node *node_list,
+                                          int *control_fd);
 HYD_status HYDT_bscd_persist_wait_for_completion(int timeout);
 
 extern int *HYDT_bscd_persist_control_fd;

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/persist/persist_launch.c
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/persist/persist_launch.c	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/persist/persist_launch.c	2011-01-14 16:16:54 UTC (rev 7729)
@@ -58,8 +58,8 @@
     goto fn_exit;
 }
 
-HYD_status HYDT_bscd_persist_launch_procs(const char *base_path, char **args,
-                                          struct HYD_node *node_list, int *control_fd)
+HYD_status HYDT_bscd_persist_launch_procs(char **args, struct HYD_node *node_list,
+                                          int *control_fd)
 {
     struct HYD_node *node;
     int idx, i;

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/persist/persist_server.c
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/persist/persist_server.c	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/persist/persist_server.c	2011-01-14 16:16:54 UTC (rev 7729)
@@ -194,7 +194,7 @@
 
     /* spawn process */
     HYDT_bind_cpuset_zero(&cpuset);
-    status = HYDU_create_process(NULL, args, NULL, NULL, &private.stdout_fd,
+    status = HYDU_create_process(args, NULL, NULL, &private.stdout_fd,
                                  &private.stderr_fd, &private.app_pid, cpuset);
     HYDU_ERR_POP(status, "unable to create process\n");
 

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/src/bsci_launch.c
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/src/bsci_launch.c	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/src/bsci_launch.c	2011-01-14 16:16:54 UTC (rev 7729)
@@ -7,14 +7,13 @@
 #include "hydra.h"
 #include "bsci.h"
 
-HYD_status HYDT_bsci_launch_procs(const char *base_path, char **args,
-                                  struct HYD_node *node_list, int *control_fd)
+HYD_status HYDT_bsci_launch_procs(char **args, struct HYD_node *node_list, int *control_fd)
 {
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
 
-    status = HYDT_bsci_fns.launch_procs(base_path, args, node_list, control_fd);
+    status = HYDT_bsci_fns.launch_procs(args, node_list, control_fd);
     HYDU_ERR_POP(status, "launcher returned error while launching processes\n");
 
   fn_exit:

Modified: mpich2/trunk/src/pm/hydra/utils/launch/launch.c
===================================================================
--- mpich2/trunk/src/pm/hydra/utils/launch/launch.c	2011-01-13 23:30:20 UTC (rev 7728)
+++ mpich2/trunk/src/pm/hydra/utils/launch/launch.c	2011-01-14 16:16:54 UTC (rev 7729)
@@ -7,11 +7,11 @@
 #include "hydra.h"
 #include "bind.h"
 
-HYD_status HYDU_create_process(const char *base_path, char **client_arg,
-                               struct HYD_env *env_list, int *in, int *out, int *err, int *pid,
+HYD_status HYDU_create_process(char **client_arg, struct HYD_env *env_list,
+                               int *in, int *out, int *err, int *pid,
                                struct HYDT_bind_cpuset_t cpuset)
 {
-    int inpipe[2], outpipe[2], errpipe[2], tpid, ret;
+    int inpipe[2], outpipe[2], errpipe[2], tpid;
     HYD_status status = HYD_SUCCESS;
 
     HYDU_FUNC_ENTER();
@@ -61,11 +61,6 @@
         status = HYDT_bind_process(cpuset);
         HYDU_ERR_POP(status, "bind process failed\n");
 
-        if (base_path) {
-            ret = chdir(base_path);
-            HYDU_ASSERT(!ret, status);
-        }
-
         if (execvp(client_arg[0], client_arg) < 0) {
             /* The child process should never get back to the proxy
              * code; if there is an error, just throw it here and



More information about the mpich2-commits mailing list