Issue: How can I use a job template to limit a jobs walltime based on the number of processors requested?
Affected Versions: All
Symptom:
Some sites wish to give a longer walltime to jobs that request more processors and less walltime for smaller jobs. Job templates can be a good solution for this.
Solution:
In this solution we are limiting the long queue to one running jobs.
CLASSCFG[long] MAXJOB=1
In this tempalte we look for a jobs requesting between 1 and 2 procs and CLASS long. We then set the walltime to 300 seconds.
JOBCFG[job1.set] WCLIMIT=300
JOBCFG[job1.min] DPROCS=1 class="long"
JOBCFG[job1.max] DPROCS=2
JOBMATCHCFG[job1] JMIN=job1.min JSET=job1.set JMAX=job1.max
In this tempalte we look for a jobs requesting between 3 and 4 procs and CLASS long. We then set the walltime to 600 seconds.
JOBCFG[job2.set] WCLIMIT=600
JOBCFG[job2.min] DPROCS=3 class="long"
JOBCFG[job2.max] DPROCS=4
JOBMATCHCFG[job2] JMIN=job2.min JSET=job2.set JMAX=job2.max
Tags: job tempate, template