In this article, you will learn how to assign unique attributes to a job that can later be used for accounting purposes. Also see “myusage” and “clui”
Certain optional unique Job Attributes can be specified to the job. They are intended to be used for accounting and job tracking by the user. Later, this information can be used to generate reports using “myusage” and the clui tool.
The special Job Attributes are:
- JobSet – can be any alpha-numeric text (no spaces)
- Customer – can be any alpha-numeric text (no spaces)
- Application – can be any alpha-numeric text (no spaces)
- Project – can be any alpha-numeric text (no spaces)
- Label – can be any alpha-numeric text (no spaces)
- Tag – can be any alpha-numeric text (no spaces)
- Category – can be any alpha-numeric text (no spaces)
- Status – can be any alpha-numeric text (no spaces)
- Score – can be any alpha-numeric text (no spaces)
- Flagged – only numeric
0|1
Special Job Attributes are specified in the .pbs file using the #PBS -A ATTRIBUTE=VALUE and VALUE is any alpha-numeric string. For example:
#PBS -A Customer=ABC:Project=abc1:JobSet=xyz
or
#PBS -A Customer=ABC #PBS -A Project=abc1 #PBS -A JobSet=xyz
In this example.pbs file below, the user is defining the Customer, Project, and JobSet attributes to the job:
#PBS -l nodes=2:ppn=8:green #PBS -l nodes+=1:ppn=24:copper #PBS -l nodes++=2:ppn=8:cobalt #PBS -A Customer=AcmeAAA:Project=lowerlevel:JobSet=43b21 # add the latest version of FDS module to your environment module add fds # change to the working directory cd $PBS_O_WORKDIR # run in parallel on 16 cores mpirun fds_mpi fire_whirl_pool.fds
Special Job Attributes may be specified with the -A option to qsub command. Each attribute must be seperated by a colon (:). If multiple -A options are specified, the last value is used. For example:
qsub -A Customer=ABC:JobSet=123:Application=a.out:Project=XYZ myfile.pbs
Generate a Report
The “mysuage” command can later be used to generate a usage report containing the special job attributes. First run “mybalance” to get the allocation ID. Then use it to generate the report. For example:
myusage --allocation [id] --display _default,attributes --csv -E name@youremail.com
will generate a csv report all jobs charged to a particular allocation and email it to the email address. The CVS file can then be imported into a spread sheet such as MS Excel.