From cfe2e2880619e220a321532213318b557d1a238d Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Fri, 29 Oct 2004 16:15:34 +0000 Subject: [PATCH] Modify select/bluegene to honor job's required node list. --- NEWS | 1 + src/plugins/select/bluegene/bluegene.c | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index e8e9f4ee87e..f243eb6e9ce 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,7 @@ documents those changes that are of interest to users and admins. (e.g. Blue Gene) -- Fix srun bug when --input, --output and --error are all "none" -- Don't schedule jobs for user root if partition is DOWN + -- Modify select/bluegene to honor job's required node list * Changes in SLURM 0.4.0-pre3 ============================= diff --git a/src/plugins/select/bluegene/bluegene.c b/src/plugins/select/bluegene/bluegene.c index 23ecff3feaf..dc3e3e4c761 100644 --- a/src/plugins/select/bluegene/bluegene.c +++ b/src/plugins/select/bluegene/bluegene.c @@ -56,9 +56,10 @@ _STMT_START { \ /** some local functions */ static int _copy_slurm_partition_list(List slurm_part_list); -static int _find_best_partition_match(struct job_record* job_ptr, bitstr_t* slurm_part_bitmap, - int min_nodes, int max_nodes, - int spec, bgl_record_t** found_bgl_record); +static int _find_best_partition_match(struct job_record* job_ptr, + bitstr_t* slurm_part_bitmap, + int min_nodes, int max_nodes, + int spec, bgl_record_t** found_bgl_record); static int _parse_request(char* request_string, partition_t** request); static int _wire_bgl_partitions(void); static int _bgl_record_cmpf_inc(bgl_record_t* rec_a, bgl_record_t* rec_b); @@ -698,7 +699,18 @@ static int _find_best_partition_match(struct job_record* job_ptr, * SLURM partition not available to this job. */ if (!bit_super_set(record->bitmap, slurm_part_bitmap)) { - debug("bgl partition %s has nodes not usable by this job", + debug("bgl partition %s has nodes not usable by this " + "job", record->nodes); + continue; + } + + /* + * Insure that any required nodes are in this BGL partition + */ + if (job_ptr->details->req_node_bitmap + && (!bit_super_set(job_ptr->details->req_node_bitmap, + record->bitmap))) { + info("bgl partition %s lacks required nodes", record->nodes); continue; } -- GitLab