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

Fix for acct_gather_energy/cray|ibmaem to work with missed enum.

parent 225cd1a1
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,7 @@ documents those changes that are of interest to users and administrators.
-- PrologFlags work: Setting a flag of "Contain" implicitly sets the "Alloc"
flag. Fix code path which could prevent execution of the Prolog when the
"Alloc" or "Contain" flag were set.
-- Fix for acct_gather_energy/cray|ibmaem to work with missed enum.
* Changes in Slurm 15.08.2
==========================
......
......@@ -270,22 +270,28 @@ extern int acct_gather_energy_p_get_data(enum acct_energy_type data_type,
int rc = SLURM_SUCCESS;
acct_gather_energy_t *energy = (acct_gather_energy_t *)data;
time_t *last_poll = (time_t *)data;
uint16_t *sensor_cnt = (uint16_t *)data;
xassert(_run_in_daemon());
switch (data_type) {
case ENERGY_DATA_JOULES_TASK:
case ENERGY_DATA_NODE_ENERGY_UP:
if (local_energy->current_watts == NO_VAL)
energy->consumed_energy = NO_VAL;
else
_get_joules_task(energy);
break;
case ENERGY_DATA_STRUCT:
case ENERGY_DATA_NODE_ENERGY:
memcpy(energy, local_energy, sizeof(acct_gather_energy_t));
break;
case ENERGY_DATA_LAST_POLL:
*last_poll = local_energy->poll_time;
break;
case ENERGY_DATA_SENSOR_CNT:
*sensor_cnt = 1;
break;
default:
error("acct_gather_energy_p_get_data: unknown enum %d",
data_type);
......
......@@ -275,6 +275,7 @@ extern int acct_gather_energy_p_get_data(enum acct_energy_type data_type,
switch (data_type) {
case ENERGY_DATA_JOULES_TASK:
case ENERGY_DATA_NODE_ENERGY_UP:
if (local_energy->current_watts == NO_VAL)
energy->consumed_energy = NO_VAL;
else
......
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