Skip to content
Snippets Groups Projects
Commit f93fe603 authored by Danny Auble's avatar Danny Auble
Browse files

mods to make the step node list unique and more readable

parent 9453a5d9
No related branches found
No related tags found
No related merge requests found
......@@ -401,7 +401,7 @@ extern int task_layout(slurm_step_layout_t *step_layout)
slurm_conf_get_addr(step_layout->host[i],
&step_layout->node_addr[i]);
debug("host %d = %s", i, step_layout->host[i]);
debug2("host %d = %s", i, step_layout->host[i]);
step_layout->cpus[i] = step_layout->cpus_per_node[cpu_inx];
if ((++cpu_cnt) >= step_layout->cpu_count_reps[cpu_inx]) {
/* move to next record */
......@@ -454,10 +454,10 @@ static int _task_layout_hostfile(slurm_step_layout_t *step_layout)
hostlist_t job_alloc_hosts = NULL;
hostlist_t step_alloc_hosts = NULL;
debug("job list is %s", step_layout->nodes);
debug2("job list is %s", step_layout->nodes);
job_alloc_hosts = hostlist_create(step_layout->nodes);
itr = hostlist_iterator_create(job_alloc_hosts);
debug("list is %s", step_layout->arbitrary_nodes);
debug2("list is %s", step_layout->arbitrary_nodes);
step_alloc_hosts = hostlist_create(step_layout->arbitrary_nodes);
if(hostlist_count(step_alloc_hosts) != step_layout->num_tasks) {
error("Asked for %d tasks have %d in the nodelist. "
......
......@@ -688,14 +688,14 @@ step_create(job_step_create_request_msg_t *step_specs,
/* set the step_record values */
/* Here is where the node list is set for the job */
if(step_specs->node_list
&& step_specs->task_dist == SLURM_DIST_ARBITRARY)
&& step_specs->task_dist == SLURM_DIST_ARBITRARY) {
step_ptr->step_node_list = xstrdup(step_specs->node_list);
else {
xfree(step_specs->node_list);
} else {
step_ptr->step_node_list = bitmap2node_name(nodeset);
step_specs->node_list = xstrdup(step_ptr->step_node_list);
}
//xfree(step_specs->node_list);
//step_specs->node_list = bitmap2node_name(nodeset);
step_specs->node_list = bitmap2node_name(nodeset);
step_ptr->step_node_bitmap = nodeset;
step_ptr->cyclic_alloc =
(uint16_t) (step_specs->task_dist == SLURM_DIST_CYCLIC);
......@@ -742,6 +742,12 @@ step_create(job_step_create_request_msg_t *step_specs,
delete_step_record (job_ptr, step_ptr->step_id);
return ESLURM_INTERCONNECT_FAILURE;
}
/* FIXME: this var should be removed all together once the
switch_build_jobinfo is rewritten to take the step_layout
structure */
xfree(step_ptr->step_node_list);
step_ptr->step_node_list =
xstrdup(step_ptr->step_layout->nodes);
}
if (checkpoint_alloc_jobinfo (&step_ptr->check_job) < 0)
fatal ("step_create: checkpoint_alloc_jobinfo error");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment