|
Lines 2836-2841
extern int cr_job_test(struct job_record *job_ptr, bitstr_t *node_bitmap,
Link Here
|
| 2836 |
uint16_t *layout_ptr = NULL; |
2836 |
uint16_t *layout_ptr = NULL; |
| 2837 |
bitstr_t *orig_map, *avail_cores, *free_cores, *part_core_map = NULL; |
2837 |
bitstr_t *orig_map, *avail_cores, *free_cores, *part_core_map = NULL; |
| 2838 |
bitstr_t *tmpcore = NULL, *reqmap = NULL; |
2838 |
bitstr_t *tmpcore = NULL, *reqmap = NULL; |
|
|
2839 |
bitstr_t *free_cores_tmp, *node_bitmap_tmp; |
| 2839 |
bool test_only; |
2840 |
bool test_only; |
| 2840 |
uint32_t c, j, k, n, csize, total_cpus, save_mem = 0; |
2841 |
uint32_t c, j, k, n, csize, total_cpus, save_mem = 0; |
| 2841 |
int32_t build_cnt; |
2842 |
int32_t build_cnt; |
|
Lines 2843-2848
extern int cr_job_test(struct job_record *job_ptr, bitstr_t *node_bitmap,
Link Here
|
| 2843 |
struct job_details *details_ptr; |
2844 |
struct job_details *details_ptr; |
| 2844 |
struct part_res_record *p_ptr, *jp_ptr; |
2845 |
struct part_res_record *p_ptr, *jp_ptr; |
| 2845 |
uint16_t *cpu_count; |
2846 |
uint16_t *cpu_count; |
|
|
2847 |
uint16_t *cpu_count_tmp; |
| 2846 |
int i, first, last; |
2848 |
int i, first, last; |
| 2847 |
|
2849 |
|
| 2848 |
if (gang_mode == -1) { |
2850 |
if (gang_mode == -1) { |
|
Lines 3176-3181
extern int cr_job_test(struct job_record *job_ptr, bitstr_t *node_bitmap,
Link Here
|
| 3176 |
info("cons_res: cr_job_test: test 3 pass - " |
3178 |
info("cons_res: cr_job_test: test 3 pass - " |
| 3177 |
"found resources"); |
3179 |
"found resources"); |
| 3178 |
} |
3180 |
} |
|
|
3181 |
free_cores_tmp = bit_copy(free_cores); |
| 3182 |
node_bitmap_tmp = bit_copy(node_bitmap); |
| 3183 |
for (p_ptr = cr_part_ptr; p_ptr; p_ptr = p_ptr->next) { |
| 3184 |
if (p_ptr->part_ptr->priority >= |
| 3185 |
jp_ptr->part_ptr->priority) |
| 3186 |
continue; |
| 3187 |
if (!p_ptr->row) |
| 3188 |
continue; |
| 3189 |
for (i = 0; i < p_ptr->num_rows; i++) { |
| 3190 |
if (!p_ptr->row[i].row_bitmap) |
| 3191 |
continue; |
| 3192 |
bit_copybits(tmpcore, |
| 3193 |
p_ptr->row[i].row_bitmap); |
| 3194 |
bit_not(tmpcore); /* set bits now "free" resources */ |
| 3195 |
bit_and(free_cores_tmp, tmpcore); |
| 3196 |
} |
| 3197 |
if (job_ptr->details->whole_node == 1) { |
| 3198 |
_block_whole_nodes(node_bitmap_tmp, avail_cores, |
| 3199 |
free_cores_tmp); |
| 3200 |
} |
| 3201 |
cpu_count_tmp = _select_nodes(job_ptr, min_nodes, |
| 3202 |
max_nodes, req_nodes, |
| 3203 |
node_bitmap_tmp, cr_node_cnt, |
| 3204 |
free_cores_tmp, node_usage, |
| 3205 |
cr_type, test_only, |
| 3206 |
part_core_map, |
| 3207 |
prefer_alloc_nodes); |
| 3208 |
if (!cpu_count_tmp) |
| 3209 |
break; |
| 3210 |
if (select_debug_flags & DEBUG_FLAG_SELECT_TYPE) { |
| 3211 |
info("cons_res: cr_job_test: remove low-priority partition %s", |
| 3212 |
p_ptr->part_ptr->name); |
| 3213 |
} |
| 3214 |
bit_copybits(free_cores, free_cores_tmp); |
| 3215 |
bit_copybits(node_bitmap, node_bitmap_tmp); |
| 3216 |
xfree(cpu_count); |
| 3217 |
cpu_count = cpu_count_tmp; |
| 3218 |
} |
| 3219 |
FREE_NULL_BITMAP(free_cores_tmp); |
| 3220 |
FREE_NULL_BITMAP(node_bitmap_tmp); |
| 3179 |
goto alloc_job; |
3221 |
goto alloc_job; |
| 3180 |
} |
3222 |
} |
| 3181 |
if (select_debug_flags & DEBUG_FLAG_SELECT_TYPE) { |
3223 |
if (select_debug_flags & DEBUG_FLAG_SELECT_TYPE) { |