[mpich2-commits] r8053 - mpich2/trunk/src/pm/hydra/tools/bootstrap/external

balaji at mcs.anl.gov balaji at mcs.anl.gov
Fri Feb 25 20:46:36 CST 2011


Author: balaji
Date: 2011-02-25 20:46:36 -0600 (Fri, 25 Feb 2011)
New Revision: 8053

Modified:
   mpich2/trunk/src/pm/hydra/tools/bootstrap/external/slurm_launch.c
Log:
SLURM does not like it if the arguments are quoted. It seems to
internally handle it fine.

Modified: mpich2/trunk/src/pm/hydra/tools/bootstrap/external/slurm_launch.c
===================================================================
--- mpich2/trunk/src/pm/hydra/tools/bootstrap/external/slurm_launch.c	2011-02-25 17:19:47 UTC (rev 8052)
+++ mpich2/trunk/src/pm/hydra/tools/bootstrap/external/slurm_launch.c	2011-02-26 02:46:36 UTC (rev 8053)
@@ -62,10 +62,9 @@
 HYD_status HYDT_bscd_slurm_launch_procs(char **args, struct HYD_proxy *proxy_list,
                                         int *control_fd)
 {
-    int num_hosts, idx, i, exec_idx;
+    int num_hosts, idx, i;
     int *pid, *fd_list;
-    char *targs[HYD_NUM_TMP_STRINGS], *node_list_str = NULL,
-        quoted_exec_string[HYD_TMP_STRLEN];
+    char *targs[HYD_NUM_TMP_STRINGS], *node_list_str = NULL;
     char *path = NULL, *extra_arg_list = NULL, *extra_arg;
     struct HYD_proxy *proxy;
     struct HYDT_bind_cpuset_t cpuset;
@@ -115,17 +114,11 @@
     }
 
     /* Fill in the remaining arguments */
-    exec_idx = idx;
+    /* We do not need to create a quoted version of the string for
+     * SLURM. It seems to be internally quoting it anyway. */
     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++)



More information about the mpich2-commits mailing list