diff --git a/NEWS b/NEWS index bbdb7bf6e5195251c09e29f8c6eeb7fbca1b95eb..7b68dcc3a448e3c61951394a768f31f61d5e6e9b 100644 --- a/NEWS +++ b/NEWS @@ -10,8 +10,11 @@ documents those changes that are of interest to users and admins. multiple dlopens after forking (and to avoid a glibc bug that leaves dlopen locks in a bad state after a fork). -- Added MPICH1_P4 patch to launch tasks using srun rather than rsh and - automatically generate mpirun's machinefile based upon the job's allocation. - See "etc/mpich1.slurm.patch". + automatically generate mpirun's machinefile based upon the job's + allocation. See "etc/mpich1.slurm.patch". + -- BLUEGENE - fix for overlap mode to mark all other base partitions as used + when creating a new block from the file to insure we only use the base + partitions we are asking for. * Changes in SLURM 1.2.8 ======================== diff --git a/src/plugins/select/bluegene/block_allocator/block_allocator.c b/src/plugins/select/bluegene/block_allocator/block_allocator.c index 393e061a14ca03177c6616d2c14e0dd71705e39c..0993e842d4d30c7d2f5e1cb7e9e799ca8d4c7102 100644 --- a/src/plugins/select/bluegene/block_allocator/block_allocator.c +++ b/src/plugins/select/bluegene/block_allocator/block_allocator.c @@ -1476,6 +1476,80 @@ extern int reset_ba_system(bool track_down_nodes) return 1; } + +extern int set_all_bps_except(char *bps) +{ + int x; +#ifdef HAVE_BG + int y, z; +#endif + hostlist_t hl = hostlist_create(bps); + char *host = NULL, *numeric = NULL; + int start, temp; + + while((host = hostlist_shift(hl))){ + numeric = host; + start = 0; + while (numeric) { + if (numeric[0] < '0' || numeric[0] > 'Z' + || (numeric[0] > '9' + && numeric[0] < 'A')) { + numeric++; + continue; + } + start = xstrntol(numeric, NULL, + BA_SYSTEM_DIMENSIONS, + HOSTLIST_BASE); + break; + } + + temp = start / (HOSTLIST_BASE * HOSTLIST_BASE); + x = temp; +#ifdef HAVE_BG + temp = (start % (HOSTLIST_BASE * HOSTLIST_BASE)) + / HOSTLIST_BASE; + y = temp; + temp = start % HOSTLIST_BASE; + z = temp; + ba_system_ptr->grid[x][y][z].state = NODE_STATE_END; +#else + ba_system_ptr->grid[x].state = NODE_STATE_END; +#endif + free(host); + } + hostlist_destroy(hl); + + for (x = 0; x < DIM_SIZE[X]; x++) { +#ifdef HAVE_BG + for (y = 0; y < DIM_SIZE[Y]; y++) + for (z = 0; z < DIM_SIZE[Z]; z++) { + if(ba_system_ptr->grid[x][y][z].state + == NODE_STATE_END) { + ba_system_ptr->grid[x][y][z].state = + NODE_STATE_IDLE; + ba_system_ptr->grid[x][y][z].used = + false; + } else { + ba_system_ptr->grid[x][y][z].state = + NODE_STATE_IDLE; + ba_system_ptr->grid[x][y][z].used = + true; + } + } +#else + if(ba_system_ptr->grid[x].state != NODE_STATE_END) { + ba_system_ptr->grid[x].state = NODE_STATE_IDLE; + ba_system_ptr->grid[x].used = false; + } else { + ba_system_ptr->grid[x].state = NODE_STATE_IDLE; + ba_system_ptr->grid[x].used = true; + } +#endif + } + + return 1; +} + /* init_grid - set values of every grid point */ extern void init_grid(node_info_msg_t * node_info_ptr) { diff --git a/src/plugins/select/bluegene/block_allocator/block_allocator.h b/src/plugins/select/bluegene/block_allocator/block_allocator.h index f882e197b882c54ced7d88656de54c9ef4a1ef10..936117f5c26477e29fdccdd12457a5e3ecc4a1dc 100644 --- a/src/plugins/select/bluegene/block_allocator/block_allocator.h +++ b/src/plugins/select/bluegene/block_allocator/block_allocator.h @@ -351,6 +351,7 @@ extern char *set_bg_block(List results, int *start, int *geometry, int conn_type); extern int reset_ba_system(bool track_down_nodes); +extern int set_all_bps_except(char *bps); extern void init_grid(node_info_msg_t *node_info_ptr); /* diff --git a/src/plugins/select/bluegene/plugin/bluegene.c b/src/plugins/select/bluegene/plugin/bluegene.c index 487bdc36ee52c95855a34205d23b6309d44a7434..1fb9ba87705736060c7cf6117a1745558ea3add9 100644 --- a/src/plugins/select/bluegene/plugin/bluegene.c +++ b/src/plugins/select/bluegene/plugin/bluegene.c @@ -1008,8 +1008,10 @@ extern int create_defined_blocks(bg_layout_t overlapped) && !bg_record->full_block && bg_record->cpus_per_bp == procs_per_node) { char *name = NULL; - if(overlapped == LAYOUT_OVERLAP) + if(overlapped == LAYOUT_OVERLAP) { reset_ba_system(false); + set_all_bps_except(bg_record->nodes); + } for(i=0; i<BA_SYSTEM_DIMENSIONS; i++) geo[i] = bg_record->geo[i]; debug2("adding %s %c%c%c %c%c%c",