Skip to content

Commit e4a35f2

Browse files
author
Ralph Castain
authored
Merge pull request #3152 from rhc54/topic/setup
Update launchers to get correct regex
2 parents 086748b + bb574a4 commit e4a35f2

File tree

3 files changed

+15
-32
lines changed

3 files changed

+15
-32
lines changed

orte/mca/plm/lsf/plm_lsf_module.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ static void launch_daemons(int fd, short args, void *cbdata)
243243
*/
244244
opal_argv_append(&nodelist_argc, &nodelist_argv, node->name);
245245
}
246-
nodelist = opal_argv_join(nodelist_argv, ',');
247246

248247
/*
249248
* start building argv array
@@ -258,16 +257,12 @@ static void launch_daemons(int fd, short args, void *cbdata)
258257
/* add the daemon command (as specified by user) */
259258
orte_plm_base_setup_orted_cmd(&argc, &argv);
260259

261-
/* if we have static ports, we need to ensure that mpirun is
262-
* on the list. Since lsf won't be launching a daemon on it,
263-
* it won't have been placed on the list, so create a new
264-
* version here that includes it */
265-
if (orte_static_ports) {
266-
char *ltmp;
267-
asprintf(&ltmp, "%s,%s", orte_process_info.nodename, nodelist);
268-
free(nodelist);
269-
nodelist = ltmp;
270-
}
260+
/* we need mpirun to be the first node on this list - since we
261+
* aren't launching mpirun via TM, it won't be there now */
262+
opal_argv_prepend_nosize(&nodelist_argv, orte_process_info.nodename);
263+
nodelist = opal_argv_join(nodelist_argv, ',');
264+
opal_argv_free(nodelist_argv);
265+
271266

272267
/* Add basic orted command line options */
273268
orte_plm_base_orted_append_basic_args(&argc, &argv,

orte/mca/plm/slurm/plm_slurm_module.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ static void launch_daemons(int fd, short args, void *cbdata)
323323
goto cleanup;
324324
}
325325
nodelist_flat = opal_argv_join(nodelist_argv, ',');
326-
opal_argv_free(nodelist_argv);
327326

328327
/* if we are using all allocated nodes, then srun doesn't
329328
* require any further arguments
@@ -354,16 +353,12 @@ static void launch_daemons(int fd, short args, void *cbdata)
354353
/* add the daemon command (as specified by user) */
355354
orte_plm_base_setup_orted_cmd(&argc, &argv);
356355

357-
/* if we have static ports, we need to ensure that mpirun is
358-
* on the list. Since slurm won't be launching a daemon on it,
359-
* it won't have been placed on the list, so create a new
360-
* version here that includes it */
361-
if (orte_static_ports) {
362-
char *ltmp;
363-
asprintf(&ltmp, "%s,%s", orte_process_info.nodename, nodelist_flat);
364-
free(nodelist_flat);
365-
nodelist_flat = ltmp;
366-
}
356+
/* we need mpirun to be the first node on this list - since we
357+
* aren't launching mpirun via srun, it won't be there now */
358+
opal_argv_prepend_nosize(&nodelist_argv, orte_process_info.nodename);
359+
free(nodelist_flat);
360+
nodelist_flat = opal_argv_join(nodelist_argv, ',');
361+
opal_argv_free(nodelist_argv);
367362

368363
/* Add basic orted command line options, including debug flags */
369364
orte_plm_base_orted_append_basic_args(&argc, &argv,

orte/mca/plm/tm/plm_tm_module.c

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -275,19 +275,12 @@ static void launch_daemons(int fd, short args, void *cbdata)
275275
/* add to list */
276276
opal_argv_append_nosize(&nodeargv, node->name);
277277
}
278+
/* we need mpirun to be the first node on this list - since we
279+
* aren't launching mpirun via TM, it won't be there now */
280+
opal_argv_prepend_nosize(&nodeargv, orte_process_info.nodename);
278281
nodelist = opal_argv_join(nodeargv, ',');
279282
opal_argv_free(nodeargv);
280283

281-
/* if we have static ports, we need to ensure that mpirun is
282-
* on the list. Since Torque won't be launching a daemon on it,
283-
* it won't have been placed on the list, so create a new
284-
* version here that includes it */
285-
if (orte_static_ports) {
286-
char *ltmp;
287-
asprintf(&ltmp, "%s,%s", orte_process_info.nodename, nodelist);
288-
free(nodelist);
289-
nodelist = ltmp;
290-
}
291284

292285
/* Add basic orted command line options */
293286
orte_plm_base_orted_append_basic_args(&argc, &argv, "tm",

0 commit comments

Comments
 (0)