[gold-users] charging for GPUs

Scott Jackson scottmo at adaptivecomputing.com
Mon Mar 11 14:54:35 MDT 2013


Eva,

I recently sent the following response to a similar question:

In order to charge for GPUs you need to add a GPUS attribute to the usage
record table, define a charge rate for GPUS and tell glsusage to show it.

$ goldsh Attribute Create Object=UsageRecord Name=GPUS DataType=Float
Description="\"GPUs Used\""
Successfully created 1 attribute

$ gmkrate -T VBR -n GPUS -z 1 -d "1 credit per GPU-second"

$ vi /opt/mam/etc/gold.conf
usagerecord.show =
Id,Type,Instance,Charge,Stage,User,Group,Account,Organization,Class,QualityOfService,Machine,Nodes,Processors,GPUS,Memory,Duration,StartTime,EndTime,Description

The following shows the result of running a job with a gpu

$ echo sleep 30 | qsub -l nodes=1:gpus=1,walltime=60 -A chemistry
5.gpu

$ glsusage -J 5

Id Type Instance Charge Stage  User    Group   Account   Organization
Class QualityOfService Machine Nodes Processors GPUS Memory Duration
StartTime           EndTime             Description
-- ---- -------- ------ ------ ------- ------- --------- ------------
----- ---------------- ------- ----- ---------- ---- ------ --------
------------------- ------------------- -----------
3  Job  5            60 Charge scottmo scottmo chemistry sciences
batch                  gpu     1     1          1           30
2013-03-08 16:21:22 2013-03-08 16:21:52

 $ glstrans -A Charge -J 5 --full

Id Object      Action Actor Key Child Instance Count Amount Delta User
   Account   Machine Fund Allocation UsageRecord Duration Description
Details


                                                          CreationTime
       ModificationTime    Deleted RequestId TransactionId
-- ----------- ------ ----- --- ----- -------- ----- ------ -----
------- --------- ------- ---- ---------- ----------- --------
----------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------- ------------------- ------- ---------
-------------
73 UsageRecord Charge root  3   5     5        1         60   -60
scottmo chemistry gpu     2    2          3           30
    Class=batch,EndTime=1362784912,GPUS=1.000000,Group=scottmo,ItemizedCharges:=1.000000
[GPUS] * 1 [ChargeRate{GPUS}] * 30 [Duration] + 1 [Processors] * 1
[ChargeRate{Processors}] * 30 [Duration] =
60,Nodes=1,Organization=sciences,Processors=1,StartTime=1362784882,Type=Job
2013-03-08 16:21:52 2013-03-08 16:21:52 False   121       73

 $ glscharge -J 5

UsageRecord Instance Name       Value    Duration Rate ScalingFactor
Amount CreationTime        Description
----------- -------- ---------- -------- -------- ---- -------------
------ ------------------- -----------
3           5        GPUS       1.000000 30       1    1
  30 2013-03-08 16:27:20
3           5        Processors 1        30       1    1
  30 2013-03-08 16:27:20


If you are using Gold, then I would expect it to be similar, replacing
UsageRecord with Job, etc. You will also need to verify what Moab is
sending in the XML to Gold for gpus. In the case of Moab 7.1, it was
sending <GPUS>1</GPUS> so I had to use GPUS as the field I added to the
ChargeRate and UsageRecord (Job). You should be able to see the XML it is
sending in the goldd.log (and in moab.log).

Scott

On Mon, Mar 11, 2013 at 1:44 PM, Eva Hocks <hocks at sdsc.edu> wrote:

>
>
> Is there a way to charge for GPUs in gold?
>
> Thanks
> Eva
>
> _______________________________________________
> gold-users mailing list
> gold-users at supercluster.org
> http://www.supercluster.org/mailman/listinfo/gold-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.supercluster.org/pipermail/gold-users/attachments/20130311/54d77c03/attachment-0001.html 


More information about the gold-users mailing list