diff --git a/src/plugins/select/bluegene/block_allocator/block_allocator.c b/src/plugins/select/bluegene/block_allocator/block_allocator.c index fc340fb26ff39355827f4d198f7cd0c1a370b4f3..a4ba6ab5946f915f579b03bc91e28ce24a0cd5e5 100644 --- a/src/plugins/select/bluegene/block_allocator/block_allocator.c +++ b/src/plugins/select/bluegene/block_allocator/block_allocator.c @@ -868,7 +868,7 @@ extern int empty_null_destroy_list(void *arg, void *key) * * return: void. */ -extern void ba_init(node_info_msg_t *node_info_ptr) +extern void ba_init(node_info_msg_t *node_info_ptr, bool sanity_check) { int x,y,z; @@ -1043,7 +1043,7 @@ node_info_error: #ifdef HAVE_BG_FILES /* sanity check. We can only request part of the system, but we don't want to allow more than we have. */ - if (have_db2) { + if (sanity_check && have_db2) { verbose("Attempting to contact MMCS"); if ((rc = bridge_get_bg(&bg)) != STATUS_OK) { fatal("bridge_get_BG() failed. This usually means " @@ -1208,8 +1208,8 @@ extern void ba_update_node_state(ba_node_t *ba_node, uint16_t state) if (!_initialized){ error("Error, configuration not initialized, " - "calling ba_init(NULL)"); - ba_init(NULL); + "calling ba_init(NULL, 1)"); + ba_init(NULL, 1); } #ifdef HAVE_BG @@ -1326,7 +1326,8 @@ extern int allocate_block(ba_request_t* ba_request, List results) { if (!_initialized){ error("Error, configuration not initialized, " - "calling ba_init(NULL)"); + "calling ba_init(NULL, 1)"); + ba_init(NULL, 1); } if (!ba_request){ @@ -2055,13 +2056,13 @@ extern int set_bp_map(void) bp_map_list = list_create(_bp_map_list_del); if (!have_db2) { - fatal("Can't access DB2 library, run from service node"); + error("Can't access DB2 library, run from service node"); return -1; } #ifdef HAVE_BGL if (!getenv("DB2INSTANCE") || !getenv("VWSPATH")) { - fatal("Missing DB2INSTANCE or VWSPATH env var. " + error("Missing DB2INSTANCE or VWSPATH env var. " "Execute 'db2profile'"); return -1; } diff --git a/src/plugins/select/bluegene/block_allocator/block_allocator.h b/src/plugins/select/bluegene/block_allocator/block_allocator.h index 41fd629c69d5d72b4a00861659f06ae25848ddcc..ebba0579de60a691a477a6c3a8f1ec2f83572063 100644 --- a/src/plugins/select/bluegene/block_allocator/block_allocator.h +++ b/src/plugins/select/bluegene/block_allocator/block_allocator.h @@ -348,10 +348,11 @@ extern void print_ba_request(ba_request_t* ba_request); * * IN: node_info_msg_t * can be null, * should be from slurm_load_node(). + * IN: load_bridge: whiether or not to get bridge information * * return: void. */ -extern void ba_init(node_info_msg_t *node_info_ptr); +extern void ba_init(node_info_msg_t *node_info_ptr, bool load_bridge); /* If emulating a system set up a known configuration for wires in a * system of the size given. diff --git a/src/plugins/select/bluegene/block_allocator/wire_test.c b/src/plugins/select/bluegene/block_allocator/wire_test.c index 29a720d7c19f0af9bc47e359c6c67775de33ec5d..d8dd196300fb79bde16262e98f07b88a7c06d1fa 100644 --- a/src/plugins/select/bluegene/block_allocator/wire_test.c +++ b/src/plugins/select/bluegene/block_allocator/wire_test.c @@ -62,15 +62,14 @@ int main(int argc, char** argv) log_opts.logfile_level = debug_level; log_opts.syslog_level = debug_level; - log_alter(log_opts, LOG_DAEMON, - "/dev/null"); + log_alter(log_opts, LOG_DAEMON, "/dev/null"); DIM_SIZE[X]=0; DIM_SIZE[Y]=0; DIM_SIZE[Z]=0; slurm_conf_reinit(NULL); - ba_init(NULL); + ba_init(NULL, 1); init_wires(NULL); /* [010x831] */ diff --git a/src/plugins/select/bluegene/plugin/bluegene.c b/src/plugins/select/bluegene/plugin/bluegene.c index 0ffbe8124f2d97191c1da645d1cf8249e0672cd5..3df42706ae253006ba118dcbd769f38c88b91e3a 100644 --- a/src/plugins/select/bluegene/plugin/bluegene.c +++ b/src/plugins/select/bluegene/plugin/bluegene.c @@ -121,7 +121,7 @@ extern int init_bg(void) list_destroy(bg_conf->ramdisk_list); bg_conf->ramdisk_list = list_create(destroy_image); - ba_init(NULL); + ba_init(NULL, 1); verbose("BlueGene plugin loaded successfully"); diff --git a/src/plugins/select/bluegene/plugin/select_bluegene.c b/src/plugins/select/bluegene/plugin/select_bluegene.c index eb56789c2348af0ad1c804feb8b3dffb7768e2b8..dc53fa996afee8d99c2a92b9c4dc929df8721a6d 100644 --- a/src/plugins/select/bluegene/plugin/select_bluegene.c +++ b/src/plugins/select/bluegene/plugin/select_bluegene.c @@ -247,34 +247,37 @@ static List _get_config(void) extern int init ( void ) { + if(bg_recover != NOT_FROM_CONTROLLER) { #if (SYSTEM_DIMENSIONS != 3) - fatal("SYSTEM_DIMENSIONS value (%d) invalid for BlueGene", - SYSTEM_DIMENSIONS); + fatal("SYSTEM_DIMENSIONS value (%d) invalid for BlueGene", + SYSTEM_DIMENSIONS); #endif - + #ifdef HAVE_BG_FILES #ifdef HAVE_BGL - if (!getenv("CLASSPATH") || !getenv("DB2INSTANCE") - || !getenv("VWSPATH")) - fatal("db2profile has not been run to setup DB2 environment"); - - if ((SELECT_COPROCESSOR_MODE != RM_PARTITION_COPROCESSOR_MODE) - || (SELECT_VIRTUAL_NODE_MODE != RM_PARTITION_VIRTUAL_NODE_MODE)) - fatal("enum node_use_type out of sync with rm_api.h"); + if (!getenv("CLASSPATH") || !getenv("DB2INSTANCE") + || !getenv("VWSPATH")) + fatal("db2profile has not been " + "run to setup DB2 environment"); + + if ((SELECT_COPROCESSOR_MODE != RM_PARTITION_COPROCESSOR_MODE) + || (SELECT_VIRTUAL_NODE_MODE + != RM_PARTITION_VIRTUAL_NODE_MODE)) + fatal("enum node_use_type out of sync with rm_api.h"); #endif - if ((SELECT_MESH != RM_MESH) - || (SELECT_TORUS != RM_TORUS) - || (SELECT_NAV != RM_NAV)) - fatal("enum conn_type out of sync with rm_api.h"); + if ((SELECT_MESH != RM_MESH) + || (SELECT_TORUS != RM_TORUS) + || (SELECT_NAV != RM_NAV)) + fatal("enum conn_type out of sync with rm_api.h"); #endif - - verbose("%s loading...", plugin_name); - - /* if this is coming from something other than the controller - we don't want to read the config or anything like that. */ - if(bg_recover != NOT_FROM_CONTROLLER) + + verbose("%s loading...", plugin_name); + /* if this is coming from something other than the controller + we don't want to read the config or anything like that. */ if (init_bg() || _init_status_pthread()) return SLURM_ERROR; + } + verbose("%s loaded", plugin_name); return SLURM_SUCCESS; } diff --git a/src/smap/smap.c b/src/smap/smap.c index 359cbd68ff68a52e2d1c1510f14d60590c076b04..06462c8114343b694fe2d18b00033b1f5e49c36f 100644 --- a/src/smap/smap.c +++ b/src/smap/smap.c @@ -94,7 +94,12 @@ int main(int argc, char *argv[]) log_init(xbasename(argv[0]), opts, SYSLOG_FACILITY_DAEMON, NULL); parse_command_line(argc, argv); - while (slurm_load_node((time_t) NULL, &new_node_ptr, SHOW_ALL)) { + if (params.verbose) { + opts.stderr_level += params.verbose; + log_alter(opts, SYSLOG_FACILITY_USER, NULL); + } + + while (slurm_load_node((time_t) NULL, &new_node_ptr, SHOW_ALL)) { error_code = slurm_get_errno(); printf("slurm_load_node: %s\n", slurm_strerror(error_code)); if (params.display == COMMANDS) { @@ -106,7 +111,7 @@ int main(int argc, char *argv[]) sleep(10); /* keep trying to reconnect */ } - ba_init(new_node_ptr); + ba_init(new_node_ptr, 0); if(params.resolve) {