diff --git a/src/plugins/select/cray/other_select.c b/src/plugins/select/cray/other_select.c index 29d1c10071a26d979e0f8c1cb5cfe63707a1f5f8..22a4ebab8bdfe672317414c0a181f7e0126a0367 100644 --- a/src/plugins/select/cray/other_select.c +++ b/src/plugins/select/cray/other_select.c @@ -112,6 +112,7 @@ static slurm_select_ops_t *_other_select_get_ops(slurm_select_context_t *c) "select_p_update_node_state", "select_p_alter_node_cnt", "select_p_reconfigure", + "select_p_resv_test", }; int n_syms = sizeof(syms) / sizeof(char *); @@ -730,3 +731,22 @@ extern int other_reconfigure (void) return (*(other_select_context->ops.reconfigure))(); } + +/* + * other_resv_test - Identify the nodes which "best" satisfy a reservation + * request. "best" is defined as either single set of consecutive nodes + * satisfying the request and leaving the minimum number of unused nodes + * OR the fewest number of consecutive node sets + * IN avail_bitmap - nodes available for the reservation + * IN node_cnt - count of required nodes + * RET - nodes selected for use by the reservation + */ +extern bitstr_t * other_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) +{ + if (other_select_init() < 0) + return SLURM_ERROR; + + return (*(other_select_context->ops.select_resv_test)) (avail_bitmap, + node_cnt); +} + diff --git a/src/plugins/select/cray/other_select.h b/src/plugins/select/cray/other_select.h index d6509eca5ae7d10d525853d2a1cc842cedfed706..df631143f1f1d71dfa728dde08827ba4d03204fd 100644 --- a/src/plugins/select/cray/other_select.h +++ b/src/plugins/select/cray/other_select.h @@ -326,4 +326,15 @@ extern int other_pack_select_info(time_t last_query_time, uint16_t show_flags, /* Note reconfiguration or change in partition configuration */ extern int other_reconfigure(void); +/* + * other_resv_test - Identify the nodes which "best" satisfy a reservation + * request. "best" is defined as either single set of consecutive nodes + * satisfying the request and leaving the minimum number of unused nodes + * OR the fewest number of consecutive node sets + * IN avail_bitmap - nodes available for the reservation + * IN node_cnt - count of required nodes + * RET - nodes selected for use by the reservation + */ +extern bitstr_t * other_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt); + #endif /* _CRAY_OTHER_SELECT_H */ diff --git a/src/plugins/select/cray/select_cray.c b/src/plugins/select/cray/select_cray.c index a8242e0967dd23f322a9f0e0056050163209b16d..ef788696f1281c405f261256a0d22a4bc6ff1cf4 100644 --- a/src/plugins/select/cray/select_cray.c +++ b/src/plugins/select/cray/select_cray.c @@ -656,3 +656,17 @@ extern int select_p_reconfigure(void) { return other_reconfigure(); } + +/* + * select_p_resv_test - Identify the nodes which "best" satisfy a reservation + * request. "best" is defined as either single set of consecutive nodes + * satisfying the request and leaving the minimum number of unused nodes + * OR the fewest number of consecutive node sets + * IN avail_bitmap - nodes available for the reservation + * IN node_cnt - count of required nodes + * RET - nodes selected for use by the reservation + */ +extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) +{ + return other_resv_test(avail_bitmap, node_cnt); +} diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index adb370868479f8f516c88c6ef78f11a49ef19a51..ec646e66e6946dfa0d3bc554427166ddd8895563 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -2888,6 +2888,7 @@ extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) } return bit_pick_cnt(avail_bitmap, node_cnt); } + /* * _resv_test_topo - A topology aware node selection function * NOTE: The logic here is almost identical to that of _job_test_topo()