Skip to content
Snippets Groups Projects
Commit 583fb417 authored by Moe Jette's avatar Moe Jette
Browse files

Remove block_len return value from ba_geo_test_all()

Remove the block_len argument to the function ba_geo_test_all()
and use the geometry information passed into the function for
equivalent information
parent 38542071
No related branches found
No related tags found
No related merge requests found
......@@ -1005,7 +1005,6 @@ extern ba_mp_t *ba_pick_sub_block_cnodes(
int scan_offset = 0;
uint16_t dont_pass[ba_mp_geo_system->dim_count];
uint16_t start_pos[ba_mp_geo_system->dim_count];
uint16_t block_len[ba_mp_geo_system->dim_count];
#if 1
/* if deny_pass argument is NULL, default is to
* deny passthroughs in all dimensions */
......@@ -1016,7 +1015,7 @@ extern ba_mp_t *ba_pick_sub_block_cnodes(
&jobinfo->units_used,
geo_table, &cnt,
ba_mp_geo_system, dont_pass,
start_pos, block_len, &scan_offset)
start_pos, &scan_offset)
!= SLURM_SUCCESS) {
geo_table = geo_table->next_ptr;
continue;
......@@ -1024,8 +1023,9 @@ extern ba_mp_t *ba_pick_sub_block_cnodes(
#if 0
info("scan_offset=%d", scan_offset);
for (dim=0; dim < ba_mp_geo_system->dim_count; dim++) {
info("start_pos[%d]=%u block_len[%d}=%u",
dim, start_pos[dim], dim, block_len[dim]);
info("start_pos[%d]=%u geometry[%d}=%u",
dim, start_pos[dim], dim,
geo_table->geometry[dim]);
}
#endif
bit_or(ba_mp->cnode_bitmap, jobinfo->units_used);
......
......@@ -378,8 +378,7 @@ static int _geo_test_maps(bitstr_t *node_bitmap,
bitstr_t **alloc_node_bitmap,
ba_geo_table_t *geo_req, int *attempt_cnt,
ba_geo_system_t *my_geo_system, uint16_t *deny_pass,
uint16_t *start_pos, uint16_t *block_len,
int *scan_offset)
uint16_t *start_pos, int *scan_offset)
{
int i, current_offset = -1;
ba_geo_combos_t *geo_array[my_geo_system->dim_count];
......@@ -443,10 +442,8 @@ static int _geo_test_maps(bitstr_t *node_bitmap,
return SLURM_ERROR;
}
for (i = 0; i < my_geo_system->dim_count; i++) {
if (block_len)
block_len[i] = geo_req->geometry[i];
if (start_pos) {
if (start_pos) {
for (i = 0; i < my_geo_system->dim_count; i++) {
start_pos[i] = geo_array[i]->
start_coord[geo_array_inx[i]];
}
......@@ -1415,9 +1412,6 @@ extern char *ba_node_map_ranged_hostlist(bitstr_t *node_bitmap,
* IN/OUT start_pos - input is pointer to array having same size as
* dimension count or NULL. Set to starting coordinates of
* the allocation in each dimension.
* IN/OUT block_len - input is pointer to array having same size as
* dimension count or NULL. Set to size of the allocation in
* each dimension.
* IN/OUT scan_offset - Location in search table from which to continue
* searching for resources. Initial value should be zero. If the
* allocation selected by the algorithm is not acceptable, call
......@@ -1429,8 +1423,7 @@ extern int ba_geo_test_all(bitstr_t *node_bitmap,
bitstr_t **alloc_node_bitmap,
ba_geo_table_t *geo_req, int *attempt_cnt,
ba_geo_system_t *my_geo_system, uint16_t *deny_pass,
uint16_t *start_pos, uint16_t *block_len,
int *scan_offset)
uint16_t *start_pos, int *scan_offset)
{
int rc;
......@@ -1442,7 +1435,7 @@ extern int ba_geo_test_all(bitstr_t *node_bitmap,
*attempt_cnt = 0;
rc = _geo_test_maps(node_bitmap, alloc_node_bitmap, geo_req,
attempt_cnt, my_geo_system, deny_pass,
start_pos, block_len, scan_offset);
start_pos, scan_offset);
return rc;
}
......
......@@ -353,9 +353,6 @@ extern char *ba_node_map_ranged_hostlist(bitstr_t *node_bitmap,
* IN/OUT start_pos - input is pointer to array having same size as
* dimension count or NULL. Set to starting coordinates of
* the allocation in each dimension.
* IN/OUT block_len - input is pointer to array having same size as
* dimension count or NULL. Set to size of the allocation in
* each dimension.
* IN/OUT scan_offset - Location in search table from which to continue
* searching for resources. Initial value should be zero. If the
* allocation selected by the algorithm is not acceptable, call
......@@ -367,8 +364,7 @@ extern int ba_geo_test_all(bitstr_t *node_bitmap,
bitstr_t **alloc_node_bitmap,
ba_geo_table_t *geo_req, int *attempt_cnt,
ba_geo_system_t *my_geo_system, uint16_t *deny_pass,
uint16_t *start_pos, uint16_t *block_len,
int *scan_offset);
uint16_t *start_pos, int *scan_offset);
/*
* Used to set all midplanes in a special used state except the ones
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment