From b360c98afdc62e30be42f0ba37d90b0bc079f9cb Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 9 Aug 2011 22:42:27 +0000 Subject: [PATCH] Per request from Pasha, revert r25004 - but modified a touch to reflect fact that opal_argv_append copies the provided string, so we don't need to print it and then free it. This commit was SVN r25037. The following SVN revision numbers were found above: r25004 --> open-mpi/ompi@2418831bea4ac196d6dad6c670dac37399ad5de9 --- orte/mca/plm/alps/plm_alps_module.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/orte/mca/plm/alps/plm_alps_module.c b/orte/mca/plm/alps/plm_alps_module.c index 2f75ceba88..093e6cf56b 100644 --- a/orte/mca/plm/alps/plm_alps_module.c +++ b/orte/mca/plm/alps/plm_alps_module.c @@ -138,7 +138,6 @@ static int plm_alps_launch_job(orte_job_t *jdata) int rc; char *tmp; char** env = NULL; - char* var; char *nodelist_flat; char **nodelist_argv; int nodelist_argc; @@ -255,10 +254,14 @@ static int plm_alps_launch_job(orte_job_t *jdata) } nodelist_flat = opal_argv_join(nodelist_argv, ','); opal_argv_free(nodelist_argv); - opal_argv_append(&argc, &argv, "-L"); - asprintf(&tmp, "%s", nodelist_flat); - opal_argv_append(&argc, &argv, tmp); - free(tmp); + + /* if we are using all allocated nodes, then alps + * doesn't need a nodelist + */ + if (map->num_new_daemons < orte_num_allocated_nodes) { + opal_argv_append(&argc, &argv, "-L"); + opal_argv_append(&argc, &argv, nodelist_flat); + } /* @@ -304,7 +307,7 @@ static int plm_alps_launch_job(orte_job_t *jdata) don't support different --prefix'es for different nodes in the ALPS plm) */ cur_prefix = NULL; - for (i=0; i < jdata->num_apps; i++) { + for (i=0; i < (int)jdata->num_apps; i++) { char * app_prefix_dir = apps[i]->prefix_dir; /* Check for already set cur_prefix_dir -- if different, complain */