From 6b08e17f7d611b70f4e42a49da23ecea74db570f Mon Sep 17 00:00:00 2001 From: Danny Auble <da@llnl.gov> Date: Wed, 22 Mar 2006 21:32:57 +0000 Subject: [PATCH] fix for bg naming removed from plugin and smap --- NEWS | 1 + src/plugins/select/bluegene/plugin/state_test.c | 13 ++++++++++--- src/slurmctld/read_config.c | 1 + src/smap/configure_functions.c | 5 ++--- src/smap/smap.c | 9 ++++----- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index bad201544bf..16d6afe7e43 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,7 @@ documents those changes that are of interest to users and admins. -- JobAcct plugin renamed from "log" to "linux" in preparation for support of new system types. WARNING: "JobAcctType=jobacct/log" is no longer supported. + -- removed vestigal 'bg' names from bluegene plugin and smap * Changes in SLURM 1.1.0-pre2 ============================= diff --git a/src/plugins/select/bluegene/plugin/state_test.c b/src/plugins/select/bluegene/plugin/state_test.c index 314d2c128ee..1b4b53ae49b 100644 --- a/src/plugins/select/bluegene/plugin/state_test.c +++ b/src/plugins/select/bluegene/plugin/state_test.c @@ -125,8 +125,12 @@ static void _configure_node_down(rm_bp_id_t bp_id, rm_BGL_t *bg) error("rm_get_data(RM_BPLoc): %s", bg_err_str(rc)); continue; } - snprintf(bg_down_node, sizeof(bg_down_node), "bg%d%d%d", + slurm_conf_lock(); + snprintf(bg_down_node, sizeof(bg_down_node), "%s%d%d%d", + slurmctld_conf.node_prefix, bp_loc.X, bp_loc.Y, bp_loc.Z); + slurm_conf_unlock(); + if (node_already_down(bg_down_node)) break; @@ -213,9 +217,12 @@ static void _test_down_nodes(rm_BGL_t *bg) continue; } - snprintf(bg_down_node, sizeof(bg_down_node), "bg%d%d%d", + slurm_conf_lock(); + snprintf(bg_down_node, sizeof(bg_down_node), "%s%d%d%d", + slurmctld_conf.node_prefix, bp_loc.X, bp_loc.Y, bp_loc.Z); - + slurm_conf_unlock(); + if (node_already_down(bg_down_node)) continue; diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 2b7aa3242b3..92a687306f5 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -252,6 +252,7 @@ static int _init_all_slurm_conf(void) char *conf_name = xstrdup(slurmctld_conf.slurm_conf); slurm_conf_reinit(conf_name); + xfree(conf_name); if ((error_code = init_node_conf())) return error_code; diff --git a/src/smap/configure_functions.c b/src/smap/configure_functions.c index fb453354700..c9146903058 100644 --- a/src/smap/configure_functions.c +++ b/src/smap/configure_functions.c @@ -433,9 +433,8 @@ static int _resolve(char *com) if(coord) sprintf(error_string, - "%s resolves to X=%d Y=%d Z=%d or bg%d%d%d\n", - com+i,coord[X],coord[Y],coord[Z], - coord[X],coord[Y],coord[Z]); + "%s resolves to X=%d Y=%d Z=%d\n", + com+i,coord[X],coord[Y],coord[Z]); else sprintf(error_string, "%s has no resolve.\n", com+i); diff --git a/src/smap/smap.c b/src/smap/smap.c index 22fb693d961..9f3a17caa9c 100644 --- a/src/smap/smap.c +++ b/src/smap/smap.c @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) int mapset = 0; #endif //char *name; - + 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)) { @@ -88,10 +88,8 @@ int main(int argc, char *argv[]) sleep(10); /* keep trying to reconnect */ } - printf("starting\n"); ba_init(new_node_ptr); - printf("done hey\n"); - + if(params.partition) { #ifdef HAVE_BG_FILES @@ -127,9 +125,10 @@ int main(int argc, char *argv[]) } else { int *coord = find_bp_loc(params.partition); if(coord) - printf("%s resolves to X=%d Y=%d Z=%d or bg%d%d%d\n", + printf("%s resolves to X=%d Y=%d Z=%d\n", params.partition, coord[X], coord[Y], coord[Z], + slurmctld_conf.node_prefix, coord[X], coord[Y], coord[Z]); else printf("%s has no resolve.\n", -- GitLab