diff --git a/src/plugins/select/bluegene/ba_bgq/block_allocator.c b/src/plugins/select/bluegene/ba_bgq/block_allocator.c index 3b6ecf6312c734a49d7e01eb3cbfb544cdcc9dd7..e041ac1572d738a8249f9474778be074950d7b39 100644 --- a/src/plugins/select/bluegene/ba_bgq/block_allocator.c +++ b/src/plugins/select/bluegene/ba_bgq/block_allocator.c @@ -232,7 +232,6 @@ extern ba_mp_t *coord2ba_mp(const int *coord) extern int allocate_block(select_ba_request_t* ba_request, List results) { uint16_t start[cluster_dims]; - uint16_t end[cluster_dims]; char *name=NULL; int i, dim, startx; ba_geo_table_t *ba_geo_table; @@ -285,13 +284,6 @@ extern int allocate_block(select_ba_request_t* ba_request, List results) } else ba_request->geo_table = NULL; - for (dim = 0; dim < cluster_dims; dim++) { - end[dim] = start[dim] + ba_request->geometry[dim]; - if (end[dim] > DIM_SIZE[dim]) - if (!_check_for_options(ba_request)) - return 0; - } - start_again: i = 0; if (i == startx) @@ -963,7 +955,7 @@ static int _fill_in_coords(List results, int level, ba_mp_t *start_mp, check_mp[level]->coord_str, level); return 0; } - if (coords[level] < (block_end[level])) + if (coords[level] < (DIM_SIZE[level]-1)) coords[level]++; else coords[level] = 0; @@ -1320,10 +1312,11 @@ static int _copy_ba_switch(ba_mp_t *ba_mp, ba_mp_t *orig_mp, int dim) if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP) info("_copy_ba_switch: " - "mapping dim %d of %s(%d) to %s(%d) %d", - dim, orig_mp->coord_str, orig_mp->used, - ba_mp->coord_str, ba_mp->used, - orig_mp->used == BA_MP_USED_ALTERED_PASS); + "mapping %s(%d) %s to %s(%d) %s", + orig_mp->coord_str, dim, + ba_switch_usage_str(orig_mp->alter_switch[dim].usage), + ba_mp->coord_str, dim, + ba_switch_usage_str(ba_mp->alter_switch[dim].usage)); if (ba_mp->axis_switch[dim].usage & orig_mp->alter_switch[dim].usage) { if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP) diff --git a/src/plugins/select/bluegene/bg_core.c b/src/plugins/select/bluegene/bg_core.c index 74108c353e0b45c530803aca9cde47e2e91f0426..86f36e6e23d4d266730044d2e360b5b43d2d4769 100644 --- a/src/plugins/select/bluegene/bg_core.c +++ b/src/plugins/select/bluegene/bg_core.c @@ -118,19 +118,15 @@ static int _post_block_free(bg_record_t *bg_record, bool restore) /* A bit of a sanity check to make sure blocks are being removed out of all the lists. */ - if (blocks_are_created) { - remove_from_bg_list(bg_lists->booted, bg_record); - if (remove_from_bg_list(bg_lists->job_running, bg_record) - == SLURM_SUCCESS) - num_unused_cpus += bg_record->cpu_cnt; - } + remove_from_bg_list(bg_lists->booted, bg_record); + if (remove_from_bg_list(bg_lists->job_running, bg_record) + == SLURM_SUCCESS) + num_unused_cpus += bg_record->cpu_cnt; if (restore) return SLURM_SUCCESS; - if (blocks_are_created - && remove_from_bg_list(bg_lists->main, bg_record) - != SLURM_SUCCESS) { + if (remove_from_bg_list(bg_lists->main, bg_record) != SLURM_SUCCESS) { /* This should only happen if called from * bg_job_place.c where the block was never added to * the list. */