diff --git a/RELEASE_NOTES b/RELEASE_NOTES index af1b402d28a29c15d45b8c91d374ce59e373a5ee..381aae0f7901c74abf86f0ed96ddb646a70a5f3a 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -69,6 +69,12 @@ API CHANGES Changed members of the following structs ======================================== +block_info_t + Added job_list + node_cnt -> cnode_cnt + ionodes -> ionode_str + nodes -> mp_str + bp_inx -> mp_inx Added the following struct definitions diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index edd02be1c03857cea01e73206d14ff1944b2e216..71507f27f4b3ddb4c449cd57cbf504ca934469c3 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -1519,21 +1519,21 @@ typedef struct { typedef struct { char *bg_block_id; char *blrtsimage; /* BlrtsImage for this block */ - int *mp_inx; /* list index pairs into node_table for *nodes: - * start_range_1, end_range_1, - * start_range_2, .., -1 */ uint16_t conn_type[HIGHEST_DIMENSIONS]; - char *ionodes; + uint32_t cnode_cnt; int *ionode_inx; /* list index pairs for ionodes in the * node listed for *ionodes: * start_range_1, end_range_1, * start_range_2, .., -1 */ + char *ionode_str; List job_list; /* List of running jobs on each block */ uint32_t job_running; char *linuximage; /* LinuxImage for this block */ char *mloaderimage; /* mloaderImage for this block */ - char *nodes; - uint32_t node_cnt; + int *mp_inx; /* list index pairs into node_table for *nodes: + * start_range_1, end_range_1, + * start_range_2, .., -1 */ + char *mp_str; uint16_t node_use; char *owner_name; char *ramdiskimage; /* RamDiskImage for this block */ diff --git a/src/api/block_info.c b/src/api/block_info.c index d42a8b6784a00684d49a74d12d9f1e6cc13f0f55..0095ca4c3b6e8e3104c35b60c7d0ec10af688d21 100644 --- a/src/api/block_info.c +++ b/src/api/block_info.c @@ -124,7 +124,7 @@ char *slurm_sprint_block_info( line_end = " "; /****** Line 1 ******/ - convert_num_unit((float)block_ptr->node_cnt, tmp1, sizeof(tmp1), + convert_num_unit((float)block_ptr->cnode_cnt, tmp1, sizeof(tmp1), UNIT_NONE); out = xstrdup_printf("BlockName=%s TotalNodes=%s State=%s%s", @@ -148,12 +148,12 @@ char *slurm_sprint_block_info( xstrcat(out, line_end); /****** Line 3 ******/ - if(block_ptr->ionodes) + if(block_ptr->ionode_str) xstrfmtcat(out, "MidPlanes=%s[%s] MPIndices=", - block_ptr->nodes, block_ptr->ionodes); + block_ptr->mp_str, block_ptr->ionode_str); else xstrfmtcat(out, "MidPlanes=%s MPIndices=", - block_ptr->nodes); + block_ptr->mp_str); for (j = 0; (block_ptr->mp_inx && (block_ptr->mp_inx[j] != -1)); j+=2) { diff --git a/src/api/init_msg.c b/src/api/init_msg.c index e80af1df122969ca16e66e36ecf56b222e897d90..e18cd8f4a47b0d2cca6653339bc72a93a9e61bff 100644 --- a/src/api/init_msg.c +++ b/src/api/init_msg.c @@ -176,7 +176,7 @@ void slurm_init_update_block_msg (update_block_msg_t *update_block_msg) memset(update_block_msg, 0, sizeof(update_block_msg_t)); update_block_msg->conn_type[0] = (uint16_t)NO_VAL; update_block_msg->job_running = NO_VAL; - update_block_msg->node_cnt = NO_VAL; + update_block_msg->cnode_cnt = NO_VAL; update_block_msg->node_use = (uint16_t)NO_VAL; update_block_msg->state = (uint16_t)NO_VAL; } diff --git a/src/common/slurm_protocol_defs.c b/src/common/slurm_protocol_defs.c index 9a141396c1f4b06738512e7b95d2d7a12b4d4f1b..c9a1abc19348c50b954da679a27469d30ac6c257 100644 --- a/src/common/slurm_protocol_defs.c +++ b/src/common/slurm_protocol_defs.c @@ -2056,12 +2056,12 @@ extern void slurm_free_block_info_members(block_info_t *block_info) if(block_info) { xfree(block_info->bg_block_id); xfree(block_info->blrtsimage); - xfree(block_info->mp_inx); - xfree(block_info->ionodes); xfree(block_info->ionode_inx); + xfree(block_info->ionode_str); xfree(block_info->linuximage); xfree(block_info->mloaderimage); - xfree(block_info->nodes); + xfree(block_info->mp_inx); + xfree(block_info->mp_str); xfree(block_info->owner_name); xfree(block_info->ramdiskimage); xfree(block_info->reason); diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index 8678a5c4fef6b86317d3d7d2b7e0c10a3a6660f6..610bcc0becbb75da7f59f6f79ec09b210a2d1fa4 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -7586,7 +7586,7 @@ static int _unpack_block_info_members(block_info_t *block_info, Buf buffer, for (i=0; i<count; i++) safe_unpack16(&block_info->conn_type[i], buffer); - safe_unpackstr_xmalloc(&(block_info->ionodes), + safe_unpackstr_xmalloc(&(block_info->ionode_str), &uint32_tmp, buffer); safe_unpackstr_xmalloc(&mp_inx_str, &uint32_tmp, buffer); if (mp_inx_str == NULL) { @@ -7611,9 +7611,9 @@ static int _unpack_block_info_members(block_info_t *block_info, Buf buffer, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&block_info->mloaderimage, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&(block_info->nodes), &uint32_tmp, + safe_unpackstr_xmalloc(&(block_info->mp_str), &uint32_tmp, buffer); - safe_unpack32(&block_info->node_cnt, buffer); + safe_unpack32(&block_info->cnode_cnt, buffer); safe_unpack16(&block_info->node_use, buffer); safe_unpackstr_xmalloc(&block_info->owner_name, &uint32_tmp, buffer); @@ -7636,7 +7636,7 @@ static int _unpack_block_info_members(block_info_t *block_info, Buf buffer, xfree(mp_inx_str); } safe_unpack16(&block_info->conn_type[0], buffer); - safe_unpackstr_xmalloc(&(block_info->ionodes), + safe_unpackstr_xmalloc(&(block_info->ionode_str), &uint32_tmp, buffer); safe_unpackstr_xmalloc(&mp_inx_str, &uint32_tmp, buffer); if (mp_inx_str == NULL) { @@ -7650,9 +7650,9 @@ static int _unpack_block_info_members(block_info_t *block_info, Buf buffer, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&block_info->mloaderimage, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&(block_info->nodes), &uint32_tmp, + safe_unpackstr_xmalloc(&(block_info->mp_str), &uint32_tmp, buffer); - safe_unpack32(&block_info->node_cnt, buffer); + safe_unpack32(&block_info->cnode_cnt, buffer); if (cluster_flags & CLUSTER_FLAG_BGL) safe_unpack16(&block_info->node_use, buffer); safe_unpackstr_xmalloc(&block_info->owner_name, @@ -7676,7 +7676,7 @@ static int _unpack_block_info_members(block_info_t *block_info, Buf buffer, xfree(mp_inx_str); } safe_unpack16(&block_info->conn_type[0], buffer); - safe_unpackstr_xmalloc(&(block_info->ionodes), + safe_unpackstr_xmalloc(&(block_info->ionode_str), &uint32_tmp, buffer); safe_unpackstr_xmalloc(&mp_inx_str, &uint32_tmp, buffer); if (mp_inx_str == NULL) { @@ -7690,9 +7690,9 @@ static int _unpack_block_info_members(block_info_t *block_info, Buf buffer, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&block_info->mloaderimage, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&(block_info->nodes), &uint32_tmp, + safe_unpackstr_xmalloc(&(block_info->mp_str), &uint32_tmp, buffer); - safe_unpack32(&block_info->node_cnt, buffer); + safe_unpack32(&block_info->cnode_cnt, buffer); if(cluster_flags & CLUSTER_FLAG_BGL) safe_unpack16(&block_info->node_use, buffer); safe_unpackstr_xmalloc(&block_info->owner_name, @@ -7759,7 +7759,7 @@ static void _pack_block_info_msg(block_info_t *block_info, Buf buffer, for (dim = 0; dim < cluster_dims; dim++) pack16(block_info->conn_type[dim], buffer); - packstr(block_info->ionodes, buffer); + packstr(block_info->ionode_str, buffer); if (block_info->ionode_inx) { char *bitfmt = @@ -7787,8 +7787,8 @@ static void _pack_block_info_msg(block_info_t *block_info, Buf buffer, packstr(block_info->linuximage, buffer); packstr(block_info->mloaderimage, buffer); - packstr(block_info->nodes, buffer); - pack32(block_info->node_cnt, buffer); + packstr(block_info->mp_str, buffer); + pack32(block_info->cnode_cnt, buffer); pack16(block_info->node_use, buffer); packstr(block_info->owner_name, buffer); packstr(block_info->ramdiskimage, buffer); @@ -7834,7 +7834,7 @@ static void _pack_block_info_msg(block_info_t *block_info, Buf buffer, pack16(block_info->conn_type[0], buffer); - packstr(block_info->ionodes, buffer); + packstr(block_info->ionode_str, buffer); if(block_info->ionode_inx) { char *bitfmt = @@ -7848,8 +7848,8 @@ static void _pack_block_info_msg(block_info_t *block_info, Buf buffer, packstr(block_info->linuximage, buffer); packstr(block_info->mloaderimage, buffer); - packstr(block_info->nodes, buffer); - pack32(block_info->node_cnt, buffer); + packstr(block_info->mp_str, buffer); + pack32(block_info->cnode_cnt, buffer); if(cluster_flags & CLUSTER_FLAG_BGL) pack16(block_info->node_use, buffer); packstr(block_info->owner_name, buffer); @@ -7894,7 +7894,7 @@ static void _pack_block_info_msg(block_info_t *block_info, Buf buffer, pack16(block_info->conn_type[0], buffer); - packstr(block_info->ionodes, buffer); + packstr(block_info->ionode_str, buffer); if(block_info->ionode_inx) { char *bitfmt = @@ -7908,8 +7908,8 @@ static void _pack_block_info_msg(block_info_t *block_info, Buf buffer, packstr(block_info->linuximage, buffer); packstr(block_info->mloaderimage, buffer); - packstr(block_info->nodes, buffer); - pack32(block_info->node_cnt, buffer); + packstr(block_info->mp_str, buffer); + pack32(block_info->cnode_cnt, buffer); if(cluster_flags & CLUSTER_FLAG_BGL) pack16(block_info->node_use, buffer); packstr(block_info->owner_name, buffer); diff --git a/src/plugins/select/bluegene/Makefile.am b/src/plugins/select/bluegene/Makefile.am index ee3f5907f1cbb8695d4443c9d7c964ef14d229dc..0b6bf969d6c6dec89c1716b821802ba133cfce98 100644 --- a/src/plugins/select/bluegene/Makefile.am +++ b/src/plugins/select/bluegene/Makefile.am @@ -29,19 +29,19 @@ if BLUEGENE_LOADED SUBDIRS = sfree if BG_L_P_LOADED - SUBDIRS += bl ba - - if BGL_LOADED - pkglib_LTLIBRARIES += libsched_if64.la - libsched_if64_la_SOURCES = libsched_if64.c - libsched_if64_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) - else - pkglib_LTLIBRARIES += libsched_if.la - libsched_if_la_SOURCES = libsched_if64.c - libsched_if_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) - endif - - block_allocator_lib = ba/libblock_allocator.la +SUBDIRS += bl ba + +if BGL_LOADED +pkglib_LTLIBRARIES += libsched_if64.la +libsched_if64_la_SOURCES = libsched_if64.c +libsched_if64_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +else +pkglib_LTLIBRARIES += libsched_if.la +libsched_if_la_SOURCES = libsched_if64.c +libsched_if_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +endif + +block_allocator_lib = ba/libblock_allocator.la endif if BGQ_LOADED diff --git a/src/plugins/select/bluegene/Makefile.in b/src/plugins/select/bluegene/Makefile.in index 230b3ff31096c059abd64fa7c1439d0665169903..a7cb28828e1b380ab52059d4fba00c775d041480 100644 --- a/src/plugins/select/bluegene/Makefile.in +++ b/src/plugins/select/bluegene/Makefile.in @@ -39,18 +39,17 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am__append_1 = bl ba -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am__append_2 = \ -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ libsched_if64.la \ -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ libsched_if.la -@BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am__append_3 = bl_bgq ba_bgq -@BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am__append_4 = runjob_plugin.la -@BLUEGENE_LOADED_TRUE@am__append_5 = bg_core.c bg_defined_block.c \ +@BGL_LOADED_TRUE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am__append_2 = libsched_if64.la +@BGL_LOADED_FALSE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am__append_3 = libsched_if.la +@BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am__append_4 = bl_bgq ba_bgq +@BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am__append_5 = runjob_plugin.la +@BLUEGENE_LOADED_TRUE@am__append_6 = bg_core.c bg_defined_block.c \ @BLUEGENE_LOADED_TRUE@ bg_dynamic_block.c bg_job_place.c \ @BLUEGENE_LOADED_TRUE@ bg_job_run.c bg_list_functions.c \ @BLUEGENE_LOADED_TRUE@ bg_read_config.c bg_record_functions.c \ @BLUEGENE_LOADED_TRUE@ bg_status.c -@BLUEGENE_LOADED_TRUE@am__append_6 = $(block_allocator_lib) $(BG_LDFLAGS) +@BLUEGENE_LOADED_TRUE@am__append_7 = $(block_allocator_lib) $(BG_LDFLAGS) @BLUEGENE_LOADED_TRUE@sbin_PROGRAMS = slurm_prolog$(EXEEXT) \ @BLUEGENE_LOADED_TRUE@ slurm_epilog$(EXEEXT) subdir = src/plugins/select/bluegene @@ -125,24 +124,22 @@ am_libba_common_la_OBJECTS = ba_common.lo libba_common_la_OBJECTS = $(am_libba_common_la_OBJECTS) libsched_if_la_LIBADD = am__libsched_if_la_SOURCES_DIST = libsched_if64.c -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_libsched_if_la_OBJECTS = \ -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ libsched_if64.lo +@BGL_LOADED_FALSE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_libsched_if_la_OBJECTS = libsched_if64.lo libsched_if_la_OBJECTS = $(am_libsched_if_la_OBJECTS) libsched_if_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libsched_if_la_LDFLAGS) $(LDFLAGS) -o $@ -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_libsched_if_la_rpath = \ -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ -rpath $(pkglibdir) +@BGL_LOADED_FALSE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_libsched_if_la_rpath = -rpath \ +@BGL_LOADED_FALSE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ $(pkglibdir) libsched_if64_la_LIBADD = am__libsched_if64_la_SOURCES_DIST = libsched_if64.c -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_libsched_if64_la_OBJECTS = \ -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ libsched_if64.lo +@BGL_LOADED_TRUE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_libsched_if64_la_OBJECTS = libsched_if64.lo libsched_if64_la_OBJECTS = $(am_libsched_if64_la_OBJECTS) libsched_if64_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libsched_if64_la_LDFLAGS) $(LDFLAGS) -o $@ -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_libsched_if64_la_rpath = \ -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ -rpath $(pkglibdir) +@BGL_LOADED_TRUE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_libsched_if64_la_rpath = -rpath \ +@BGL_LOADED_TRUE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ $(pkglibdir) runjob_plugin_la_LIBADD = am__runjob_plugin_la_SOURCES_DIST = runjob_plugin.cc @BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_runjob_plugin_la_OBJECTS = \ @@ -469,20 +466,20 @@ CLEANFILES = core.* PLUGIN_FLAGS = -module -avoid-version --export-dynamic -lm INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES) pkglib_LTLIBRARIES = select_bluegene.la $(am__append_2) \ - $(am__append_4) + $(am__append_3) $(am__append_5) noinst_LTLIBRARIES = libba_common.la # These are needed for pack/unpack of structures for cross-cluster stuff select_bluegene_la_SOURCES = select_bluegene.c bg_job_info.c \ - bg_job_info.h bg_node_info.c bg_node_info.h $(am__append_5) + bg_job_info.h bg_node_info.c bg_node_info.h $(am__append_6) libba_common_la_SOURCES = ba_common.c ba_common.h select_bluegene_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) -select_bluegene_la_LIBADD = libba_common.la $(am__append_6) -@BLUEGENE_LOADED_TRUE@SUBDIRS = sfree $(am__append_1) $(am__append_3) -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@libsched_if64_la_SOURCES = libsched_if64.c -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@libsched_if64_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@libsched_if_la_SOURCES = libsched_if64.c -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@libsched_if_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +select_bluegene_la_LIBADD = libba_common.la $(am__append_7) +@BLUEGENE_LOADED_TRUE@SUBDIRS = sfree $(am__append_1) $(am__append_4) +@BGL_LOADED_TRUE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@libsched_if64_la_SOURCES = libsched_if64.c +@BGL_LOADED_TRUE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@libsched_if64_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +@BGL_LOADED_FALSE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@libsched_if_la_SOURCES = libsched_if64.c +@BGL_LOADED_FALSE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@libsched_if_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) @BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@block_allocator_lib = ba_bgq/libblock_allocator.la @BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@block_allocator_lib = ba/libblock_allocator.la @BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@nodist_EXTRA_select_bluegene_la_SOURCES = dummy.cxx @@ -1042,10 +1039,6 @@ uninstall-am: uninstall-pkglibLTLIBRARIES uninstall-sbinPROGRAMS uninstall-pkglibLTLIBRARIES uninstall-sbinPROGRAMS -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ if BGL_LOADED -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ else -@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ endif - @BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ # force link with g++ @BLUEGENE_LOADED_TRUE@force: diff --git a/src/plugins/select/bluegene/bg_core.c b/src/plugins/select/bluegene/bg_core.c index c01f8f6d840a999e97e6ff6d185ce5f236c3837e..302f3fe1997bb97c0471c29b5220fcf2ff592733 100644 --- a/src/plugins/select/bluegene/bg_core.c +++ b/src/plugins/select/bluegene/bg_core.c @@ -272,8 +272,8 @@ extern bool blocks_overlap(bg_record_t *rec_a, bg_record_t *rec_b) && !bit_overlap(rec_a->bitmap, rec_b->bitmap)) return false; - if ((rec_a->node_cnt >= bg_conf->mp_node_cnt) - || (rec_b->node_cnt >= bg_conf->mp_node_cnt)) + if ((rec_a->cnode_cnt >= bg_conf->mp_cnode_cnt) + || (rec_b->cnode_cnt >= bg_conf->mp_cnode_cnt)) return true; if (rec_a->ionode_bitmap && rec_b->ionode_bitmap @@ -730,8 +730,8 @@ extern int load_state_file(List curr_block_list, char *dir_name) bg_record = xmalloc(sizeof(bg_record_t)); bg_record->magic = BLOCK_MAGIC; bg_record->bg_block_id = xstrdup(block_info->bg_block_id); - bg_record->nodes = xstrdup(block_info->nodes); - bg_record->ionodes = xstrdup(block_info->ionodes); + bg_record->mp_str = xstrdup(block_info->mp_str); + bg_record->ionode_str = xstrdup(block_info->ionode_str); bg_record->ionode_bitmap = bit_copy(ionode_bitmap); /* put_block_in_error_state should be called after the bg_lists->main has been @@ -743,10 +743,10 @@ extern int load_state_file(List curr_block_list, char *dir_name) bg_record->job_running = NO_JOB_RUNNING; bg_record->mp_count = bit_set_count(node_bitmap); - bg_record->node_cnt = block_info->node_cnt; - if (bg_conf->mp_node_cnt > bg_record->node_cnt) { - ionodes = bg_conf->mp_node_cnt - / bg_record->node_cnt; + bg_record->cnode_cnt = block_info->cnode_cnt; + if (bg_conf->mp_cnode_cnt > bg_record->cnode_cnt) { + ionodes = bg_conf->mp_cnode_cnt + / bg_record->cnode_cnt; bg_record->cpu_cnt = bg_conf->cpus_per_mp / ionodes; } else { bg_record->cpu_cnt = bg_conf->cpus_per_mp @@ -816,11 +816,11 @@ extern int load_state_file(List curr_block_list, char *dir_name) name); xfree(name); - if (strcmp(temp, bg_record->nodes)) { + if (strcmp(temp, bg_record->mp_str)) { fatal("bad wiring in preserved state " "(found %s, but allocated %s) " "YOU MUST COLDSTART", - bg_record->nodes, temp); + bg_record->mp_str, temp); } if (bg_record->ba_mp_list) list_destroy(bg_record->ba_mp_list); diff --git a/src/plugins/select/bluegene/bg_defined_block.c b/src/plugins/select/bluegene/bg_defined_block.c index b36b1d6f56b5264e4b919d5dc8e6ae3aa0d065b7..9a3b70197ed42a7fa3cba79a2ecd1f6fb9e51a0d 100644 --- a/src/plugins/select/bluegene/bg_defined_block.c +++ b/src/plugins/select/bluegene/bg_defined_block.c @@ -95,10 +95,10 @@ extern int create_defined_blocks(bg_layout_t overlapped, while ((found_record = (bg_record_t*) list_next(itr_found)) != NULL) { /* info("%s[%s] ?= %s[%s]", */ -/* bg_record->nodes, */ -/* bg_record->ionodes, */ -/* found_record->nodes, */ -/* found_record->ionodes); */ +/* bg_record->mp_str, */ +/* bg_record->ionode_str, */ +/* found_record->mp_str, */ +/* found_record->ionode_str); */ if ((bit_equal(bg_record->bitmap, found_record->bitmap)) @@ -148,7 +148,7 @@ extern int create_defined_blocks(bg_layout_t overlapped, geo_char[i] = '\0'; debug2("adding %s %s %s", - bg_record->nodes, + bg_record->mp_str, start_char, geo_char); if (bg_record->ba_mp_list && list_count(bg_record->ba_mp_list)) { @@ -190,12 +190,12 @@ extern int create_defined_blocks(bg_layout_t overlapped, name); xfree(name); - if (strcmp(temp, bg_record->nodes)) { + if (strcmp(temp, bg_record->mp_str)) { fatal("given list of %s " "but allocated %s, " "your order might be " "wrong in bluegene.conf", - bg_record->nodes, + bg_record->mp_str, temp); } if (bg_record->ba_mp_list) @@ -348,7 +348,7 @@ extern int create_full_system_block(List bg_found_block_list) if (bg_found_block_list) { itr = list_iterator_create(bg_found_block_list); while ((bg_record = (bg_record_t *) list_next(itr)) != NULL) { - if (!strcmp(name, bg_record->nodes)) { + if (!strcmp(name, bg_record->mp_str)) { xfree(name); list_iterator_destroy(itr); /* don't create total already there */ @@ -364,7 +364,7 @@ extern int create_full_system_block(List bg_found_block_list) itr = list_iterator_create(bg_lists->main); while ((bg_record = (bg_record_t *) list_next(itr)) != NULL) { - if (!strcmp(name, bg_record->nodes)) { + if (!strcmp(name, bg_record->mp_str)) { xfree(name); list_iterator_destroy(itr); /* don't create total already there */ @@ -400,7 +400,7 @@ extern int create_full_system_block(List bg_found_block_list) geo_char[i] = alpha_num[bg_record->geo[i]]; start_char[i] = alpha_num[bg_record->start[i]]; } - debug2("adding %s %s %s", bg_record->nodes, start_char, geo_char); + debug2("adding %s %s %s", bg_record->mp_str, start_char, geo_char); if (bg_record->ba_mp_list) list_flush(bg_record->ba_mp_list); else diff --git a/src/plugins/select/bluegene/bg_dynamic_block.c b/src/plugins/select/bluegene/bg_dynamic_block.c index b7a25a14a3c94bd17fcb2cc03567e14f69e211ef..2e48700aaa1d9f609d59387b0feb2889261438da 100644 --- a/src/plugins/select/bluegene/bg_dynamic_block.c +++ b/src/plugins/select/bluegene/bg_dynamic_block.c @@ -109,12 +109,12 @@ extern List create_dynamic_block(List block_list, info("not adding %s(%s) %s %s %s %u " "(free_cnt)", bg_record->bg_block_id, - bg_record->nodes, + bg_record->mp_str, bg_block_state_string( bg_record->state), start_geo, geo, - bg_record->node_cnt); + bg_record->cnode_cnt); } continue; } @@ -143,11 +143,11 @@ extern List create_dynamic_block(List block_list, geo[dim] = '\0'; info("adding %s(%s) %s %s %s %u", bg_record->bg_block_id, - bg_record->nodes, + bg_record->mp_str, bg_block_state_string( bg_record->state), start_geo, geo, - bg_record->node_cnt); + bg_record->cnode_cnt); } if (check_and_set_mp_list( bg_record->ba_mp_list) @@ -179,12 +179,12 @@ extern List create_dynamic_block(List block_list, geo[dim] = '\0'; info("not adding %s(%s) %s %s %s %u ", bg_record->bg_block_id, - bg_record->nodes, + bg_record->mp_str, bg_block_state_string( bg_record->state), start_geo, geo, - bg_record->node_cnt); + bg_record->cnode_cnt); } /* just so we don't look at it later */ bg_record->free_cnt = -1; @@ -201,7 +201,7 @@ extern List create_dynamic_block(List block_list, if (request->avail_mp_bitmap) ba_set_removable_mps(request->avail_mp_bitmap, 1); - if (request->size==1 && cnodes < bg_conf->mp_node_cnt) { + if (request->size==1 && cnodes < bg_conf->mp_cnode_cnt) { switch(cnodes) { #ifdef HAVE_BGL case 32: @@ -347,10 +347,10 @@ extern List create_dynamic_block(List block_list, /* Here we are only looking for the first block on the midplane. So either the count is greater or equal than - bg_conf->mp_node_cnt or the first bit is + bg_conf->mp_cnode_cnt or the first bit is set in the ionode_bitmap. */ - if (bg_record->node_cnt < bg_conf->mp_node_cnt) { + if (bg_record->cnode_cnt < bg_conf->mp_cnode_cnt) { bool found = 0; if (bit_ffs(bg_record->ionode_bitmap) != 0) continue; @@ -376,7 +376,7 @@ extern List create_dynamic_block(List block_list, if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) info("removing %s(%s) for request %d", bg_record->bg_block_id, - bg_record->nodes, request->size); + bg_record->mp_str, request->size); remove_block(bg_record->ba_mp_list, is_small); rc = SLURM_SUCCESS; @@ -464,14 +464,14 @@ extern bg_record_t *create_small_record(bg_record_t *bg_record, if (bg_record->ba_mp_list) ba_mp = list_peek(bg_record->ba_mp_list); if (!ba_mp) { - if (bg_record->nodes) { - hostlist_t hl = hostlist_create(bg_record->nodes); + if (bg_record->mp_str) { + hostlist_t hl = hostlist_create(bg_record->mp_str); char *host = hostlist_shift(hl); hostlist_destroy(hl); - found_record->nodes = xstrdup(host); + found_record->mp_str = xstrdup(host); free(host); error("you gave me a list with no ba_mps using %s", - found_record->nodes); + found_record->mp_str); } else { char tmp_char[SYSTEM_DIMENSIONS+1]; int dim; @@ -479,13 +479,13 @@ extern bg_record_t *create_small_record(bg_record_t *bg_record, tmp_char[dim] = alpha_num[found_record->start[dim]]; tmp_char[dim] = '\0'; - found_record->nodes = xstrdup_printf( + found_record->mp_str = xstrdup_printf( "%s%s", bg_conf->slurm_node_prefix, tmp_char); error("you gave me a record with no ba_mps " "and no nodes either using %s", - found_record->nodes); + found_record->mp_str); } } else { new_ba_mp = ba_copy_mp(ba_mp); @@ -497,7 +497,7 @@ extern bg_record_t *create_small_record(bg_record_t *bg_record, new_ba_mp->used = BA_MP_USED_TRUE; list_append(found_record->ba_mp_list, new_ba_mp); found_record->mp_count = 1; - found_record->nodes = xstrdup_printf( + found_record->mp_str = xstrdup_printf( "%s%s", bg_conf->slurm_node_prefix, new_ba_mp->coord_str); } @@ -518,14 +518,14 @@ extern bg_record_t *create_small_record(bg_record_t *bg_record, xassert(bg_conf->cpu_ratio); found_record->cpu_cnt = bg_conf->cpu_ratio * size; - found_record->node_cnt = size; + found_record->cnode_cnt = size; found_record->ionode_bitmap = bit_copy(ionodes); bit_fmt(bitstring, BITSIZE, found_record->ionode_bitmap); - found_record->ionodes = xstrdup(bitstring); + found_record->ionode_str = xstrdup(bitstring); if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) info("made small block of %s[%s]", - found_record->nodes, found_record->ionodes); + found_record->mp_str, found_record->ionode_str); return found_record; } @@ -540,7 +540,7 @@ static int _split_block(List block_list, List new_blocks, memset(&blockreq, 0, sizeof(select_ba_request_t)); - switch(bg_record->node_cnt) { + switch(bg_record->cnode_cnt) { #ifdef HAVE_BGL case 32: error("We got a 32 we should never have this"); @@ -553,7 +553,7 @@ static int _split_block(List block_list, List new_blocks, break; default: error("We don't make a %d from size %d", - cnodes, bg_record->node_cnt); + cnodes, bg_record->cnode_cnt); goto finished; break; } @@ -569,7 +569,7 @@ static int _split_block(List block_list, List new_blocks, break; default: error("We don't make a %d from size %d", - cnodes, bg_record->node_cnt); + cnodes, bg_record->cnode_cnt); goto finished; break; } @@ -587,7 +587,7 @@ static int _split_block(List block_list, List new_blocks, break; default: error("We don't make a %d from size %d", - cnodes, bg_record->node_cnt); + cnodes, bg_record->cnode_cnt); goto finished; break; } @@ -603,7 +603,7 @@ static int _split_block(List block_list, List new_blocks, break; default: error("We don't make a %d from size %d", - cnodes, bg_record->node_cnt); + cnodes, bg_record->cnode_cnt); goto finished; break; } @@ -624,7 +624,7 @@ static int _split_block(List block_list, List new_blocks, break; default: error("We don't make a %d from size %d", - cnodes, bg_record->node_cnt); + cnodes, bg_record->cnode_cnt); goto finished; break; } @@ -651,7 +651,7 @@ static int _split_block(List block_list, List new_blocks, break; default: error("We don't make a %d from size %d", - cnodes, bg_record->node_cnt); + cnodes, bg_record->cnode_cnt); goto finished; break; } @@ -685,7 +685,7 @@ static int _split_block(List block_list, List new_blocks, break; default: error("We don't make a %d from size %d", - cnodes, bg_record->node_cnt); + cnodes, bg_record->cnode_cnt); goto finished; break; } @@ -704,7 +704,7 @@ static int _split_block(List block_list, List new_blocks, info("Asking for %u 32CNBlocks, and %u 128CNBlocks " "from a %u block, starting at ionode %d.", blockreq.small32, blockreq.small128, - bg_record->node_cnt, start); + bg_record->cnode_cnt, start); #else if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) info("Asking for %u 16CNBlocks, %u 32CNBlocks, " @@ -712,7 +712,7 @@ static int _split_block(List block_list, List new_blocks, "from a %u block, starting at ionode %d.", blockreq.small16, blockreq.small32, blockreq.small64, blockreq.small128, - blockreq.small256, bg_record->node_cnt, start); + blockreq.small256, bg_record->cnode_cnt, start); #endif handle_small_record_request(new_blocks, &blockreq, bg_record, start); @@ -782,7 +782,8 @@ static int _breakup_blocks(List block_list, List new_blocks, continue; /* check small blocks first */ - if (only_small && (bg_record->node_cnt > bg_conf->mp_node_cnt)) + if (only_small + && (bg_record->cnode_cnt > bg_conf->mp_cnode_cnt)) continue; if (request->avail_mp_bitmap && @@ -795,7 +796,7 @@ static int _breakup_blocks(List block_list, List new_blocks, continue; } - if (bg_record->node_cnt == cnodes) { + if (bg_record->cnode_cnt == cnodes) { ba_mp_t *ba_mp = NULL; if (bg_record->ba_mp_list) ba_mp = list_peek(bg_record->ba_mp_list); @@ -812,11 +813,11 @@ static int _breakup_blocks(List block_list, List new_blocks, goto finished; } /* lets see if we can combine some small ones */ - if (bg_record->node_cnt < cnodes) { + if (bg_record->cnode_cnt < cnodes) { char bitstring[BITSIZE]; bitstr_t *bitstr = NULL; int num_over = 0; - int num_cnodes = bg_record->node_cnt; + int num_cnodes = bg_record->cnode_cnt; int rec_mp_bit = bit_ffs(bg_record->bitmap); if (curr_mp_bit != rec_mp_bit) { @@ -862,7 +863,7 @@ static int _breakup_blocks(List block_list, List new_blocks, (bg_conf->ionodes_per_mp-1)); bit_or(ionodes, bg_record->ionode_bitmap); total_cnode_cnt = num_cnodes = - bg_record->node_cnt; + bg_record->cnode_cnt; } else total_cnode_cnt += num_cnodes; @@ -870,9 +871,9 @@ static int _breakup_blocks(List block_list, List new_blocks, if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) info("combine adding %s %s %d got %d set " "ionodes %s total is %s", - bg_record->bg_block_id, bg_record->nodes, + bg_record->bg_block_id, bg_record->mp_str, num_cnodes, total_cnode_cnt, - bg_record->ionodes, bitstring); + bg_record->ionode_str, bitstring); if (total_cnode_cnt == cnodes) { ba_mp_t *ba_mp = NULL; if (bg_record->ba_mp_list) diff --git a/src/plugins/select/bluegene/bg_job_info.c b/src/plugins/select/bluegene/bg_job_info.c index 40fad55d5e20cb60d96b619e34fca81c7b4beb70..3167aeb2879389aff823109829716d4804e37824 100644 --- a/src/plugins/select/bluegene/bg_job_info.c +++ b/src/plugins/select/bluegene/bg_job_info.c @@ -67,7 +67,7 @@ extern select_jobinfo_t *alloc_select_jobinfo() jobinfo->reboot = (uint16_t) NO_VAL; jobinfo->rotate = (uint16_t) NO_VAL; jobinfo->magic = JOBINFO_MAGIC; - jobinfo->node_cnt = NO_VAL; + jobinfo->cnode_cnt = NO_VAL; /* Remainder of structure is already NULL fulled */ return jobinfo; @@ -87,8 +87,8 @@ extern int free_select_jobinfo(select_jobinfo_t *jobinfo) } jobinfo->magic = 0; xfree(jobinfo->bg_block_id); - xfree(jobinfo->nodes); - xfree(jobinfo->ionodes); + xfree(jobinfo->mp_str); + xfree(jobinfo->ionode_str); xfree(jobinfo->blrtsimage); xfree(jobinfo->linuximage); xfree(jobinfo->mloaderimage); @@ -154,26 +154,26 @@ extern int set_select_jobinfo(select_jobinfo_t *jobinfo, jobinfo->bg_block_id = xstrdup(tmp_char); break; case SELECT_JOBDATA_NODES: - xfree(jobinfo->nodes); - jobinfo->nodes = xstrdup(tmp_char); + xfree(jobinfo->mp_str); + jobinfo->mp_str = xstrdup(tmp_char); break; case SELECT_JOBDATA_IONODES: - xfree(jobinfo->ionodes); - jobinfo->ionodes = xstrdup(tmp_char); + xfree(jobinfo->ionode_str); + jobinfo->ionode_str = xstrdup(tmp_char); break; case SELECT_JOBDATA_NODE_CNT: - jobinfo->node_cnt = *uint32; + jobinfo->cnode_cnt = *uint32; /* Make sure the conn type is correct with the new count */ - if ((bg_conf->mp_node_cnt == bg_conf->nodecard_node_cnt) - || (jobinfo->node_cnt < bg_conf->mp_node_cnt)) { + if ((bg_conf->mp_cnode_cnt == bg_conf->nodecard_cnode_cnt) + || (jobinfo->cnode_cnt < bg_conf->mp_cnode_cnt)) { if (jobinfo->conn_type[0] < SELECT_SMALL) jobinfo->conn_type[0] = SELECT_SMALL; } else if (jobinfo->conn_type[0] >= SELECT_SMALL) for (i=0; i<SYSTEM_DIMENSIONS; i++) jobinfo->conn_type[i] = SELECT_TORUS; - if ((bg_conf->mp_node_cnt == bg_conf->nodecard_node_cnt) - || (jobinfo->node_cnt < bg_conf->mp_node_cnt)) + if ((bg_conf->mp_cnode_cnt == bg_conf->nodecard_cnode_cnt) + || (jobinfo->cnode_cnt < bg_conf->mp_cnode_cnt)) jobinfo->conn_type[0] = SELECT_SMALL; else if (jobinfo->conn_type[0] == SELECT_SMALL) for (i=0; i<SYSTEM_DIMENSIONS; i++) @@ -257,21 +257,21 @@ extern int get_select_jobinfo(select_jobinfo_t *jobinfo, *tmp_char = xstrdup(jobinfo->bg_block_id); break; case SELECT_JOBDATA_NODES: - if ((jobinfo->nodes == NULL) - || (jobinfo->nodes[0] == '\0')) + if ((jobinfo->mp_str == NULL) + || (jobinfo->mp_str[0] == '\0')) *tmp_char = NULL; else - *tmp_char = xstrdup(jobinfo->nodes); + *tmp_char = xstrdup(jobinfo->mp_str); break; case SELECT_JOBDATA_IONODES: - if ((jobinfo->ionodes == NULL) - || (jobinfo->ionodes[0] == '\0')) + if ((jobinfo->ionode_str == NULL) + || (jobinfo->ionode_str[0] == '\0')) *tmp_char = NULL; else - *tmp_char = xstrdup(jobinfo->ionodes); + *tmp_char = xstrdup(jobinfo->ionode_str); break; case SELECT_JOBDATA_NODE_CNT: - *uint32 = jobinfo->node_cnt; + *uint32 = jobinfo->cnode_cnt; break; case SELECT_JOBDATA_ALTERED: *uint16 = jobinfo->altered; @@ -334,9 +334,9 @@ extern select_jobinfo_t *copy_select_jobinfo(select_jobinfo_t *jobinfo) rc->rotate = jobinfo->rotate; rc->bg_block_id = xstrdup(jobinfo->bg_block_id); rc->magic = JOBINFO_MAGIC; - rc->nodes = xstrdup(jobinfo->nodes); - rc->ionodes = xstrdup(jobinfo->ionodes); - rc->node_cnt = jobinfo->node_cnt; + rc->mp_str = xstrdup(jobinfo->mp_str); + rc->ionode_str = xstrdup(jobinfo->ionode_str); + rc->cnode_cnt = jobinfo->cnode_cnt; rc->altered = jobinfo->altered; rc->blrtsimage = xstrdup(jobinfo->blrtsimage); rc->linuximage = xstrdup(jobinfo->linuximage); @@ -372,11 +372,11 @@ extern int pack_select_jobinfo(select_jobinfo_t *jobinfo, Buf buffer, pack16(jobinfo->reboot, buffer); pack16(jobinfo->rotate, buffer); - pack32(jobinfo->node_cnt, buffer); + pack32(jobinfo->cnode_cnt, buffer); packstr(jobinfo->bg_block_id, buffer); - packstr(jobinfo->nodes, buffer); - packstr(jobinfo->ionodes, buffer); + packstr(jobinfo->mp_str, buffer); + packstr(jobinfo->ionode_str, buffer); packstr(jobinfo->blrtsimage, buffer); packstr(jobinfo->linuximage, buffer); @@ -411,11 +411,11 @@ extern int pack_select_jobinfo(select_jobinfo_t *jobinfo, Buf buffer, pack16(jobinfo->reboot, buffer); pack16(jobinfo->rotate, buffer); - pack32(jobinfo->node_cnt, buffer); + pack32(jobinfo->cnode_cnt, buffer); packstr(jobinfo->bg_block_id, buffer); - packstr(jobinfo->nodes, buffer); - packstr(jobinfo->ionodes, buffer); + packstr(jobinfo->mp_str, buffer); + packstr(jobinfo->ionode_str, buffer); packstr(jobinfo->blrtsimage, buffer); packstr(jobinfo->linuximage, buffer); @@ -451,12 +451,12 @@ extern int pack_select_jobinfo(select_jobinfo_t *jobinfo, Buf buffer, pack16(jobinfo->reboot, buffer); pack16(jobinfo->rotate, buffer); - pack32(jobinfo->node_cnt, buffer); + pack32(jobinfo->cnode_cnt, buffer); pack32(0, buffer); packstr(jobinfo->bg_block_id, buffer); - packstr(jobinfo->nodes, buffer); - packstr(jobinfo->ionodes, buffer); + packstr(jobinfo->mp_str, buffer); + packstr(jobinfo->ionode_str, buffer); if (cluster_flags & CLUSTER_FLAG_BGL) packstr(jobinfo->blrtsimage, buffer); @@ -516,12 +516,12 @@ extern int unpack_select_jobinfo(select_jobinfo_t **jobinfo_pptr, Buf buffer, safe_unpack16(&(jobinfo->reboot), buffer); safe_unpack16(&(jobinfo->rotate), buffer); - safe_unpack32(&(jobinfo->node_cnt), buffer); + safe_unpack32(&(jobinfo->cnode_cnt), buffer); safe_unpackstr_xmalloc(&(jobinfo->bg_block_id), &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&(jobinfo->nodes), &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&(jobinfo->ionodes), &uint32_tmp, + safe_unpackstr_xmalloc(&(jobinfo->mp_str), &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&(jobinfo->ionode_str), &uint32_tmp, buffer); safe_unpackstr_xmalloc(&(jobinfo->blrtsimage), @@ -541,12 +541,12 @@ extern int unpack_select_jobinfo(select_jobinfo_t **jobinfo_pptr, Buf buffer, safe_unpack16(&(jobinfo->reboot), buffer); safe_unpack16(&(jobinfo->rotate), buffer); - safe_unpack32(&(jobinfo->node_cnt), buffer); + safe_unpack32(&(jobinfo->cnode_cnt), buffer); safe_unpackstr_xmalloc(&(jobinfo->bg_block_id), &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&(jobinfo->nodes), &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&(jobinfo->ionodes), &uint32_tmp, + safe_unpackstr_xmalloc(&(jobinfo->mp_str), &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&(jobinfo->ionode_str), &uint32_tmp, buffer); safe_unpackstr_xmalloc(&(jobinfo->blrtsimage), @@ -565,13 +565,13 @@ extern int unpack_select_jobinfo(select_jobinfo_t **jobinfo_pptr, Buf buffer, safe_unpack16(&(jobinfo->reboot), buffer); safe_unpack16(&(jobinfo->rotate), buffer); - safe_unpack32(&(jobinfo->node_cnt), buffer); + safe_unpack32(&(jobinfo->cnode_cnt), buffer); safe_unpack32(&uint32_tmp, buffer); safe_unpackstr_xmalloc(&(jobinfo->bg_block_id), &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&(jobinfo->nodes), &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&(jobinfo->ionodes), &uint32_tmp, + safe_unpackstr_xmalloc(&(jobinfo->mp_str), &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&(jobinfo->ionode_str), &uint32_tmp, buffer); if (cluster_flags & CLUSTER_FLAG_BGL) @@ -674,11 +674,11 @@ extern char *sprint_select_jobinfo(select_jobinfo_t *jobinfo, snprintf(buf, size, "%s", jobinfo->bg_block_id); break; case SELECT_PRINT_NODES: - if (jobinfo->ionodes && jobinfo->ionodes[0]) + if (jobinfo->ionode_str && jobinfo->ionode_str[0]) snprintf(buf, size, "%s[%s]", - jobinfo->nodes, jobinfo->ionodes); + jobinfo->mp_str, jobinfo->ionode_str); else - snprintf(buf, size, "%s", jobinfo->nodes); + snprintf(buf, size, "%s", jobinfo->mp_str); break; case SELECT_PRINT_CONNECTION: snprintf(buf, size, "%s", @@ -789,11 +789,11 @@ extern char *xstrdup_select_jobinfo(select_jobinfo_t *jobinfo, int mode) xstrfmtcat(buf, "%s", jobinfo->bg_block_id); break; case SELECT_PRINT_NODES: - if (jobinfo->ionodes && jobinfo->ionodes[0]) + if (jobinfo->ionode_str && jobinfo->ionode_str[0]) xstrfmtcat(buf, "%s[%s]", - jobinfo->nodes, jobinfo->ionodes); + jobinfo->mp_str, jobinfo->ionode_str); else - xstrfmtcat(buf, "%s", jobinfo->nodes); + xstrfmtcat(buf, "%s", jobinfo->mp_str); break; case SELECT_PRINT_CONNECTION: xstrfmtcat(buf, "%s", diff --git a/src/plugins/select/bluegene/bg_job_info.h b/src/plugins/select/bluegene/bg_job_info.h index c83863d3570875f838e550737cb3cf2b8ca29c41..2a9a7c316418447133059e628dee931bfbc02402 100644 --- a/src/plugins/select/bluegene/bg_job_info.h +++ b/src/plugins/select/bluegene/bg_job_info.h @@ -45,23 +45,23 @@ #define JOBINFO_MAGIC 0x83ac struct select_jobinfo { - uint16_t geometry[HIGHEST_DIMENSIONS]; /* node count in various - * dimensions, e.g. AXYZ */ - uint16_t conn_type[HIGHEST_DIMENSIONS]; /* see enum connection_type */ - uint16_t reboot; /* reboot block before starting job */ - uint16_t rotate; /* permit geometry rotation if set */ - char *bg_block_id; /* Blue Gene block ID */ - uint16_t magic; /* magic number */ - char *nodes; /* node list given for estimated start */ - char *ionodes; /* for bg to tell which ionodes of a small - * block the job is running */ - uint32_t node_cnt; /* how many cnodes in block running job */ uint16_t altered; /* see if we have altered this job * or not yet */ + char *bg_block_id; /* Blue Gene block ID */ char *blrtsimage; /* BlrtsImage for this block */ + uint32_t cnode_cnt; /* how many cnodes in block running job */ + uint16_t conn_type[HIGHEST_DIMENSIONS]; /* see enum connection_type */ + uint16_t geometry[HIGHEST_DIMENSIONS]; /* node count in various + * dimensions, e.g. AXYZ */ + char *ionode_str; /* for bg to tell which ionodes of a small + * block the job is running */ char *linuximage; /* LinuxImage for this block */ + uint16_t magic; /* magic number */ + char *mp_str; /* midplane list given for estimated start */ char *mloaderimage; /* mloaderImage for this block */ char *ramdiskimage; /* RamDiskImage for this block */ + uint16_t reboot; /* reboot block before starting job */ + uint16_t rotate; /* permit geometry rotation if set */ }; /* allocate storage for a select job credential diff --git a/src/plugins/select/bluegene/bg_job_place.c b/src/plugins/select/bluegene/bg_job_place.c index 75dfb07603ca1322486f8825ae731f1abd422f68..b06737879672efef2a926c472918a8b792f9ce80 100644 --- a/src/plugins/select/bluegene/bg_job_place.c +++ b/src/plugins/select/bluegene/bg_job_place.c @@ -1284,8 +1284,8 @@ static int _sync_block_lists(List full_list, List incomp_list) new_record->ionode_bitmap)) { /* now make sure the conn_type is the same for regular sized blocks */ - if (bg_record->node_cnt - >= bg_conf->mp_node_cnt) { + if (bg_record->cnode_cnt + >= bg_conf->mp_cnode_cnt) { int i; for (i=0; i<SYSTEM_DIMENSIONS; i++) if (bg_record->conn_type[i] @@ -1529,7 +1529,7 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap, get_select_jobinfo(job_ptr->select_jobinfo->data, SELECT_JOBDATA_CONN_TYPE, &conn_type); if (conn_type[0] == SELECT_NAV) { - if (bg_conf->mp_node_cnt == bg_conf->nodecard_node_cnt) + if (bg_conf->mp_cnode_cnt == bg_conf->nodecard_cnode_cnt) conn_type[0] = SELECT_SMALL; else if (min_nodes > 1) { for (dim=0; dim<SYSTEM_DIMENSIONS; dim++) @@ -1677,15 +1677,15 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap, set_select_jobinfo(job_ptr->select_jobinfo->data, SELECT_JOBDATA_NODES, - bg_record->nodes); + bg_record->mp_str); set_select_jobinfo(job_ptr->select_jobinfo->data, SELECT_JOBDATA_IONODES, - bg_record->ionodes); + bg_record->ionode_str); if (!bg_record->bg_block_id) { debug("%d can start unassigned job %u " "at %ld on %s", local_mode, job_ptr->job_id, - starttime, bg_record->nodes); + starttime, bg_record->mp_str); set_select_jobinfo( job_ptr->select_jobinfo->data, @@ -1694,9 +1694,9 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap, set_select_jobinfo( job_ptr->select_jobinfo->data, SELECT_JOBDATA_NODE_CNT, - &bg_record->node_cnt); + &bg_record->cnode_cnt); } else { - if ((bg_record->ionodes) + if ((bg_record->ionode_str) && (job_ptr->part_ptr->max_share <= 1)) error("Small block used in " "non-shared partition"); @@ -1705,7 +1705,7 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap, "at %ld on %s(%s) %d", local_mode, mode, job_ptr->job_id, starttime, bg_record->bg_block_id, - bg_record->nodes, + bg_record->mp_str, SELECT_IS_MODE_RUN_NOW(local_mode)); if (SELECT_IS_MODE_RUN_NOW(local_mode)) { @@ -1740,12 +1740,12 @@ extern int submit_job(struct job_record *job_ptr, bitstr_t *slurm_block_bitmap, set_select_jobinfo( job_ptr->select_jobinfo->data, SELECT_JOBDATA_NODE_CNT, - &bg_record->node_cnt); + &bg_record->cnode_cnt); } if (SELECT_IS_MODE_RUN_NOW(local_mode)) _build_select_struct(job_ptr, slurm_block_bitmap, - bg_record->node_cnt); + bg_record->cnode_cnt); /* set up the preempted job list */ if (SELECT_IS_PREEMPT_SET(local_mode)) { if (*preemptee_job_list) diff --git a/src/plugins/select/bluegene/bg_job_run.c b/src/plugins/select/bluegene/bg_job_run.c index 04871a7933f2e4523d169e9cd5992af9d236b864..3d9faf3a27f9d731f02cef9719c498ccd75b77bb 100644 --- a/src/plugins/select/bluegene/bg_job_run.c +++ b/src/plugins/select/bluegene/bg_job_run.c @@ -599,26 +599,27 @@ static List _get_all_allocated_blocks(void) { List ret_list = list_create(destroy_bg_record); ListIterator itr; - bg_record_t *block_ptr = NULL; - bg_record_t *str_ptr = NULL; + bg_record_t *bg_record = NULL; + bg_record_t *rm_record = NULL; if (!ret_list) fatal("malloc error"); if (bg_lists->main) { itr = list_iterator_create(bg_lists->main); - while ((block_ptr = (bg_record_t *) list_next(itr))) { - if ((block_ptr->user_name == NULL) - || (block_ptr->user_name[0] == '\0') - || (block_ptr->bg_block_id == NULL) - || (block_ptr->bg_block_id[0] == '0')) + while ((bg_record = (bg_record_t *) list_next(itr))) { + if ((bg_record->user_name == NULL) + || (bg_record->user_name[0] == '\0') + || (bg_record->bg_block_id == NULL) + || (bg_record->bg_block_id[0] == '0')) continue; - str_ptr = xmalloc(sizeof(bg_record_t)); - str_ptr->magic = BLOCK_MAGIC; - str_ptr->bg_block_id = xstrdup(block_ptr->bg_block_id); - str_ptr->nodes = xstrdup(block_ptr->nodes); + rm_record = xmalloc(sizeof(bg_record_t)); + rm_record->magic = BLOCK_MAGIC; + rm_record->bg_block_id = + xstrdup(bg_record->bg_block_id); + rm_record->mp_str = xstrdup(bg_record->mp_str); - list_append(ret_list, str_ptr); + list_append(ret_list, rm_record); } list_iterator_destroy(itr); } else { @@ -634,20 +635,20 @@ static int _excise_block(List block_list, char *bg_block_id, { int rc = SLURM_SUCCESS; ListIterator iter; - bg_record_t *block = NULL; + bg_record_t *bg_record = NULL; if (block_list) { iter = list_iterator_create(block_list); xassert(iter); - while ((block = list_next(iter))) { + while ((bg_record = list_next(iter))) { rc = SLURM_ERROR; - if (strcmp(block->bg_block_id, bg_block_id)) + if (strcmp(bg_record->bg_block_id, bg_block_id)) continue; - if (strcmp(block->nodes, nodes)) { + if (strcmp(bg_record->mp_str, nodes)) { /* changed bgblock */ error("bg_block_id:%s old_nodes:%s " "new_nodes:%s", - bg_block_id, nodes, block->nodes); + bg_block_id, nodes, bg_record->mp_str); break; } diff --git a/src/plugins/select/bluegene/bg_list_functions.c b/src/plugins/select/bluegene/bg_list_functions.c index 20ce3a050aadcd73c45ccc73bc717739b11ffd2e..eed4098cdbe9ef2c21c5e031cf96090f555ca84e 100644 --- a/src/plugins/select/bluegene/bg_list_functions.c +++ b/src/plugins/select/bluegene/bg_list_functions.c @@ -54,19 +54,19 @@ extern int block_exist_in_list(List my_list, bg_record_t *bg_record) found_record->ionode_bitmap)) { /* now make sure the conn_type is the same for regular sized blocks */ - if ((bg_record->node_cnt >= bg_conf->mp_node_cnt) + if ((bg_record->cnode_cnt >= bg_conf->mp_cnode_cnt) && bg_record->conn_type != found_record->conn_type) continue; - if (bg_record->ionodes) + if (bg_record->ionode_str) debug("This block %s[%s] " "is already in the list %s", - bg_record->nodes, - bg_record->ionodes, + bg_record->mp_str, + bg_record->ionode_str, found_record->bg_block_id); else debug("This block %s " "is already in the list %s", - bg_record->nodes, + bg_record->mp_str, found_record->bg_block_id); rc = 1; diff --git a/src/plugins/select/bluegene/bg_node_info.c b/src/plugins/select/bluegene/bg_node_info.c index a51deabec013e0ba44a9e50bcd029fe21006c3eb..e0ac56af4c635aa848c468d4837635b01ce9da5c 100644 --- a/src/plugins/select/bluegene/bg_node_info.c +++ b/src/plugins/select/bluegene/bg_node_info.c @@ -41,6 +41,8 @@ #include "src/common/xstring.h" #include "bg_core.h" +static uint32_t g_bitmap_size = 0; + static void _free_node_subgrp(void *object) { node_subgrp_t *subgrp = (node_subgrp_t *)object; @@ -79,7 +81,7 @@ static int _pack_node_subgrp(node_subgrp_t *subgrp, Buf buffer, { if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) { pack_bit_fmt(subgrp->bitmap, buffer); - pack16(subgrp->node_cnt, buffer); + pack16(subgrp->cnode_cnt, buffer); pack16(subgrp->state, buffer); } @@ -112,7 +114,7 @@ static int _unpack_node_subgrp(node_subgrp_t **subgrp_pptr, Buf buffer, j+=2; } - safe_unpack16(&subgrp->node_cnt, buffer); + safe_unpack16(&subgrp->cnode_cnt, buffer); safe_unpack16(&uint16_tmp, buffer); subgrp->state = uint16_tmp; } @@ -207,9 +209,17 @@ unpack_error: extern select_nodeinfo_t *select_nodeinfo_alloc(uint32_t size) { select_nodeinfo_t *nodeinfo = xmalloc(sizeof(struct select_nodeinfo)); + uint32_t cluster_flags = slurmdb_setup_cluster_flags(); + + if (!g_bitmap_size) { + if (cluster_flags & CLUSTER_FLAG_BGQ) + g_bitmap_size = bg_conf->mp_cnode_cnt; + else + g_bitmap_size = bg_conf->ionodes_per_mp; + } if (bg_conf && (!size || size == NO_VAL)) - size = bg_conf->ionodes_per_mp; + size = g_bitmap_size; nodeinfo->bitmap_size = size; nodeinfo->magic = NODEINFO_MAGIC; @@ -239,10 +249,18 @@ extern int select_nodeinfo_set_all(time_t last_query_time) int i=0; bg_record_t *bg_record = NULL; static time_t last_set_all = 0; + uint32_t cluster_flags = slurmdb_setup_cluster_flags(); if (!blocks_are_created) return SLURM_NO_CHANGE_IN_DATA; + if (!g_bitmap_size) { + if (cluster_flags & CLUSTER_FLAG_BGQ) + g_bitmap_size = bg_conf->mp_cnode_cnt; + else + g_bitmap_size = bg_conf->ionodes_per_mp; + } + /* only set this once when the last_bg_update is newer than the last time we set things up. */ if (last_set_all && (last_bg_update-1 < last_set_all)) { @@ -265,14 +283,15 @@ extern int select_nodeinfo_set_all(time_t last_query_time) xassert(nodeinfo); xassert(nodeinfo->subgrp_list); list_flush(nodeinfo->subgrp_list); - if (nodeinfo->bitmap_size != bg_conf->ionodes_per_mp) - nodeinfo->bitmap_size = bg_conf->ionodes_per_mp; + if (nodeinfo->bitmap_size != g_bitmap_size) + nodeinfo->bitmap_size = g_bitmap_size; } itr = list_iterator_create(bg_lists->main); while ((bg_record = list_next(itr))) { enum node_states state = NODE_STATE_UNKNOWN; node_subgrp_t *subgrp = NULL; select_nodeinfo_t *nodeinfo; + bitstr_t *bitmap; /* Only mark unidle blocks */ if (bg_record->job_running == NO_JOB_RUNNING) @@ -292,8 +311,13 @@ extern int select_nodeinfo_set_all(time_t last_query_time) bg_block_state_string(bg_record->state)); continue; } + if ((cluster_flags & CLUSTER_FLAG_BGQ) + && (state != NODE_STATE_ERROR)) + bitmap = bg_record->cnodes_used_bitmap; + else + bitmap = bg_record->ionode_bitmap; - for(i=0; i<node_record_count; i++) { + for (i=0; i<node_record_count; i++) { if (!bit_test(bg_record->bitmap, i)) continue; node_ptr = &(node_record_table_ptr[i]); @@ -303,21 +327,25 @@ extern int select_nodeinfo_set_all(time_t last_query_time) xassert(nodeinfo); xassert(nodeinfo->subgrp_list); - subgrp = _find_subgrp( - nodeinfo->subgrp_list, - state, bg_conf->ionodes_per_mp); - - if (subgrp->node_cnt < bg_conf->mp_node_cnt) { - if (bg_record->node_cnt - < bg_conf->mp_node_cnt) { - bit_or(subgrp->bitmap, - bg_record->ionode_bitmap); - subgrp->node_cnt += bg_record->node_cnt; + subgrp = _find_subgrp(nodeinfo->subgrp_list, + state, g_bitmap_size); + + if (subgrp->cnode_cnt < bg_conf->mp_cnode_cnt) { + if (cluster_flags & CLUSTER_FLAG_BGQ) { + bit_or(subgrp->bitmap, bitmap); + subgrp->cnode_cnt += + bit_set_count(bitmap); + } else if (bg_record->cnode_cnt + < bg_conf->mp_cnode_cnt) { + bit_or(subgrp->bitmap, bitmap); + subgrp->cnode_cnt += + bg_record->cnode_cnt; } else { bit_nset(subgrp->bitmap, 0, - (bg_conf->ionodes_per_mp-1)); - subgrp->node_cnt = bg_conf->mp_node_cnt; + (g_bitmap_size-1)); + subgrp->cnode_cnt = + bg_conf->mp_cnode_cnt; } } } @@ -367,7 +395,7 @@ extern int select_nodeinfo_get(select_nodeinfo_t *nodeinfo, itr = list_iterator_create(nodeinfo->subgrp_list); while ((subgrp = list_next(itr))) { if (subgrp->state == state) { - *uint16 = subgrp->node_cnt; + *uint16 = subgrp->cnode_cnt; break; } } diff --git a/src/plugins/select/bluegene/bg_node_info.h b/src/plugins/select/bluegene/bg_node_info.h index bcee05de17f0ac5188905f81823f6a7af05bd963..6f287630e20d9dc64df9904cfed3c4c1a6b986fd 100644 --- a/src/plugins/select/bluegene/bg_node_info.h +++ b/src/plugins/select/bluegene/bg_node_info.h @@ -45,8 +45,8 @@ typedef struct { bitstr_t *bitmap; + uint16_t cnode_cnt; int *inx; - uint16_t node_cnt; enum node_states state; char *str; } node_subgrp_t; diff --git a/src/plugins/select/bluegene/bg_read_config.c b/src/plugins/select/bluegene/bg_read_config.c index 1b1e4984bde3adca26806b14e53ad7ddd8e51b09..4036cd45eaacd2cf670239271d988bc2682b4c80 100644 --- a/src/plugins/select/bluegene/bg_read_config.c +++ b/src/plugins/select/bluegene/bg_read_config.c @@ -534,36 +534,36 @@ extern int read_bg_conf(void) } if (!s_p_get_uint16( - &bg_conf->mp_node_cnt, "BasePartitionNodeCnt", tbl)) { + &bg_conf->mp_cnode_cnt, "BasePartitionNodeCnt", tbl)) { error("BasePartitionNodeCnt not configured in bluegene.conf " "defaulting to 512 as BasePartitionNodeCnt"); - bg_conf->mp_node_cnt = 512; - bg_conf->quarter_node_cnt = 128; + bg_conf->mp_cnode_cnt = 512; + bg_conf->quarter_cnode_cnt = 128; } else { - if (bg_conf->mp_node_cnt <= 0) + if (bg_conf->mp_cnode_cnt <= 0) fatal("You should have more than 0 nodes " "per base partition"); - bg_conf->quarter_node_cnt = bg_conf->mp_node_cnt/4; + bg_conf->quarter_cnode_cnt = bg_conf->mp_cnode_cnt/4; } /* bg_conf->cpus_per_mp should had already been set from the * node_init */ - if (bg_conf->cpus_per_mp < bg_conf->mp_node_cnt) { + if (bg_conf->cpus_per_mp < bg_conf->mp_cnode_cnt) { fatal("For some reason we have only %u cpus per mp, but " "have %u cnodes per mp. You need at least the same " "number of cpus as you have cnodes per mp. " "Check the NodeName Procs= " "definition in the slurm.conf.", - bg_conf->cpus_per_mp, bg_conf->mp_node_cnt); + bg_conf->cpus_per_mp, bg_conf->mp_cnode_cnt); } - bg_conf->cpu_ratio = bg_conf->cpus_per_mp/bg_conf->mp_node_cnt; + bg_conf->cpu_ratio = bg_conf->cpus_per_mp/bg_conf->mp_cnode_cnt; if (!bg_conf->cpu_ratio) fatal("We appear to have less than 1 cpu on a cnode. " "You specified %u for BasePartitionNodeCnt " "in the blugene.conf and %u cpus " "for each node in the slurm.conf", - bg_conf->mp_node_cnt, bg_conf->cpus_per_mp); + bg_conf->mp_cnode_cnt, bg_conf->cpus_per_mp); num_unused_cpus = 1; for (i = 0; i<SYSTEM_DIMENSIONS; i++) @@ -571,17 +571,17 @@ extern int read_bg_conf(void) num_unused_cpus *= bg_conf->cpus_per_mp; if (!s_p_get_uint16( - &bg_conf->nodecard_node_cnt, "NodeCardNodeCnt", tbl)) { + &bg_conf->nodecard_cnode_cnt, "NodeCardNodeCnt", tbl)) { error("NodeCardNodeCnt not configured in bluegene.conf " "defaulting to 32 as NodeCardNodeCnt"); - bg_conf->nodecard_node_cnt = 32; + bg_conf->nodecard_cnode_cnt = 32; } - if (bg_conf->nodecard_node_cnt<=0) + if (bg_conf->nodecard_cnode_cnt<=0) fatal("You should have more than 0 nodes per nodecard"); bg_conf->mp_nodecard_cnt = - bg_conf->mp_node_cnt / bg_conf->nodecard_node_cnt; + bg_conf->mp_cnode_cnt / bg_conf->nodecard_cnode_cnt; if (!s_p_get_uint16(&bg_conf->ionodes_per_mp, "Numpsets", tbl)) fatal("Warning: Numpsets not configured in bluegene.conf"); @@ -603,7 +603,7 @@ extern int read_bg_conf(void) int small_size = 1; /* THIS IS A HACK TO MAKE A 1 NODECARD SYSTEM WORK */ - if (bg_conf->mp_node_cnt == bg_conf->nodecard_node_cnt) { + if (bg_conf->mp_cnode_cnt == bg_conf->nodecard_cnode_cnt) { bg_conf->quarter_ionode_cnt = 2; bg_conf->nodecard_ionode_cnt = 2; } else { @@ -614,14 +614,14 @@ extern int read_bg_conf(void) /* How many nodecards per ionode */ bg_conf->nc_ratio = - ((double)bg_conf->mp_node_cnt - / (double)bg_conf->nodecard_node_cnt) + ((double)bg_conf->mp_cnode_cnt + / (double)bg_conf->nodecard_cnode_cnt) / (double)bg_conf->ionodes_per_mp; /* How many ionodes per nodecard */ bg_conf->io_ratio = (double)bg_conf->ionodes_per_mp / - ((double)bg_conf->mp_node_cnt - / (double)bg_conf->nodecard_node_cnt); + ((double)bg_conf->mp_cnode_cnt + / (double)bg_conf->nodecard_cnode_cnt); //info("got %f %f", bg_conf->nc_ratio, bg_conf->io_ratio); /* figure out the smallest block we can have on the system */ @@ -673,7 +673,7 @@ extern int read_bg_conf(void) /* If we only have 1 nodecard just jump to the end since this will never need to happen below. Pretty much a hack to avoid seg fault;). */ - if (bg_conf->mp_node_cnt == bg_conf->nodecard_node_cnt) + if (bg_conf->mp_cnode_cnt == bg_conf->nodecard_cnode_cnt) goto no_calc; bg_lists->valid_small128 = list_create(_destroy_bitmap); diff --git a/src/plugins/select/bluegene/bg_record_functions.c b/src/plugins/select/bluegene/bg_record_functions.c index 44e0c062072159c50250c82f4356316a138b5285..df7e73262f650df775ac63a48f9b7fa6b61019f8 100644 --- a/src/plugins/select/bluegene/bg_record_functions.c +++ b/src/plugins/select/bluegene/bg_record_functions.c @@ -61,10 +61,10 @@ extern void print_bg_record(bg_record_t* bg_record) info(" bg_record: "); if (bg_record->bg_block_id) info("\tbg_block_id: %s", bg_record->bg_block_id); - info("\tnodes: %s", bg_record->nodes); + info("\tnodes: %s", bg_record->mp_str); info("\tsize: %d MPs %u Nodes %d cpus", bg_record->mp_count, - bg_record->node_cnt, + bg_record->cnode_cnt, bg_record->cpu_cnt); info("\tgeo: %ux%ux%u", bg_record->geo[X], bg_record->geo[Y], bg_record->geo[Z]); @@ -101,8 +101,8 @@ extern void destroy_bg_record(void *object) xfree(bg_record->bg_block_id); FREE_NULL_BITMAP(bg_record->bitmap); xfree(bg_record->blrtsimage); - - xfree(bg_record->ionodes); + FREE_NULL_BITMAP(bg_record->cnodes_used_bitmap); + xfree(bg_record->ionode_str); FREE_NULL_BITMAP(bg_record->ionode_bitmap); if (bg_record->job_list) { @@ -112,7 +112,7 @@ extern void destroy_bg_record(void *object) xfree(bg_record->linuximage); xfree(bg_record->mloaderimage); - xfree(bg_record->nodes); + xfree(bg_record->mp_str); xfree(bg_record->ramdiskimage); xfree(bg_record->reason); xfree(bg_record->target_name); @@ -146,7 +146,7 @@ extern void process_nodes(bg_record_t *bg_record, bool startup) } if (!bg_record->ba_mp_list || !list_count(bg_record->ba_mp_list)) { - char *nodes = bg_record->nodes; + char *nodes = bg_record->mp_str; if (!bg_record->ba_mp_list) bg_record->ba_mp_list = list_create(destroy_ba_mp); @@ -157,7 +157,7 @@ extern void process_nodes(bg_record_t *bg_record, bool startup) error("process_nodes: " "We shouldn't be here there could be some " "badness if we use this logic %s", - bg_record->nodes); + bg_record->mp_str); while (nodes[j] != '\0') { int mid = j + SYSTEM_DIMENSIONS + 1; int fin = mid + SYSTEM_DIMENSIONS + 1; @@ -203,7 +203,7 @@ extern void process_nodes(bg_record_t *bg_record, bool startup) tmp_char); } } - if (bg_record->nodes[j] != ',') + if (bg_record->mp_str[j] != ',') break; } @@ -275,14 +275,14 @@ extern void process_nodes(bg_record_t *bg_record, bool startup) } if (dim == SYSTEM_DIMENSIONS) bg_record->full_block = 1; - } else if (bg_record->node_cnt == bg_conf->mp_node_cnt) + } else if (bg_record->cnode_cnt == bg_conf->mp_cnode_cnt) bg_record->full_block = 1; - if (node_name2bitmap(bg_record->nodes, + if (node_name2bitmap(bg_record->mp_str, false, &bg_record->bitmap)) { fatal("process_nodes: Unable to convert nodes %s to bitmap", - bg_record->nodes); + bg_record->mp_str); } return; } @@ -348,13 +348,23 @@ extern void copy_bg_record(bg_record_t *fir_record, bg_record_t *sec_record) FREE_NULL_BITMAP(sec_record->bitmap); if (fir_record->bitmap && (sec_record->bitmap = bit_copy(fir_record->bitmap)) == NULL) { - error("Unable to copy bitmap for %s", fir_record->nodes); + error("Unable to copy bitmap for %s", fir_record->mp_str); sec_record->bitmap = NULL; } sec_record->boot_state = fir_record->boot_state; sec_record->boot_count = fir_record->boot_count; - sec_record->mp_count = fir_record->mp_count; + + FREE_NULL_BITMAP(sec_record->cnodes_used_bitmap); + if (fir_record->cnodes_used_bitmap + && (sec_record->cnodes_used_bitmap + = bit_copy(fir_record->cnodes_used_bitmap)) == NULL) { + error("Unable to copy cnodes_used_bitmap for %s", + fir_record->mp_str); + sec_record->cnodes_used_bitmap = NULL; + } + sec_record->cnode_cnt = fir_record->cnode_cnt; + memcpy(sec_record->conn_type, fir_record->conn_type, sizeof(sec_record->conn_type)); sec_record->cpu_cnt = fir_record->cpu_cnt; @@ -366,15 +376,15 @@ extern void copy_bg_record(bg_record_t *fir_record, bg_record_t *sec_record) sec_record->start[i] = fir_record->start[i]; } - xfree(sec_record->ionodes); - sec_record->ionodes = xstrdup(fir_record->ionodes); + xfree(sec_record->ionode_str); + sec_record->ionode_str = xstrdup(fir_record->ionode_str); FREE_NULL_BITMAP(sec_record->ionode_bitmap); if (fir_record->ionode_bitmap && (sec_record->ionode_bitmap = bit_copy(fir_record->ionode_bitmap)) == NULL) { error("Unable to copy ionode_bitmap for %s", - fir_record->nodes); + fir_record->mp_str); sec_record->ionode_bitmap = NULL; } @@ -397,10 +407,10 @@ extern void copy_bg_record(bg_record_t *fir_record, bg_record_t *sec_record) sec_record->modifying = fir_record->modifying; - xfree(sec_record->nodes); - sec_record->nodes = xstrdup(fir_record->nodes); + sec_record->mp_count = fir_record->mp_count; - sec_record->node_cnt = fir_record->node_cnt; + xfree(sec_record->mp_str); + sec_record->mp_str = xstrdup(fir_record->mp_str); #ifdef HAVE_BGL sec_record->node_use = fir_record->node_use; @@ -430,21 +440,21 @@ extern void copy_bg_record(bg_record_t *fir_record, bg_record_t *sec_record) */ extern int bg_record_cmpf_inc(bg_record_t* rec_a, bg_record_t* rec_b) { - int size_a = rec_a->node_cnt; - int size_b = rec_b->node_cnt; + int size_a = rec_a->cnode_cnt; + int size_b = rec_b->cnode_cnt; /* We only look at this if we are ordering blocks larger than * a midplane, order of ionodes is how we order otherwise. */ - if ((size_a >= bg_conf->mp_node_cnt) - || (size_b >= bg_conf->mp_node_cnt)) { + if ((size_a >= bg_conf->mp_cnode_cnt) + || (size_b >= bg_conf->mp_cnode_cnt)) { if (size_a < size_b) return -1; else if (size_a > size_b) return 1; } - if (rec_a->nodes && rec_b->nodes) { - size_a = strcmp(rec_a->nodes, rec_b->nodes); + if (rec_a->mp_str && rec_b->mp_str) { + size_a = strcmp(rec_a->mp_str, rec_b->mp_str); if (size_a < 0) return -1; else if (size_a > 0) @@ -666,9 +676,10 @@ extern int add_bg_record(List records, List *used_nodes, conn_type_string(blockreq->conn_type[0])); #endif /* Set the bitmap blank here if it is a full node we don't - want anything set we also don't want the bg_record->ionodes set. + want anything set we also don't want the bg_record->ionode_str set. */ bg_record->ionode_bitmap = bit_alloc(bg_conf->ionodes_per_mp); + bg_record->cnodes_used_bitmap = bit_alloc(bg_conf->mp_cnode_cnt); len = strlen(blockreq->save_name); i=0; @@ -683,8 +694,8 @@ extern int add_bg_record(List records, List *used_nodes, len -= i; len += strlen(bg_conf->slurm_node_prefix)+1; - bg_record->nodes = xmalloc(len); - snprintf(bg_record->nodes, len, "%s%s", + bg_record->mp_str = xmalloc(len); + snprintf(bg_record->mp_str, len, "%s%s", bg_conf->slurm_node_prefix, blockreq->save_name+i); } else fatal("add_bg_record: MPs=%s is in a weird format", @@ -699,7 +710,7 @@ extern int add_bg_record(List records, List *used_nodes, sizeof(bg_record->conn_type)); bg_record->cpu_cnt = bg_conf->cpus_per_mp * bg_record->mp_count; - bg_record->node_cnt = bg_conf->mp_node_cnt * bg_record->mp_count; + bg_record->cnode_cnt = bg_conf->mp_cnode_cnt * bg_record->mp_count; bg_record->job_running = NO_JOB_RUNNING; #ifdef HAVE_BGL @@ -786,16 +797,16 @@ extern int add_bg_record(List records, List *used_nodes, blockreq->small128=4; } - i = (blockreq->small32*bg_conf->nodecard_node_cnt) + - (blockreq->small128*bg_conf->quarter_node_cnt); - if (i != bg_conf->mp_node_cnt) + i = (blockreq->small32*bg_conf->nodecard_cnode_cnt) + + (blockreq->small128*bg_conf->quarter_cnode_cnt); + if (i != bg_conf->mp_cnode_cnt) fatal("add_bg_record: " "There is an error in your bluegene.conf file.\n" "I am unable to request %d nodes consisting of " "%u 32CnBlocks and\n%u 128CnBlocks in one " "base partition with %u nodes.", i, blockreq->small32, blockreq->small128, - bg_conf->mp_node_cnt); + bg_conf->mp_cnode_cnt); small_count = blockreq->small32+blockreq->small128; #else if (!blockreq->small16 && !blockreq->small32 @@ -812,7 +823,7 @@ extern int add_bg_record(List records, List *used_nodes, + (blockreq->small64*64) + (blockreq->small128*128) + (blockreq->small256*256); - if (i != bg_conf->mp_node_cnt) + if (i != bg_conf->mp_cnode_cnt) fatal("add_bg_record: " "There is an error in your bluegene.conf file.\n" "I am unable to request %d nodes consisting of " @@ -822,7 +833,7 @@ extern int add_bg_record(List records, List *used_nodes, "in one base partition with %u nodes.", i, blockreq->small16, blockreq->small32, blockreq->small64, blockreq->small128, - blockreq->small256, bg_conf->mp_node_cnt); + blockreq->small256, bg_conf->mp_cnode_cnt); small_count = blockreq->small16 + blockreq->small32 + blockreq->small64 @@ -839,8 +850,8 @@ extern int add_bg_record(List records, List *used_nodes, bg_record->ba_mp_list = list_create(NULL); itr = list_iterator_create(ba_mp_list); while ((ba_mp = list_next(itr)) != NULL) { - xfree(bg_record->nodes); - bg_record->nodes = xstrdup_printf( + xfree(bg_record->mp_str); + bg_record->mp_str = xstrdup_printf( "%s%s", bg_conf->slurm_node_prefix, ba_mp->coord_str); @@ -946,12 +957,12 @@ extern int handle_small_record_request(List records, extern int format_node_name(bg_record_t *bg_record, char *buf, int buf_size) { - if (bg_record->ionodes) { + if (bg_record->ionode_str) { snprintf(buf, buf_size, "%s[%s]", - bg_record->nodes, - bg_record->ionodes); + bg_record->mp_str, + bg_record->ionode_str); } else { - snprintf(buf, buf_size, "%s", bg_record->nodes); + snprintf(buf, buf_size, "%s", bg_record->mp_str); } return SLURM_SUCCESS; } @@ -987,8 +998,8 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, /* make sure we create something that is able to be created */ - if (bg_conf->smallest_block < bg_conf->nodecard_node_cnt) - create_size = bg_conf->nodecard_node_cnt; + if (bg_conf->smallest_block < bg_conf->nodecard_cnode_cnt) + create_size = bg_conf->nodecard_cnode_cnt; else create_size = bg_conf->smallest_block; } @@ -1022,7 +1033,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, memset(&tmp_record, 0, sizeof(bg_record_t)); tmp_record.mp_count = 1; - tmp_record.node_cnt = bg_conf->nodecard_node_cnt; + tmp_record.cnode_cnt = bg_conf->nodecard_cnode_cnt; tmp_record.bitmap = bit_alloc(node_record_count); bit_set(tmp_record.bitmap, mp_bit); @@ -1049,7 +1060,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, smaller than the create size just continue on. */ if ((bg_conf->layout_mode == LAYOUT_DYNAMIC) - && (bg_record->node_cnt < create_size)) { + && (bg_record->cnode_cnt < create_size)) { if (!delete_list) delete_list = list_create(NULL); list_append(delete_list, bg_record); @@ -1059,7 +1070,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, /* keep track of the smallest size that is at least the size of create_size. */ if (!smallest_bg_record || - (smallest_bg_record->node_cnt > bg_record->node_cnt)) + (smallest_bg_record->cnode_cnt > bg_record->cnode_cnt)) smallest_bg_record = bg_record; } list_iterator_destroy(itr); @@ -1076,7 +1087,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, opposed to draining the node. */ if (smallest_bg_record - && (smallest_bg_record->node_cnt < bg_conf->mp_node_cnt)){ + && (smallest_bg_record->cnode_cnt < bg_conf->mp_cnode_cnt)){ if (smallest_bg_record->state == BG_BLOCK_ERROR) { rc = SLURM_NO_CHANGE_IN_DATA; goto cleanup; @@ -1132,11 +1143,11 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, block) set io_start = 0. */ if ((io_start = bit_ffs(iobitmap)) == -1) { io_start = 0; - if (create_size > bg_conf->nodecard_node_cnt) + if (create_size > bg_conf->nodecard_cnode_cnt) blockreq.small128 = 4; else blockreq.small32 = 16; - } else if (create_size <= bg_conf->nodecard_node_cnt) + } else if (create_size <= bg_conf->nodecard_cnode_cnt) blockreq.small32 = 1; else /* this should never happen */ @@ -1154,13 +1165,13 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, while (smallest_bg_record->job_running > NO_JOB_RUNNING) sleep(1); - if (smallest_bg_record->node_cnt == create_size) { + if (smallest_bg_record->cnode_cnt == create_size) { rc = put_block_in_error_state( smallest_bg_record, BLOCK_ERROR_STATE, reason); goto cleanup; } - if (create_size > smallest_bg_record->node_cnt) { + if (create_size > smallest_bg_record->cnode_cnt) { /* we should never get here. This means we * have a create_size that is bigger than a * block that is already made. @@ -1169,8 +1180,8 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, smallest_bg_record, BLOCK_ERROR_STATE, reason); goto cleanup; } - debug3("node count is %d", smallest_bg_record->node_cnt); - switch(smallest_bg_record->node_cnt) { + debug3("node count is %d", smallest_bg_record->cnode_cnt); + switch(smallest_bg_record->cnode_cnt) { #ifndef HAVE_BGL case 64: blockreq.small32 = 2; @@ -1188,7 +1199,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, break; } - if (create_size != bg_conf->nodecard_node_cnt) { + if (create_size != bg_conf->nodecard_cnode_cnt) { blockreq.small128 = blockreq.small32 / 4; blockreq.small32 = 0; io_start = 0; diff --git a/src/plugins/select/bluegene/bg_structs.h b/src/plugins/select/bluegene/bg_structs.h index 8580adcfba1afc87f2684884e2fc4489b73ac37f..114ebd361c33db085b3097ea85410af08dbabdbe 100644 --- a/src/plugins/select/bluegene/bg_structs.h +++ b/src/plugins/select/bluegene/bg_structs.h @@ -65,12 +65,12 @@ typedef struct { bg_layout_t layout_mode; List linux_list; List mloader_list; - uint16_t mp_node_cnt; + uint16_t mp_cnode_cnt; uint16_t mp_nodecard_cnt; double nc_ratio; - uint16_t nodecard_node_cnt; + uint16_t nodecard_cnode_cnt; uint16_t nodecard_ionode_cnt; - uint16_t quarter_node_cnt; + uint16_t quarter_cnode_cnt; uint16_t quarter_ionode_cnt; List ramdisk_list; uint32_t slurm_debug_flags; @@ -94,7 +94,7 @@ typedef struct bg_record { void *bg_block; /* needed for L/P systems */ char *bg_block_id; /* ID returned from MMCS */ List ba_mp_list; /* List of midplanes in block */ - bitstr_t *bitmap; /* bitmap to check the nodes + bitstr_t *bitmap; /* bitmap to check the midplanes of block */ char *blrtsimage; /* BlrtsImage for this block */ int boot_count; /* number of attemts boot attempts */ @@ -102,7 +102,8 @@ typedef struct bg_record { -1 = fail, 0 = not booting, 1 = booting */ - int mp_count; /* size */ + bitstr_t *cnodes_used_bitmap; /* cnodes used in this bitmap */ + uint32_t cnode_cnt; /* count of cnodes per block */ uint16_t conn_type[SYSTEM_DIMENSIONS]; /* MESH or Torus or NAV */ uint32_t cpu_cnt; /* count of cpus per block */ int free_cnt; /* How many are trying @@ -111,11 +112,11 @@ typedef struct bg_record { bool full_block; /* whether or not block is the full block */ uint16_t geo[SYSTEM_DIMENSIONS]; /* geometry */ - char *ionodes; /* String of ionodes in block - * NULL if not a small block*/ bitstr_t *ionode_bitmap; /* for small blocks bitmap to keep track which ionodes we are on. NULL if not a small block*/ + char *ionode_str; /* String of ionodes in block + * NULL if not a small block*/ List job_list; /* List of jobs running on a small block */ struct job_record *job_ptr; /* pointer to job running on @@ -130,8 +131,8 @@ typedef struct bg_record { int modifying; /* flag to say the block is being modified or not at job launch usually */ - char *nodes; /* String of nodes in block */ - uint32_t node_cnt; /* count of cnodes per block */ + int mp_count; /* size */ + char *mp_str; /* String of midplanes in block */ uint16_t node_use; /* either COPROCESSOR or VIRTUAL */ struct bg_record *original; /* if this is a copy this is a pointer to the original */ diff --git a/src/plugins/select/bluegene/bl/bridge_linker.c b/src/plugins/select/bluegene/bl/bridge_linker.c index 004f03f7d4c957ff8e81fad959bb5262bb514570..9799ba07bdbcb4abf40441d65e78bd4497842024 100644 --- a/src/plugins/select/bluegene/bl/bridge_linker.c +++ b/src/plugins/select/bluegene/bl/bridge_linker.c @@ -497,9 +497,9 @@ static void _remove_jobs_on_block_and_reset(rm_job_list_t *job_list, bg_record->user_name); if (job_remove_failed) { - if (bg_record->nodes) + if (bg_record->mp_str) slurm_drain_nodes( - bg_record->nodes, + bg_record->mp_str, "_term_agent: Couldn't remove job", slurm_get_slurm_user_id()); else @@ -1774,9 +1774,9 @@ extern int bridge_blocks_load_curr(List curr_block_list) hostlist_push(hostlist, node_name_tmp); } - bg_record->nodes = hostlist_ranged_string_xmalloc(hostlist); + bg_record->mp_str = hostlist_ranged_string_xmalloc(hostlist); hostlist_destroy(hostlist); - debug3("got nodes of %s", bg_record->nodes); + debug3("got nodes of %s", bg_record->mp_str); // need to get the 000x000 range for nodes // also need to get coords diff --git a/src/plugins/select/bluegene/bl/bridge_switch_connections.c b/src/plugins/select/bluegene/bl/bridge_switch_connections.c index 80c073106261e0b5ebe44e387e31318c98fbe139..5fbe54d1b50aa4126b103d994f76305fd05a335e 100644 --- a/src/plugins/select/bluegene/bl/bridge_switch_connections.c +++ b/src/plugins/select/bluegene/bl/bridge_switch_connections.c @@ -462,7 +462,7 @@ extern int configure_small_block(bg_record_t *bg_record) if (num_ncards > num) { error("You requested more (%d > %d) nodecards " "than are available on this block %s", - num_ncards, num, bg_record->nodes); + num_ncards, num, bg_record->mp_str); } for(i=0; i<num; i++) { diff --git a/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc b/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc index 4ac076aa19c8515483792bc11aaeec4db680e334..ffed975f790d00f9ca506fb81ba65ff734b5bdf5 100644 --- a/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc +++ b/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc @@ -164,9 +164,9 @@ static void _remove_jobs_on_block_and_reset(char *block_id) bg_record->user_name); if (job_remove_failed) { - if (bg_record->nodes) + if (bg_record->mp_str) slurm_drain_nodes( - bg_record->nodes, + bg_record->mp_str, (char *) "_term_agent: Couldn't remove job", slurm_get_slurm_user_id()); @@ -863,9 +863,9 @@ extern int bridge_blocks_load_curr(List curr_block_list) hostlist_push(hostlist, temp); } - bg_record->nodes = hostlist_ranged_string_xmalloc(hostlist); + bg_record->mp_str = hostlist_ranged_string_xmalloc(hostlist); hostlist_destroy(hostlist); - debug3("got nodes of %s", bg_record->nodes); + debug3("got nodes of %s", bg_record->mp_str); process_nodes(bg_record, true); @@ -902,11 +902,11 @@ extern int bridge_blocks_load_curr(List curr_block_list) bg_block_id); xfree(bg_block_id); - if (strcmp(temp, bg_record->nodes)) { + if (strcmp(temp, bg_record->mp_str)) { fatal("bad wiring in preserved state " "(found %s, but allocated %s) " "YOU MUST COLDSTART", - bg_record->nodes, temp); + bg_record->mp_str, temp); } /* If a user is on the block this will be filled in */ diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index 42d70b476540113033df922649517c027f38546d..a4002347073fd5f196b15df95df6c6d4b3d9e242 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -328,8 +328,8 @@ static int _validate_config_nodes(List curr_block_list, while ((bg_record = list_next(itr_conf))) { list_iterator_reset(itr_curr); while ((init_bg_record = list_next(itr_curr))) { - if (strcasecmp(bg_record->nodes, - init_bg_record->nodes)) + if (strcasecmp(bg_record->mp_str, + init_bg_record->mp_str)) continue; /* wrong nodes */ if (!bit_equal(bg_record->ionode_bitmap, init_bg_record->ionode_bitmap)) @@ -436,7 +436,7 @@ static void _pack_block(bg_record_t *bg_record, Buf buffer, pack32(1, buffer); /* for dimensions of conn_type */ pack16(bg_record->conn_type[0], buffer); #endif - packstr(bg_record->ionodes, buffer); + packstr(bg_record->ionode_str, buffer); pack_bit_fmt(bg_record->ionode_bitmap, buffer); if (bg_record->job_list) @@ -455,8 +455,8 @@ static void _pack_block(bg_record_t *bg_record, Buf buffer, pack32((uint32_t)bg_record->job_running, buffer); packstr(bg_record->linuximage, buffer); packstr(bg_record->mloaderimage, buffer); - packstr(bg_record->nodes, buffer); - pack32((uint32_t)bg_record->node_cnt, buffer); + packstr(bg_record->mp_str, buffer); + pack32((uint32_t)bg_record->cnode_cnt, buffer); pack16((uint16_t)bg_record->node_use, buffer); packstr(bg_record->user_name, buffer); packstr(bg_record->ramdiskimage, buffer); @@ -469,13 +469,13 @@ static void _pack_block(bg_record_t *bg_record, Buf buffer, #endif pack_bit_fmt(bg_record->bitmap, buffer); pack16((uint16_t)bg_record->conn_type[0], buffer); - packstr(bg_record->ionodes, buffer); + packstr(bg_record->ionode_str, buffer); pack_bit_fmt(bg_record->ionode_bitmap, buffer); pack32((uint32_t)bg_record->job_running, buffer); packstr(bg_record->linuximage, buffer); packstr(bg_record->mloaderimage, buffer); - packstr(bg_record->nodes, buffer); - pack32((uint32_t)bg_record->node_cnt, buffer); + packstr(bg_record->mp_str, buffer); + pack32((uint32_t)bg_record->cnode_cnt, buffer); #ifdef HAVE_BGL pack16((uint16_t)bg_record->node_use, buffer); #endif @@ -490,13 +490,13 @@ static void _pack_block(bg_record_t *bg_record, Buf buffer, #endif pack_bit_fmt(bg_record->bitmap, buffer); pack16((uint16_t)bg_record->conn_type[0], buffer); - packstr(bg_record->ionodes, buffer); + packstr(bg_record->ionode_str, buffer); pack_bit_fmt(bg_record->ionode_bitmap, buffer); pack32((uint32_t)bg_record->job_running, buffer); packstr(bg_record->linuximage, buffer); packstr(bg_record->mloaderimage, buffer); - packstr(bg_record->nodes, buffer); - pack32((uint32_t)bg_record->node_cnt, buffer); + packstr(bg_record->mp_str, buffer); + pack32((uint32_t)bg_record->cnode_cnt, buffer); #ifdef HAVE_BGL pack16((uint16_t)bg_record->node_use, buffer); #endif @@ -516,7 +516,7 @@ static List _get_config(void) key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("MidPlaneNodeCnt"); - key_pair->value = xstrdup_printf("%u", bg_conf->mp_node_cnt); + key_pair->value = xstrdup_printf("%u", bg_conf->mp_cnode_cnt); list_append(my_list, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); @@ -603,7 +603,7 @@ static List _get_config(void) key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("NodeCardNodeCnt"); - key_pair->value = xstrdup_printf("%u", bg_conf->nodecard_node_cnt); + key_pair->value = xstrdup_printf("%u", bg_conf->nodecard_cnode_cnt); list_append(my_list, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); @@ -631,11 +631,11 @@ extern int init(void) */ bg_conf = xmalloc(sizeof(bg_config_t)); /* set some defaults for most systems */ - bg_conf->mp_node_cnt = 512; - bg_conf->quarter_node_cnt = 128; - bg_conf->nodecard_node_cnt = 32; - bg_conf->mp_nodecard_cnt = bg_conf->mp_node_cnt - / bg_conf->nodecard_node_cnt; + bg_conf->mp_cnode_cnt = 512; + bg_conf->quarter_cnode_cnt = 128; + bg_conf->nodecard_cnode_cnt = 32; + bg_conf->mp_nodecard_cnt = bg_conf->mp_cnode_cnt + / bg_conf->nodecard_cnode_cnt; } if (bg_recover != NOT_FROM_CONTROLLER) { #if defined HAVE_BG_L_P && (SYSTEM_DIMENSIONS != 3) @@ -925,7 +925,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt) { #ifdef HAVE_BG if (node_cnt>0 && bg_conf) - if (node_ptr->cpus >= bg_conf->mp_node_cnt) + if (node_ptr->cpus >= bg_conf->mp_cnode_cnt) bg_conf->cpus_per_mp = node_ptr->cpus; return SLURM_SUCCESS; @@ -1309,7 +1309,7 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr) snprintf(reason, sizeof(reason), "update_block: " "Removed all blocks on midplane %s", - bg_record->nodes); + bg_record->mp_str); } else snprintf(reason, sizeof(reason), @@ -1574,12 +1574,12 @@ extern int select_p_update_sub_node (update_block_msg_t *block_desc_ptr) memset(coord, 0, sizeof(coord)); memset(ionodes, 0, 128); - if (!block_desc_ptr->nodes) { + if (!block_desc_ptr->mp_str) { error("update_sub_node: No name specified"); rc = ESLURM_INVALID_BLOCK_NAME; goto end_it; } - name = block_desc_ptr->nodes; + name = block_desc_ptr->mp_str; while (name[j] != '\0') { if (name[j] == '[') { @@ -1766,7 +1766,7 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data) int i; uint16_t req_geometry[SYSTEM_DIMENSIONS]; - if (!bg_conf->mp_node_cnt) { + if (!bg_conf->mp_cnode_cnt) { fatal("select_p_alter_node_cnt: This can't be called " "before init"); } @@ -1774,7 +1774,7 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data) switch (type) { case SELECT_GET_NODE_SCALING: if ((*nodes) != INFINITE) - (*nodes) = bg_conf->mp_node_cnt; + (*nodes) = bg_conf->mp_cnode_cnt; break; case SELECT_GET_NODE_CPU_CNT: if ((*cpus) != (uint16_t)INFINITE) @@ -1787,9 +1787,9 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data) case SELECT_SET_MP_CNT: if (((*nodes) == INFINITE) || ((*nodes) == NO_VAL)) tmp = (*nodes); - else if ((*nodes) > bg_conf->mp_node_cnt) { + else if ((*nodes) > bg_conf->mp_cnode_cnt) { tmp = (*nodes); - tmp /= bg_conf->mp_node_cnt; + tmp /= bg_conf->mp_cnode_cnt; if (tmp < 1) tmp = 1; } else @@ -1803,11 +1803,11 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data) * don't scale up this value. */ break; } - (*nodes) *= bg_conf->mp_node_cnt; + (*nodes) *= bg_conf->mp_cnode_cnt; break; case SELECT_APPLY_NODE_MAX_OFFSET: if ((*nodes) != INFINITE) - (*nodes) *= bg_conf->mp_node_cnt; + (*nodes) *= bg_conf->mp_cnode_cnt; break; case SELECT_SET_NODE_CNT: get_select_jobinfo(job_desc->select_jobinfo->data, @@ -1831,7 +1831,7 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data) for (i=0; i<SYSTEM_DIMENSIONS; i++) job_desc->min_nodes *= (uint16_t)req_geometry[i]; - job_desc->min_nodes *= bg_conf->mp_node_cnt; + job_desc->min_nodes *= bg_conf->mp_cnode_cnt; job_desc->max_nodes = job_desc->min_nodes; } @@ -1851,18 +1851,18 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data) job_desc->max_nodes = job_desc->min_nodes; /* See if min_nodes is greater than one base partition */ - if (job_desc->min_nodes > bg_conf->mp_node_cnt) { + if (job_desc->min_nodes > bg_conf->mp_cnode_cnt) { /* * if it is make sure it is a factor of - * bg_conf->mp_node_cnt, if it isn't make it + * bg_conf->mp_cnode_cnt, if it isn't make it * that way */ - tmp = job_desc->min_nodes % bg_conf->mp_node_cnt; + tmp = job_desc->min_nodes % bg_conf->mp_cnode_cnt; if (tmp > 0) job_desc->min_nodes += - (bg_conf->mp_node_cnt-tmp); + (bg_conf->mp_cnode_cnt-tmp); } - tmp = job_desc->min_nodes / bg_conf->mp_node_cnt; + tmp = job_desc->min_nodes / bg_conf->mp_cnode_cnt; /* this means it is greater or equal to one mp */ if (tmp > 0) { @@ -1873,29 +1873,29 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data) job_desc->min_cpus = bg_conf->cpus_per_mp * tmp; } else { #ifdef HAVE_BGL - if (job_desc->min_nodes <= bg_conf->nodecard_node_cnt + if (job_desc->min_nodes <= bg_conf->nodecard_cnode_cnt && bg_conf->nodecard_ionode_cnt) job_desc->min_nodes = - bg_conf->nodecard_node_cnt; + bg_conf->nodecard_cnode_cnt; else if (job_desc->min_nodes - <= bg_conf->quarter_node_cnt) + <= bg_conf->quarter_cnode_cnt) job_desc->min_nodes = - bg_conf->quarter_node_cnt; + bg_conf->quarter_cnode_cnt; else job_desc->min_nodes = - bg_conf->mp_node_cnt; + bg_conf->mp_cnode_cnt; set_select_jobinfo(job_desc->select_jobinfo->data, SELECT_JOBDATA_NODE_CNT, &job_desc->min_nodes); - tmp = bg_conf->mp_node_cnt/job_desc->min_nodes; + tmp = bg_conf->mp_cnode_cnt/job_desc->min_nodes; job_desc->min_cpus = bg_conf->cpus_per_mp/tmp; job_desc->min_nodes = 1; #else i = bg_conf->smallest_block; - while (i <= bg_conf->mp_node_cnt) { + while (i <= bg_conf->mp_cnode_cnt) { if (job_desc->min_nodes <= i) { job_desc->min_nodes = i; break; @@ -1913,13 +1913,13 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data) #endif } - if (job_desc->max_nodes > bg_conf->mp_node_cnt) { - tmp = job_desc->max_nodes % bg_conf->mp_node_cnt; + if (job_desc->max_nodes > bg_conf->mp_cnode_cnt) { + tmp = job_desc->max_nodes % bg_conf->mp_cnode_cnt; if (tmp > 0) job_desc->max_nodes += - (bg_conf->mp_node_cnt-tmp); + (bg_conf->mp_cnode_cnt-tmp); } - tmp = job_desc->max_nodes / bg_conf->mp_node_cnt; + tmp = job_desc->max_nodes / bg_conf->mp_cnode_cnt; if (tmp > 0) { job_desc->max_nodes = tmp; @@ -1928,24 +1928,24 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data) tmp = NO_VAL; } else { #ifdef HAVE_BGL - if (job_desc->max_nodes <= bg_conf->nodecard_node_cnt + if (job_desc->max_nodes <= bg_conf->nodecard_cnode_cnt && bg_conf->nodecard_ionode_cnt) job_desc->max_nodes = - bg_conf->nodecard_node_cnt; + bg_conf->nodecard_cnode_cnt; else if (job_desc->max_nodes - <= bg_conf->quarter_node_cnt) + <= bg_conf->quarter_cnode_cnt) job_desc->max_nodes = - bg_conf->quarter_node_cnt; + bg_conf->quarter_cnode_cnt; else job_desc->max_nodes = - bg_conf->mp_node_cnt; + bg_conf->mp_cnode_cnt; - tmp = bg_conf->mp_node_cnt/job_desc->max_nodes; + tmp = bg_conf->mp_cnode_cnt/job_desc->max_nodes; job_desc->max_cpus = bg_conf->cpus_per_mp/tmp; job_desc->max_nodes = 1; #else i = bg_conf->smallest_block; - while (i <= bg_conf->mp_node_cnt) { + while (i <= bg_conf->mp_cnode_cnt) { if (job_desc->max_nodes <= i) { job_desc->max_nodes = i; break; diff --git a/src/scontrol/scontrol.c b/src/scontrol/scontrol.c index f10e561192ebd45df13fa511e5c2b55b79348c40..6c151350998aed1f333e559eee0c9ed8c954ac32 100644 --- a/src/scontrol/scontrol.c +++ b/src/scontrol/scontrol.c @@ -1507,7 +1507,7 @@ _update_bluegene_block (int argc, char *argv[]) return 0; } else if (block_msg.state == (uint16_t)NO_VAL) { error("You didn't give me a state to set %s to " - "(i.e. FREE, ERROR).", block_msg.nodes); + "(i.e. FREE, ERROR).", block_msg.mp_str); return 0; } @@ -1557,7 +1557,7 @@ _update_bluegene_subbp (int argc, char *argv[]) } if (!strncasecmp(tag, "SubBPName", MAX(tag_len, 2))) - block_msg.nodes = val; + block_msg.mp_str = val; else if (!strncasecmp(tag, "State", MAX(tag_len, 2))) { if (!strncasecmp(val, "ERROR", MAX(vallen, 1))) block_msg.state = BG_BLOCK_ERROR; @@ -1580,12 +1580,12 @@ _update_bluegene_subbp (int argc, char *argv[]) } } - if(!block_msg.nodes) { + if(!block_msg.mp_str) { error("You didn't supply an ionode list."); return 0; } else if (block_msg.state == (uint16_t)NO_VAL) { error("You didn't give me a state to set %s to " - "(i.e. FREE, ERROR).", block_msg.nodes); + "(i.e. FREE, ERROR).", block_msg.mp_str); return 0; } diff --git a/src/sinfo/sinfo.c b/src/sinfo/sinfo.c index dd3a3a3e65ac5b8f69930e93315d3f9ac5b8f564..df687fc1bb185880a9a04c6d3b97324fc7c45667 100644 --- a/src/sinfo/sinfo.c +++ b/src/sinfo/sinfo.c @@ -69,9 +69,9 @@ static bool _filter_out(node_info_t *node_ptr); static int _get_info(bool clear_old); static void _sinfo_list_delete(void *data); static bool _match_node_data(sinfo_data_t *sinfo_ptr, - node_info_t *node_ptr); + node_info_t *node_ptr); static bool _match_part_data(sinfo_data_t *sinfo_ptr, - partition_info_t* part_ptr); + partition_info_t* part_ptr); static int _multi_cluster(List clusters); static int _query_server(partition_info_msg_t ** part_pptr, node_info_msg_t ** node_pptr, @@ -179,14 +179,14 @@ static int _bg_report(block_info_msg_t *block_ptr) } if (!params.no_header) - printf("BG_BLOCK NODES OWNER STATE CONNECTION USE\n"); + printf("BG_BLOCK MIDPLANES OWNER STATE CONNECTION USE\n"); /* 1234567890123456 123456789012 12345678 12345678 1234567890 12345+ */ /* RMP_22Apr1544018 bg[123x456] name READY TORUS COPROCESSOR */ for (i=0; i<block_ptr->record_count; i++) { printf("%-16.16s %-12.12s %-8.8s %-8.8s %-10.10s %s\n", block_ptr->block_array[i].bg_block_id, - block_ptr->block_array[i].nodes, + block_ptr->block_array[i].mp_str, block_ptr->block_array[i].owner_name, bg_block_state_string( block_ptr->block_array[i].state), @@ -204,7 +204,7 @@ static int _bg_report(block_info_msg_t *block_ptr) * part_pptr IN/OUT - partition information message * node_pptr IN/OUT - node information message * block_pptr IN/OUT - BlueGene block data - * clear_old IN - If set, then always replace old data, needed when going + * clear_old IN - If set, then always replace old data, needed when going * between clusters. * RET zero or error code */ @@ -559,7 +559,7 @@ static bool _match_node_data(sinfo_data_t *sinfo_ptr, node_info_t *node_ptr) } static bool _match_part_data(sinfo_data_t *sinfo_ptr, - partition_info_t* part_ptr) + partition_info_t* part_ptr) { if (part_ptr == sinfo_ptr->part_info) /* identical partition */ return true; @@ -572,7 +572,7 @@ static bool _match_part_data(sinfo_data_t *sinfo_ptr, if (params.match_flags.groups_flag && (_strcmp(part_ptr->allow_groups, - sinfo_ptr->part_info->allow_groups))) + sinfo_ptr->part_info->allow_groups))) return false; if (params.match_flags.job_size_flag && @@ -922,4 +922,3 @@ static int _strcmp(char *data1, char *data2) data2 = null_str; return strcmp(data1, data2); } - diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 3cb59d24edc16f778126a55972455e03b778f6a5..4b911fc532f14d38de8548cfd8d4b314d7879e05 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -3115,8 +3115,8 @@ static void _slurm_rpc_update_block(slurm_msg_t * msg) error("Security violation, UPDATE_BLOCK RPC from uid=%d", uid); if (block_desc_ptr->bg_block_id) { name = block_desc_ptr->bg_block_id; - } else if (block_desc_ptr->nodes) { - name = block_desc_ptr->nodes; + } else if (block_desc_ptr->mp_str) { + name = block_desc_ptr->mp_str; } } @@ -3126,10 +3126,10 @@ static void _slurm_rpc_update_block(slurm_msg_t * msg) error_code = select_g_update_block(block_desc_ptr); END_TIMER2("_slurm_rpc_update_block"); name = block_desc_ptr->bg_block_id; - } else if (block_desc_ptr->nodes) { + } else if (block_desc_ptr->mp_str) { error_code = select_g_update_sub_node(block_desc_ptr); END_TIMER2("_slurm_rpc_update_subbp"); - name = block_desc_ptr->nodes; + name = block_desc_ptr->mp_str; } else { error("Unknown update for blocks"); error_code = SLURM_ERROR; diff --git a/src/smap/partition_functions.c b/src/smap/partition_functions.c index e2727afcc2ed8d3ee85b879b5e82e1d13e9bc61d..ca03e3d796fdf1a873662c1bde0af244ca24d754 100644 --- a/src/smap/partition_functions.c +++ b/src/smap/partition_functions.c @@ -50,12 +50,12 @@ typedef struct { uint16_t bg_conn_type; uint16_t bg_node_use; char *bg_user_name; - char *ionodes; + char *ionode_str; int job_running; int letter_num; List nodelist; - char *nodes; - int node_cnt; + char *mp_str; + int cnode_cnt; bool printed; int size; char *slurm_part_name; @@ -281,7 +281,7 @@ extern void get_bg_part(void) if (!overlap) continue; } - if (params.io_bit && new_bg_ptr->block_array[i].ionodes) { + if (params.io_bit && new_bg_ptr->block_array[i].ionode_str) { int overlap = 0; bitstr_t *loc_bitmap = bit_alloc(bit_size(params.io_bit)); @@ -297,9 +297,9 @@ extern void get_bg_part(void) block_ptr->bg_block_name = xstrdup(new_bg_ptr->block_array[i].bg_block_id); - block_ptr->nodes = xstrdup(new_bg_ptr->block_array[i].nodes); + block_ptr->mp_str = xstrdup(new_bg_ptr->block_array[i].mp_str); block_ptr->nodelist = list_create(_nodelist_del); - _make_nodelist(block_ptr->nodes, block_ptr->nodelist); + _make_nodelist(block_ptr->mp_str, block_ptr->nodelist); block_ptr->bg_user_name = xstrdup(new_bg_ptr->block_array[i].owner_name); @@ -310,13 +310,13 @@ extern void get_bg_part(void) block_ptr->bg_node_use = new_bg_ptr->block_array[i].node_use; - block_ptr->ionodes - = xstrdup(new_bg_ptr->block_array[i].ionodes); - block_ptr->node_cnt = new_bg_ptr->block_array[i].node_cnt; + block_ptr->ionode_str + = xstrdup(new_bg_ptr->block_array[i].ionode_str); + block_ptr->cnode_cnt = new_bg_ptr->block_array[i].cnode_cnt; itr = list_iterator_create(block_list); while ((found_block = (db2_block_info_t*)list_next(itr))) { - if (!strcmp(block_ptr->nodes, found_block->nodes)) { + if (!strcmp(block_ptr->mp_str, found_block->mp_str)) { block_ptr->letter_num = found_block->letter_num; break; @@ -399,7 +399,7 @@ static void _marknodes(db2_block_info_t *block_ptr, int count) int i, j = 0; int start[params.cluster_dims]; int end[params.cluster_dims]; - char *nodes = block_ptr->nodes; + char *nodes = block_ptr->mp_str; block_ptr->letter_num = count; while (nodes[j] != '\0') { @@ -704,11 +704,11 @@ static int _print_text_part(partition_info_t *part_ptr, i++; } if ((params.display == BGPART) && db2_info_ptr && - (db2_info_ptr->ionodes)) { + (db2_info_ptr->ionode_str)) { mvwprintw(text_win, main_ycord, main_xcord, "[%s]", - db2_info_ptr->ionodes); + db2_info_ptr->ionode_str); } main_xcord = 1; @@ -780,8 +780,8 @@ static int _print_text_part(partition_info_t *part_ptr, nodes = part_ptr->nodes; if ((params.display == BGPART) && db2_info_ptr && - (db2_info_ptr->ionodes)) { - printf("%s[%s]\n", nodes, db2_info_ptr->ionodes); + (db2_info_ptr->ionode_str)) { + printf("%s[%s]\n", nodes, db2_info_ptr->ionode_str); } else printf("%s\n",nodes); } @@ -796,8 +796,8 @@ static void _block_list_del(void *object) xfree(block_ptr->bg_user_name); xfree(block_ptr->bg_block_name); xfree(block_ptr->slurm_part_name); - xfree(block_ptr->nodes); - xfree(block_ptr->ionodes); + xfree(block_ptr->mp_str); + xfree(block_ptr->ionode_str); if (block_ptr->nodelist) list_destroy(block_ptr->nodelist); @@ -858,9 +858,9 @@ static int _print_rest(db2_block_info_t *block_ptr) { partition_info_t part; - if (block_ptr->node_cnt == 0) - block_ptr->node_cnt = block_ptr->size; - part.total_nodes = block_ptr->node_cnt; + if (block_ptr->cnode_cnt == 0) + block_ptr->cnode_cnt = block_ptr->size; + part.total_nodes = block_ptr->cnode_cnt; if (block_ptr->slurm_part_name) part.name = block_ptr->slurm_part_name; else @@ -868,7 +868,7 @@ static int _print_rest(db2_block_info_t *block_ptr) if (!block_ptr->printed) return SLURM_SUCCESS; - part.allow_groups = block_ptr->nodes; + part.allow_groups = block_ptr->mp_str; part.flags = (int) letters[block_ptr->letter_num%62]; if (!params.commandline) { wattron(text_win, diff --git a/src/sview/block_info.c b/src/sview/block_info.c index deb992779ff3bc835483b7339431cc6f9af332d5..b2fc2cbea9e7ce7a30c58cb92c62a54ad4cb8edc 100644 --- a/src/sview/block_info.c +++ b/src/sview/block_info.c @@ -37,13 +37,13 @@ typedef struct { char *bg_user_name; char *bg_block_name; char *slurm_part_name; - char *nodes; + char *mp_str; uint16_t bg_conn_type; uint16_t bg_node_use; uint16_t state; int size; - int node_cnt; - int *bp_inx; /* list index pairs into node_table for *nodes: + int cnode_cnt; + int *bp_inx; /* list index pairs into node_table for *mp_str: * start_range_1, end_range_1, * start_range_2, .., -1 */ int color_inx; @@ -74,7 +74,7 @@ enum { SORTID_IMAGERAMDISK, SORTID_IMAGEMLOADER, #endif - SORTID_NODES, + SORTID_MP_STR, SORTID_PARTITION, SORTID_STATE, SORTID_UPDATED, @@ -104,7 +104,7 @@ static display_data_t display_data_block[] = { create_model_block, admin_edit_block}, {G_TYPE_STRING, SORTID_USER, "User", FALSE, EDIT_NONE, refresh_block, create_model_block, admin_edit_block}, - {G_TYPE_STRING, SORTID_NODES, "Node Count", + {G_TYPE_STRING, SORTID_MP_STR, "Node Count", FALSE, EDIT_NONE, refresh_block, create_model_block, admin_edit_block}, {G_TYPE_STRING, SORTID_CONN, "Connection Type", FALSE, EDIT_NONE, refresh_block, @@ -185,7 +185,7 @@ static void _block_list_del(void *object) xfree(block_ptr->bg_user_name); xfree(block_ptr->bg_block_name); xfree(block_ptr->slurm_part_name); - xfree(block_ptr->nodes); + xfree(block_ptr->mp_str); xfree(block_ptr->imageblrts); xfree(block_ptr->imagelinux); xfree(block_ptr->imagemloader); @@ -234,7 +234,7 @@ static void _layout_block_record(GtkTreeView *treeview, add_display_treestore_line(update, treestore, &iter, find_col_name(display_data_block, SORTID_NODELIST), - block_ptr->nodes); + block_ptr->mp_str); add_display_treestore_line(update, treestore, &iter, find_col_name(display_data_block, @@ -290,11 +290,11 @@ static void _layout_block_record(GtkTreeView *treeview, node_use_string( block_ptr->bg_node_use)); } - convert_num_unit((float)block_ptr->node_cnt, tmp_cnt, sizeof(tmp_cnt), + convert_num_unit((float)block_ptr->cnode_cnt, tmp_cnt, sizeof(tmp_cnt), UNIT_NONE); add_display_treestore_line(update, treestore, &iter, find_col_name(display_data_block, - SORTID_NODES), + SORTID_MP_STR), tmp_cnt); add_display_treestore_line(update, treestore, &iter, @@ -314,7 +314,7 @@ static void _layout_block_record(GtkTreeView *treeview, static void _update_block_record(sview_block_info_t *block_ptr, GtkTreeStore *treestore, GtkTreeIter *iter) { - char job_running[20], node_cnt[20]; + char job_running[20], cnode_cnt[20]; if (block_ptr->job_running > NO_JOB_RUNNING) snprintf(job_running, sizeof(job_running), @@ -322,7 +322,7 @@ static void _update_block_record(sview_block_info_t *block_ptr, else snprintf(job_running, sizeof(job_running), "-"); - convert_num_unit((float)block_ptr->node_cnt, node_cnt, sizeof(node_cnt), + convert_num_unit((float)block_ptr->cnode_cnt, cnode_cnt, sizeof(cnode_cnt), UNIT_NONE); /* Combining these records provides a slight performance improvement */ @@ -338,8 +338,8 @@ static void _update_block_record(sview_block_info_t *block_ptr, SORTID_IMAGEMLOADER, block_ptr->imagemloader, SORTID_JOB, job_running, SORTID_NODE_INX, block_ptr->bp_inx, - SORTID_NODES, node_cnt, - SORTID_NODELIST, block_ptr->nodes, + SORTID_MP_STR, cnode_cnt, + SORTID_NODELIST, block_ptr->mp_str, SORTID_PARTITION, block_ptr->slurm_part_name, SORTID_SMALL_BLOCK, block_ptr->small_block, SORTID_STATE, @@ -402,8 +402,8 @@ static void _update_info_block(List block_list, itr = list_iterator_create(block_list); while ((block_ptr = (sview_block_info_t*) list_next(itr))) { - if (block_ptr->node_cnt == 0) - block_ptr->node_cnt = block_ptr->size; + if (block_ptr->cnode_cnt == 0) + block_ptr->cnode_cnt = block_ptr->size; if (!block_ptr->slurm_part_name) block_ptr->slurm_part_name = xstrdup("no part"); @@ -451,8 +451,8 @@ static void _update_info_block(List block_list, static int _sview_block_sort_aval_dec(sview_block_info_t* rec_a, sview_block_info_t* rec_b) { - int size_a = rec_a->node_cnt; - int size_b = rec_b->node_cnt; + int size_a = rec_a->cnode_cnt; + int size_b = rec_b->cnode_cnt; if ((rec_a->job_running == NO_JOB_RUNNING) && (rec_b->job_running != NO_JOB_RUNNING)) @@ -472,8 +472,8 @@ static int _sview_block_sort_aval_dec(sview_block_info_t* rec_a, else if (size_a > size_b) return 1; - if (rec_a->nodes && rec_b->nodes) { - size_a = strcmp(rec_a->nodes, rec_b->nodes); + if (rec_a->mp_str && rec_b->mp_str) { + size_a = strcmp(rec_a->mp_str, rec_b->mp_str); if (size_a < 0) return -1; else if (size_a > 0) @@ -490,7 +490,7 @@ static List _create_block_list(partition_info_msg_t *part_info_ptr, static List block_list = NULL; partition_info_t part; sview_block_info_t *block_ptr = NULL; - char tmp_nodes[50]; + char tmp_mp_str[50]; if (!changed && block_list) { return block_list; @@ -528,16 +528,16 @@ static List _create_block_list(partition_info_msg_t *part_info_ptr, block_ptr->color_inx %= sview_colors_cnt; - block_ptr->nodes - = xstrdup(block_info_ptr->block_array[i].nodes); - if (block_info_ptr->block_array[i].ionodes) { + block_ptr->mp_str + = xstrdup(block_info_ptr->block_array[i].mp_str); + if (block_info_ptr->block_array[i].ionode_str) { block_ptr->small_block = 1; - snprintf(tmp_nodes, sizeof(tmp_nodes), + snprintf(tmp_mp_str, sizeof(tmp_mp_str), "%s[%s]", - block_ptr->nodes, - block_info_ptr->block_array[i].ionodes); - xfree(block_ptr->nodes); - block_ptr->nodes = xstrdup(tmp_nodes); + block_ptr->mp_str, + block_info_ptr->block_array[i].ionode_str); + xfree(block_ptr->mp_str); + block_ptr->mp_str = xstrdup(tmp_mp_str); } block_ptr->bg_user_name @@ -563,8 +563,8 @@ static List _create_block_list(partition_info_msg_t *part_info_ptr, block_ptr->bg_node_use = block_info_ptr->block_array[i].node_use; - block_ptr->node_cnt - = block_info_ptr->block_array[i].node_cnt; + block_ptr->cnode_cnt + = block_info_ptr->block_array[i].cnode_cnt; block_ptr->bp_inx = block_info_ptr->block_array[i].mp_inx; for(j = 0; j < part_info_ptr->record_count; j++) { @@ -622,7 +622,7 @@ need_refresh: itr = list_iterator_create(block_list); while ((block_ptr = (sview_block_info_t*) list_next(itr))) { if (!strcmp(block_ptr->bg_block_name, name) - || !strcmp(block_ptr->nodes, name)) { + || !strcmp(block_ptr->mp_str, name)) { /* we want to over ride any subgrp in error state */ enum node_states state = NODE_STATE_UNKNOWN; @@ -997,7 +997,7 @@ display_it: gtk_tree_view_get_selection( GTK_TREE_VIEW(display_widget)))) { GtkTreeViewColumn *focus_column = NULL; - /* highlight the correct nodes from the last selection */ + /* highlight the correct mp_str from the last selection */ gtk_tree_view_get_cursor(GTK_TREE_VIEW(display_widget), &path, &focus_column); } @@ -1188,12 +1188,12 @@ display_it: break; case RESV_PAGE: case NODE_PAGE: - if (!block_ptr->nodes) + if (!block_ptr->mp_str) continue; if (!(hostset = hostset_create( search_info->gchar_data))) continue; - name = block_ptr->nodes; + name = block_ptr->mp_str; if (block_ptr->small_block) { int j=0; /* strip off the ionodes part */ @@ -1225,7 +1225,7 @@ display_it: case SEARCH_BLOCK_SIZE: if (search_info->int_data == NO_VAL) continue; - if (block_ptr->node_cnt + if (block_ptr->cnode_cnt != search_info->int_data) continue; break; diff --git a/src/sview/grid.c b/src/sview/grid.c index 49284f76bd74e3a4b6389abcc08947b7938f943f..fcc9fec30ce9d87fbad67fa7c73f9aa6bf4f02bd 100644 --- a/src/sview/grid.c +++ b/src/sview/grid.c @@ -1313,7 +1313,7 @@ extern void add_extra_bluegene_buttons(List *button_list, int inx, grid_button_t *grid_button = NULL; grid_button_t *send_grid_button = NULL; int i=0; - char *nodes = NULL; + char *mp_str = NULL; char tmp_nodes[256]; int found = 0; int coord_y=0; @@ -1355,11 +1355,11 @@ extern void add_extra_bluegene_buttons(List *button_list, int inx, if (!_block_in_node(bg_info_ptr->mp_inx, inx)) continue; found = 1; - nodes = bg_info_ptr->nodes; - if (bg_info_ptr->ionodes) { - sprintf(tmp_nodes, "%s[%s]", nodes, - bg_info_ptr->ionodes); - nodes = tmp_nodes; + mp_str = bg_info_ptr->mp_str; + if (bg_info_ptr->ionode_str) { + sprintf(tmp_nodes, "%s[%s]", mp_str, + bg_info_ptr->ionode_str); + mp_str = tmp_nodes; } if (bg_info_ptr->state == BG_BLOCK_ERROR) grid_button->state = NODE_STATE_ERROR; @@ -1368,7 +1368,7 @@ extern void add_extra_bluegene_buttons(List *button_list, int inx, else grid_button->state = NODE_STATE_IDLE; send_grid_button = create_grid_button_from_another( - grid_button, nodes, *color_inx); + grid_button, mp_str, *color_inx); grid_button->state = orig_state; if (send_grid_button) { send_grid_button->button_list = *button_list;