Skip to content
Snippets Groups Projects
Commit d584800f authored by Morris Jette's avatar Morris Jette
Browse files

burst_buffer/cray: Correct get extra pool info

When extra pools were reported by Cray API, it was not multiplying
  the buffer count by granularity to get the total size, but was
  just getting the counts.
parent a714ae53
No related branches found
No related tags found
No related merge requests found
...@@ -1039,8 +1039,8 @@ static void _load_state(bool init_config) ...@@ -1039,8 +1039,8 @@ static void _load_state(bool init_config)
= pools[i].quantity * pools[i].granularity; = pools[i].quantity * pools[i].granularity;
if (bb_state.bb_config.flags & BB_FLAG_EMULATE_CRAY) if (bb_state.bb_config.flags & BB_FLAG_EMULATE_CRAY)
continue; continue;
bb_state.used_space bb_state.used_space =
= (pools[i].quantity - pools[i].free) * (pools[i].quantity - pools[i].free) *
pools[i].granularity; pools[i].granularity;
/* Everything else is a generic burst buffer resource */ /* Everything else is a generic burst buffer resource */
...@@ -1053,12 +1053,15 @@ static void _load_state(bool init_config) ...@@ -1053,12 +1053,15 @@ static void _load_state(bool init_config)
gres_ptr = bb_state.bb_config.gres_ptr + gres_ptr = bb_state.bb_config.gres_ptr +
bb_state.bb_config.gres_cnt; bb_state.bb_config.gres_cnt;
bb_state.bb_config.gres_cnt++; bb_state.bb_config.gres_cnt++;
gres_ptr->avail_cnt = pools[i].quantity; gres_ptr->avail_cnt =
pools[i].quantity * pools[i].granularity;
gres_ptr->granularity = pools[i].granularity; gres_ptr->granularity = pools[i].granularity;
gres_ptr->name = xstrdup(pools[i].id); gres_ptr->name = xstrdup(pools[i].id);
if (bb_state.bb_config.flags & BB_FLAG_EMULATE_CRAY) if (bb_state.bb_config.flags & BB_FLAG_EMULATE_CRAY)
continue; continue;
gres_ptr->used_cnt = pools[i].quantity - pools[i].free; gres_ptr->used_cnt =
(pools[i].quantity - pools[i].free) *
pools[i].granularity;
} }
} }
pthread_mutex_unlock(&bb_state.bb_mutex); pthread_mutex_unlock(&bb_state.bb_mutex);
......
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