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

energy - only zero out the previous value if new consumption is reported.

parent 09601d60
No related branches found
No related tags found
No related merge requests found
...@@ -1691,10 +1691,15 @@ _wait_for_any_task(slurmd_job_t *job, bool waitflag) ...@@ -1691,10 +1691,15 @@ _wait_for_any_task(slurmd_job_t *job, bool waitflag)
/* Since we currently don't track energy /* Since we currently don't track energy
usage per task (only per step). We take usage per task (only per step). We take
into account only the last poll of the last task. into account only the last poll of the last task.
If this ever changes in the future this Odds are it is the only one with
information anyway, but just to be safe we
will zero out the previous value since this
one will over ride it.
If this ever changes in the future this logic
will need to change. will need to change.
*/ */
job->jobacct->energy.consumed_energy = 0; if (jobacct->energy.consumed_energy)
job->jobacct->energy.consumed_energy = 0;
jobacctinfo_aggregate(job->jobacct, jobacct); jobacctinfo_aggregate(job->jobacct, jobacct);
jobacctinfo_destroy(jobacct); jobacctinfo_destroy(jobacct);
} }
......
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