Ticket 3434

Summary: fairshare
Product: Slurm Reporter: George Garrett <gsg8>
Component: ConfigurationAssignee: Alejandro Sanchez <alex>
Status: RESOLVED INFOGIVEN QA Contact:
Severity: 4 - Minor Issue    
Priority: --- CC: alex
Version: 16.05.2   
Hardware: Linux   
OS: Linux   
Site: Columbia University 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: ---

Description George Garrett 2017-01-26 13:31:18 MST
Is there a way to set RawShares to decimals, or must it be an integer? 

$ sacctmgr modify account where name=stats set fairshare=0.1
sacctmgr: error: Invalid value for FairShare (0.1)

We'd like to give some accounts a fraction of a share (for example 0.1). If not, is the recommended way to address this by multiplying all of our RawShares by a larger factor?
Comment 1 Alejandro Sanchez 2017-01-28 07:20:19 MST
(In reply to George Garrett from comment #0)
> Is there a way to set RawShares to decimals, or must it be an integer? 
> 
> $ sacctmgr modify account where name=stats set fairshare=0.1
> sacctmgr: error: Invalid value for FairShare (0.1)

Hi George. FairShare is internally stored in the shares_raw uint32_t field from the slurmdb_assoc_rec_t struct:

        uint32_t shares_raw;       /* number of shares allocated to
                                    * association */

So in short, you can't provide decimal values.

> We'd like to give some accounts a fraction of a share (for example 0.1). If
> not, is the recommended way to address this by multiplying all of our
> RawShares by a larger factor?

I'd say yes, you can multiply all of your RawShares by a larger factor if you want this account to have a FairShare value smaller than your current minimum, assuming the current minimum is 1.

Does it make sense?
Comment 2 George Garrett 2017-02-15 12:38:59 MST
Yes, that makes sense. Thank you for the response. This bug can be closed.