From 8fda9cdfcfc3f135d5e19e703b9bda43687b687c Mon Sep 17 00:00:00 2001 From: Danny Auble <da@llnl.gov> Date: Mon, 30 Apr 2007 20:17:44 +0000 Subject: [PATCH] I think something has changed in the way things are sent to sview since the bluegene grid was way off and so were the cpu counts per node. These are fixed now, but the grid still doesn't color up like it should. --- src/sview/grid.c | 7 ++++--- src/sview/node_info.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/sview/grid.c b/src/sview/grid.c index fd3c39a0d9e..8b2549a7f48 100644 --- a/src/sview/grid.c +++ b/src/sview/grid.c @@ -699,9 +699,9 @@ extern int setup_grid_table(GtkTable *table, List button_list, List node_list) * instead of laying these out in a nice X fashion */ for (x=0; x<DIM_SIZE[X]; x++) { - y_offset = 0; + y_offset = (DIM_SIZE[Z] * DIM_SIZE[Y]); for (y=0; y<DIM_SIZE[Y]; y++) { - coord_y = y + y_offset; + coord_y = y_offset - y; x_offset = DIM_SIZE[Z] - 1; for (z=0; z<DIM_SIZE[Z]; z++){ coord_x = x + x_offset; @@ -719,6 +719,7 @@ extern int setup_grid_table(GtkTable *table, List button_list, List node_list) grid_button->inx); goto end_it; } + grid_button->node_name = xstrdup( sview_node_info_ptr->node_ptr->name); @@ -743,7 +744,7 @@ extern int setup_grid_table(GtkTable *table, List button_list, List node_list) coord_y++; x_offset--; } - y_offset += DIM_SIZE[Z]; + y_offset -= DIM_SIZE[Z]; } gtk_table_set_row_spacing(table, coord_y-1, 5); } diff --git a/src/sview/node_info.c b/src/sview/node_info.c index 9dde59206d8..ebaae19cf4d 100644 --- a/src/sview/node_info.c +++ b/src/sview/node_info.c @@ -125,7 +125,7 @@ static void _layout_node_record(GtkTreeView *treeview, lower); xfree(lower); - convert_num_unit((float)node_ptr->cpus, tmp_cnt, UNIT_MEGA); + convert_num_unit((float)node_ptr->cpus, tmp_cnt, UNIT_NONE); add_display_treestore_line(update, treestore, &iter, find_col_name(display_data_node, SORTID_CPUS), @@ -399,7 +399,8 @@ extern List create_node_info_list(node_info_msg_t *node_info_ptr, int changed) sview_node_info_ptr = xmalloc(sizeof(sview_node_info_t)); list_append(info_list, sview_node_info_ptr); - sview_node_info_ptr->node_ptr = node_ptr; + sview_node_info_ptr->node_ptr = node_ptr; + } update_color: -- GitLab