diff --git a/src/common/gres.c b/src/common/gres.c index b3adc07fd270413a2f58372e720e1af605e755b2..4286eb033d6c7f3cf1e2af7ba66160dcf822d9d0 100644 --- a/src/common/gres.c +++ b/src/common/gres.c @@ -148,7 +148,7 @@ static int _job_config_validate(char *config, uint32_t *gres_cnt, static void _job_core_filter(void *job_gres_data, void *node_gres_data, bool use_total_gres, bitstr_t *cpu_bitmap, int cpu_start_bit, int cpu_end_bit, - char *gres_name); + char *gres_name, char *node_name); static int _job_dealloc(void *job_gres_data, void *node_gres_data, int node_offset, char *gres_name, uint32_t job_id, char *node_name); @@ -2463,7 +2463,7 @@ static void _validate_gres_node_cpus(gres_node_state_t *node_gres_ptr, static void _job_core_filter(void *job_gres_data, void *node_gres_data, bool use_total_gres, bitstr_t *cpu_bitmap, int cpu_start_bit, int cpu_end_bit, - char *gres_name) + char *gres_name, char *node_name) { int i, j, cpus_ctld; gres_job_state_t *job_gres_ptr = (gres_job_state_t *) job_gres_data; @@ -2484,6 +2484,8 @@ static void _job_core_filter(void *job_gres_data, void *node_gres_data, (node_gres_ptr->topo_gres_cnt_alloc[i] >= node_gres_ptr->topo_gres_cnt_avail[i])) continue; + cpus_ctld = cpu_end_bit - cpu_start_bit + 1; + _validate_gres_node_cpus(node_gres_ptr, cpus_ctld, node_name); cpus_ctld = bit_size(node_gres_ptr->topo_cpus_bitmap[i]); for (j = 0; j < cpus_ctld; j++) { if (bit_test(node_gres_ptr->topo_cpus_bitmap[i], j)) { @@ -2678,7 +2680,8 @@ extern uint32_t _job_test(void *job_gres_data, void *node_gres_data, extern void gres_plugin_job_core_filter(List job_gres_list, List node_gres_list, bool use_total_gres, bitstr_t *cpu_bitmap, - int cpu_start_bit, int cpu_end_bit) + int cpu_start_bit, int cpu_end_bit, + char *node_name) { int i; ListIterator job_gres_iter, node_gres_iter; @@ -2717,7 +2720,7 @@ extern void gres_plugin_job_core_filter(List job_gres_list, List node_gres_list, node_gres_ptr->gres_data, use_total_gres, cpu_bitmap, cpu_start_bit, cpu_end_bit, - gres_context[i].gres_name); + gres_context[i].gres_name, node_name); break; } } diff --git a/src/common/gres.h b/src/common/gres.h index c0b9835bd358c004d9e55d3d7a211a5ffcdda177..604d55737e88dfb17035c0926cedcd7ab6900902 100644 --- a/src/common/gres.h +++ b/src/common/gres.h @@ -373,11 +373,13 @@ extern int gres_plugin_job_state_unpack(List *gres_list, Buf buffer, * IN/OUT cpu_bitmap - Identification of available CPUs (NULL if no restriction) * IN cpu_start_bit - index into cpu_bitmap for this node's first CPU * IN cpu_end_bit - index into cpu_bitmap for this node's last CPU + * IN node_name - name of the node (for logging) */ extern void gres_plugin_job_core_filter(List job_gres_list, List node_gres_list, bool use_total_gres, bitstr_t *cpu_bitmap, - int cpu_start_bit, int cpu_end_bit); + int cpu_start_bit, int cpu_end_bit, + char *node_name); /* * Determine how many CPUs on the node can be used by this job diff --git a/src/plugins/select/cons_res/job_test.c b/src/plugins/select/cons_res/job_test.c index a99fffba5aedcebd66635e9f2379c192f9e4ef39..a120c072c9458618f35c293539961a9f226b9f34 100644 --- a/src/plugins/select/cons_res/job_test.c +++ b/src/plugins/select/cons_res/job_test.c @@ -660,7 +660,8 @@ uint16_t _can_job_run_on_node(struct job_record *job_ptr, bitstr_t *core_map, gres_list = node_ptr->gres_list; gres_plugin_job_core_filter(job_ptr->gres_list, gres_list, test_only, - core_map, core_start_bit, core_end_bit); + core_map, core_start_bit, core_end_bit, + node_ptr->name); if (cr_type & CR_CORE) { cpus = _allocate_cores(job_ptr, core_map, part_core_map,