Skip to content
Snippets Groups Projects
Commit 5861b116 authored by Danny Auble's avatar Danny Auble
Browse files

fix for mixed nodes to show up in idle state

parent 061830f4
No related branches found
No related tags found
No related merge requests found
...@@ -1043,8 +1043,6 @@ extern void specific_info_node(popup_info_t *popup_win) ...@@ -1043,8 +1043,6 @@ extern void specific_info_node(popup_info_t *popup_win)
hostlist_iterator_t host_itr = NULL; hostlist_iterator_t host_itr = NULL;
int i = -1; int i = -1;
sview_search_info_t *search_info = spec_info->search_info; sview_search_info_t *search_info = spec_info->search_info;
bool drain_flag1 = false, comp_flag1 = false, no_resp_flag1 = false;
bool drain_flag2 = false, comp_flag2 = false, no_resp_flag2 = false;
if(!spec_info->display_widget) if(!spec_info->display_widget)
setup_popup_info(popup_win, display_data_node, SORTID_CNT); setup_popup_info(popup_win, display_data_node, SORTID_CNT);
...@@ -1122,16 +1120,9 @@ display_it: ...@@ -1122,16 +1120,9 @@ display_it:
} }
i = -1; i = -1;
if(search_info->int_data != NO_VAL) {
drain_flag1 = (search_info->int_data & NODE_STATE_DRAIN);
comp_flag1 = (search_info->int_data & NODE_STATE_COMPLETING);
no_resp_flag1 = (search_info->int_data
& NODE_STATE_NO_RESPOND);
}
itr = list_iterator_create(info_list); itr = list_iterator_create(info_list);
while ((sview_node_info_ptr = list_next(itr))) { while ((sview_node_info_ptr = list_next(itr))) {
uint16_t tmp_16 = 0;
int found = 0; int found = 0;
char *host = NULL; char *host = NULL;
i++; i++;
...@@ -1139,29 +1130,37 @@ display_it: ...@@ -1139,29 +1130,37 @@ display_it:
switch(search_info->search_type) { switch(search_info->search_type) {
case SEARCH_NODE_STATE: case SEARCH_NODE_STATE:
if(search_info->int_data != node_ptr->node_state) { if(search_info->int_data == NO_VAL)
continue;
else if(search_info->int_data != node_ptr->node_state) {
if(IS_NODE_MIXED(node_ptr)) { if(IS_NODE_MIXED(node_ptr)) {
uint16_t alloc_cnt = 0, err_cnt = 0;
uint16_t idle_cnt = node_ptr->cpus;
select_g_select_nodeinfo_get(
node_ptr->select_nodeinfo,
SELECT_NODEDATA_SUBCNT,
NODE_STATE_ALLOCATED,
&alloc_cnt);
select_g_select_nodeinfo_get(
node_ptr->select_nodeinfo,
SELECT_NODEDATA_SUBCNT,
NODE_STATE_ERROR,
&err_cnt);
idle_cnt -= (alloc_cnt + err_cnt);
if((search_info->int_data if((search_info->int_data
& NODE_STATE_BASE) & NODE_STATE_BASE)
== NODE_STATE_ALLOCATED) { == NODE_STATE_ALLOCATED) {
select_g_select_nodeinfo_get( if(alloc_cnt)
node_ptr->
select_nodeinfo,
SELECT_NODEDATA_SUBCNT,
NODE_STATE_ALLOCATED,
&tmp_16);
if(tmp_16)
break; break;
} else if((search_info->int_data } else if((search_info->int_data
& NODE_STATE_BASE) & NODE_STATE_BASE)
== NODE_STATE_ERROR) { == NODE_STATE_ERROR) {
select_g_select_nodeinfo_get( if(err_cnt)
node_ptr-> break;
select_nodeinfo, } else if((search_info->int_data
SELECT_NODEDATA_SUBCNT, & NODE_STATE_BASE)
NODE_STATE_ERROR, == NODE_STATE_IDLE) {
&tmp_16); if(idle_cnt)
if(tmp_16)
break; break;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment