Ticket 360

Summary: print user/group consumed energy with sreport
Product: Slurm Reporter: Thomas Cadeau <thomas.cadeau>
Component: DatabaseAssignee: Danny Auble <da>
Status: RESOLVED FIXED QA Contact:
Severity: 5 - Enhancement    
Priority: Highest CC: yiannis.georgiou
Version: 2.6.x   
Hardware: Linux   
OS: Linux   
Site: Atos/Eviden Sites Alineos Sites: ---
Atos/Eviden Sites: --- Confidential Site: ---
Coreweave sites: --- Cray Sites: ---
DS9 clusters: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Linux Distro: ---
Machine Name: CLE Version:
Version Fixed: Target Release: ---
DevPrio: --- Emory-Cloud Sites: ---
Attachments: accounting and sreport patch for print energy used by user/group

Description Thomas Cadeau 2013-07-03 02:41:57 MDT
Created attachment 327 [details]
accounting and sreport patch for print energy used by user/group

This patch add field consumed_energy on table *_assoc_usage_*_table and *_usage_*_table.
These field contains sum of energy for step corresponing to jobs launched during hour/day/month (as cpu time used).

The field is printed with:
sreport user topusage
sreport cluster UserUtilizationByAccount
sreport cluster AccountUtilizationByUser

Can you add this enhancement to 2.6?

Thomas
Comment 1 Danny Auble 2013-07-03 05:09:31 MDT
Thomas, this is what I would consider a major change.  I'll need to study it more, but it will not be put in 2.6.

Introducing the energy from steps to that of the job roll up will need some testing to make sure there aren't any gotcha's.

Please avoid lines that are +80 chars.
Comment 2 Danny Auble 2013-07-30 08:52:43 MDT
Thomas there were a few issues with this patch (commit 5fd469c6680e8cc30449f8787cb160d9ea4ed097), but on the most part it isn't bad.

Packing and unpacking wasn't made backward compatible.  Fixed in 
379664bd8dfcf67094a6d824505cecdc00dce822.

And the biggest was the placement of the "and" clause in the sql statement.  This would make it so job allocations with no steps in them would not be added to the mix.  Fixed in fbe292d18cd997f62d6af91df0165a44836774e4.

This has been pushed to the master 13.12 branch.  Let me know if you notice any issues.