Skip to content
Snippets Groups Projects
Commit cb8402cc authored by Danny Auble's avatar Danny Auble
Browse files
parent fd680bf8
No related branches found
No related tags found
No related merge requests found
......@@ -237,6 +237,8 @@ documents those changes that are of interest to users and admins.
* Changes in SLURM 1.1.30
=========================
- Fix to make sure users don't include and exclude the same node in their srun
line.
* Changes in SLURM 1.1.29
=========================
......
......@@ -198,11 +198,14 @@ job_step_create_allocation(uint32_t job_id)
if (opt.exc_nodes) {
hostlist_t exc_hl = hostlist_create(opt.exc_nodes);
hostlist_t inc_hl = NULL;
char *node_name = NULL;
hl = hostlist_create(ai->nodelist);
if(opt.nodelist)
if(opt.nodelist) {
hostlist_push(hl, opt.nodelist);
inc_hl = hostlist_create(opt.nodelist);
}
hostlist_uniq(hl);
//info("using %s or %s", opt.nodelist, ai->nodelist);
while ((node_name = hostlist_shift(exc_hl))) {
......@@ -212,13 +215,28 @@ job_step_create_allocation(uint32_t job_id)
hostlist_delete_nth(hl, inx);
ai->nnodes--; /* decrement node count */
}
if(inc_hl) {
inx = hostlist_find(inc_hl, node_name);
if (inx >= 0) {
error("Requested node %s is also "
"in the excluded list.",
node_name);
error("Job not submitted.");
hostlist_destroy(exc_hl);
hostlist_destroy(inc_hl);
goto error;
}
}
free(node_name);
}
hostlist_destroy(exc_hl);
if(inc_hl)
hostlist_destroy(inc_hl);
if(!hostlist_count(hl)) {
error("Hostlist is now nothing! Can't run job.");
return NULL;
hostlist_destroy(hl);
goto error;
}
hostlist_destroy(exc_hl);
hostlist_ranged_string(hl, sizeof(buf), buf);
hostlist_destroy(hl);
xfree(opt.nodelist);
......@@ -237,6 +255,7 @@ job_step_create_allocation(uint32_t job_id)
hostlist_uniq(hl);
if(!hostlist_count(hl)) {
error("Hostlist is now nothing! Can not run job.");
hostlist_destroy(hl);
return NULL;
}
hostlist_ranged_string(hl, sizeof(buf), buf);
......
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