diff --git a/NEWS b/NEWS index 82ab76b428981f835a00e00f88d2dcbf559a8f55..a6af07f8d28ca5dc95e05dbd07ae1fe36031b7f0 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,9 @@ documents those changes that are of interest to users and administrators. nodes on new step. -- Don't reject a step if not enough nodes are available. Instead, defer the step until enough nodes are available to satisfy the request. + -- Don't reject a step if it requests at least one specific node that is + already allocated to another step. Instead, defer the step until the + requested node(s) become available. * Changes in Slurm 20.11.7 ========================== diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index f0bf7ac70cdc5fa2e313cae55a48dec860a8111e..c46359d48b6a58ed133c8ea118ba0a2808f670de 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -1267,11 +1267,15 @@ static bitstr_t *_pick_step_nodes(job_record_t *job_ptr, } if (!bit_super_set(selected_nodes, nodes_avail)) { /* - * If some nodes still have some memory allocated - * to other steps, just defer the execution of the - * step + * If some nodes still have some memory or CPUs + * allocated to other steps, just defer the execution + * of the step */ - if (mem_blocked_nodes == 0) { + if (job_blocked_nodes) { + *return_code = ESLURM_NODES_BUSY; + log_flag(STEPS, "%s: some requested nodes %s still have CPUs used by other steps", + __func__, step_spec->node_list); + } else if (mem_blocked_nodes == 0) { *return_code = ESLURM_INVALID_TASK_MEMORY; info("%s: requested nodes %s have inadequate memory", __func__, step_spec->node_list);