From e6c2ef84204f200ad4094a6d12828f3fa628bd5f Mon Sep 17 00:00:00 2001 From: Danny Auble <da@llnl.gov> Date: Wed, 11 Apr 2007 16:44:13 +0000 Subject: [PATCH] remove no longer needed code for SLURM_HOSTFILE --- src/srun/allocate.c | 21 +-------------------- src/srun/srun_job.c | 22 ---------------------- 2 files changed, 1 insertion(+), 42 deletions(-) diff --git a/src/srun/allocate.c b/src/srun/allocate.c index b67655e4f74..68ac0cace24 100644 --- a/src/srun/allocate.c +++ b/src/srun/allocate.c @@ -404,26 +404,7 @@ job_desc_msg_create_from_opts (char *script) j->immediate = opt.immediate; j->name = opt.job_name; j->req_nodes = xstrdup(opt.nodelist); - if (j->req_nodes == NULL) { - char *nodelist = NULL; - char *hostfile = getenv("SLURM_HOSTFILE"); - - if (hostfile != NULL) { - nodelist = slurm_read_hostfile(hostfile, opt.nprocs); - if (nodelist == NULL) { - error("Failure getting NodeNames from " - "hostfile"); - /* FIXME - need to fail somehow */ - } else { - debug("loading nodes from hostfile %s", - hostfile); - opt.nodelist = xstrdup(nodelist); - j->req_nodes = xstrdup(nodelist); - free(nodelist); - opt.distribution = SLURM_DIST_ARBITRARY; - } - } - } + /* simplify the job allocation nodelist, not laying out tasks until step */ if(j->req_nodes) { diff --git a/src/srun/srun_job.c b/src/srun/srun_job.c index 7fa75155639..b6e7fc2adde 100644 --- a/src/srun/srun_job.c +++ b/src/srun/srun_job.c @@ -169,28 +169,6 @@ job_step_create_allocation(uint32_t job_id) ai->jobid = job_id; ai->stepid = NO_VAL; - - if (opt.nodelist == NULL) { - char *nodelist = NULL; - char *hostfile = getenv("SLURM_HOSTFILE"); - - if (hostfile != NULL) { - nodelist = slurm_read_hostfile(hostfile, - opt.max_nodes); - if (nodelist == NULL) { - error("Failure getting NodeNames from " - "hostfile"); - /* FIXME - need to fail somehow */ - } else { - debug("loading nodes from hostfile %s", - hostfile); - opt.nodelist = xstrdup(nodelist); - free(nodelist); - opt.distribution = SLURM_DIST_ARBITRARY; - } - } - } - ai->nodelist = opt.alloc_nodelist; hl = hostlist_create(ai->nodelist); hostlist_uniq(hl); -- GitLab