|
Lines 372-377
Link Here
|
| 372 |
cpus = job_res->cpus[i]; |
372 |
cpus = job_res->cpus[i]; |
| 373 |
vpus = MIN(select_node_record[n].vpus, ntasks_per_core); |
373 |
vpus = MIN(select_node_record[n].vpus, ntasks_per_core); |
| 374 |
|
374 |
|
|
|
375 |
/* compute still required cores on the node */ |
| 376 |
req_cpus = cpus / vpus; |
| 377 |
if ( cpus % vpus ) |
| 378 |
req_cpus++; |
| 379 |
|
| 375 |
if (nboards_nb > MAX_BOARDS) { |
380 |
if (nboards_nb > MAX_BOARDS) { |
| 376 |
debug3("cons_res: node[%u]: exceeds max boards; " |
381 |
debug3("cons_res: node[%u]: exceeds max boards; " |
| 377 |
"doing best-fit across sockets only", n); |
382 |
"doing best-fit across sockets only", n); |
|
Lines 419-425
Link Here
|
| 419 |
count = 0; |
424 |
count = 0; |
| 420 |
for (b = 0; b < nboards_nb; b++) { |
425 |
for (b = 0; b < nboards_nb; b++) { |
| 421 |
count+=sort_brds_cpu_cnt[b]; |
426 |
count+=sort_brds_cpu_cnt[b]; |
| 422 |
if (count >= cpus) |
427 |
if (count >= req_cpus) |
| 423 |
break; |
428 |
break; |
| 424 |
} |
429 |
} |
| 425 |
b_min = b+1; |
430 |
b_min = b+1; |
|
Lines 445-451
Link Here
|
| 445 |
+ comb_brd_idx]; |
450 |
+ comb_brd_idx]; |
| 446 |
count += boards_cpu_cnt[board_num]; |
451 |
count += boards_cpu_cnt[board_num]; |
| 447 |
} |
452 |
} |
| 448 |
if (count >= cpus) { |
453 |
if (count >= req_cpus) { |
| 449 |
elig_brd_combs[elig] = comb_idx; |
454 |
elig_brd_combs[elig] = comb_idx; |
| 450 |
elig_cpu_cnt[elig] = count; |
455 |
elig_cpu_cnt[elig] = count; |
| 451 |
elig++; |
456 |
elig++; |
|
Lines 490-496
Link Here
|
| 490 |
sock_idx = |
495 |
sock_idx = |
| 491 |
socket_list[(int)((elig_idx*sock_per_comb)+b)]; |
496 |
socket_list[(int)((elig_idx*sock_per_comb)+b)]; |
| 492 |
count+=sockets_cpu_cnt[sock_idx]; |
497 |
count+=sockets_cpu_cnt[sock_idx]; |
| 493 |
if (count >= cpus) |
498 |
if (count >= req_cpus) |
| 494 |
break; |
499 |
break; |
| 495 |
} |
500 |
} |
| 496 |
b++; |
501 |
b++; |
|
Lines 508-514
Link Here
|
| 508 |
debug3("cons_res: best_fit: node[%u]: required cpus: %u, " |
513 |
debug3("cons_res: best_fit: node[%u]: required cpus: %u, " |
| 509 |
"min req boards: %u,", n, cpus, b_min); |
514 |
"min req boards: %u,", n, cpus, b_min); |
| 510 |
debug3("cons_res: best_fit: node[%u]: min req sockets: %u, " |
515 |
debug3("cons_res: best_fit: node[%u]: min req sockets: %u, " |
| 511 |
"min avail cpus: %u", n, s_min, cpu_min); |
516 |
"min avail cores: %u", n, s_min, cpu_min); |
| 512 |
/* Re-sort socket list for best-fit board combination in |
517 |
/* Re-sort socket list for best-fit board combination in |
| 513 |
* ascending order of socket number */ |
518 |
* ascending order of socket number */ |
| 514 |
qsort(&socket_list[comb_min * sock_per_comb], sock_per_comb, |
519 |
qsort(&socket_list[comb_min * sock_per_comb], sock_per_comb, |
|
Lines 525-535
Link Here
|
| 525 |
best_fit_cpus = 0; |
530 |
best_fit_cpus = 0; |
| 526 |
best_fit_sufficient = false; |
531 |
best_fit_sufficient = false; |
| 527 |
|
532 |
|
| 528 |
/* compute still required cores on the node */ |
|
|
| 529 |
req_cpus = cpus / vpus; |
| 530 |
if ( cpus % vpus ) |
| 531 |
req_cpus++; |
| 532 |
|
| 533 |
/* search for the best socket, */ |
533 |
/* search for the best socket, */ |
| 534 |
/* starting from the last one to let more room */ |
534 |
/* starting from the last one to let more room */ |
| 535 |
/* in the first one for system usage */ |
535 |
/* in the first one for system usage */ |