From 583fb4176902cccbdd31321b95846024a00f7f16 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Tue, 24 May 2011 12:47:38 -0700 Subject: [PATCH] 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 --- .../select/bluegene/ba_bgq/block_allocator.c | 8 ++++---- src/plugins/select/bluegene/ba_common.c | 17 +++++------------ src/plugins/select/bluegene/ba_common.h | 6 +----- 3 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/plugins/select/bluegene/ba_bgq/block_allocator.c b/src/plugins/select/bluegene/ba_bgq/block_allocator.c index 1179c91ee61..9b76385821a 100644 --- a/src/plugins/select/bluegene/ba_bgq/block_allocator.c +++ b/src/plugins/select/bluegene/ba_bgq/block_allocator.c @@ -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); diff --git a/src/plugins/select/bluegene/ba_common.c b/src/plugins/select/bluegene/ba_common.c index 4088f8fcb1f..be93b37e408 100644 --- a/src/plugins/select/bluegene/ba_common.c +++ b/src/plugins/select/bluegene/ba_common.c @@ -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; } diff --git a/src/plugins/select/bluegene/ba_common.h b/src/plugins/select/bluegene/ba_common.h index 9e8f90b0525..471e98f73a4 100644 --- a/src/plugins/select/bluegene/ba_common.h +++ b/src/plugins/select/bluegene/ba_common.h @@ -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 -- GitLab