Jobclass Examples

Short Jobs

In this example, a jobclass is set up for short jobs. All jobs have the strict CPU limit of 10 seconds.
set classDescription "Jobs taking less than 10 seconds"
set VOV_JOB_DESC(env)                    "BASE+D(VOV_LIMIT_cputime=10)"
set VOV_JOB_DESC(priority,sched)         8
set VOV_JOB_DESC(resources)              "unix"
set VOV_JOB_DESC(xdur)                   10

proc initJobClass {} {
  # No actions needed to initialize this job class.

Night Jobs

In this example, a jobclass is set up for jobs to run at night or on weekends. For each users, the limit is set for 10 jobs per night.
set classDescription "Jobs to run at night or during weekends"
set VOV_JOB_DESC(env)             "SNAPSHOT"
set VOV_JOB_DESC(priority,sched)  2
set VOV_JOB_DESC(resources)       "Queue:night Limit:night_@USER@"

proc initJobClass {} {
   vtk_resourcemap_set Limit:night_@USER@ 10

   TIMEVAR night {
      Sat,Sun {
         vtk_resourcemap_set Queue:night unlimited
      20:00-24:00,00:00-07:30 {
         vtk_resourcemap_set Queue:night unlimited
      default {
         vtk_resourcemap_set Queue:night 0

Caldrc Jobs

In this example, a jobclass is set up to optimize usage for jobs that use an expensive license. FairShare weights are also established to control the allocation of this resource to different users within the jobclass.
# Description of the class 'caldrc'
set classDescription "Run a caldrc Job"
set VOV_JOB_DESC(env)             "BASE+CALDRC"
set VOV_JOB_DESC(priority,sched)  6
set VOV_JOB_DESC(group)           /class/caldrc
set VOV_JOB_DESC(resources)       "License:caldrc Limit:caldrc_@USER@"

proc initJobClass {} {
   vtk_flexlm_monitor  MENTOR/caldrc License:caldrc
   vtk_resourcemap_set_limit Limit:caldrc_@USER@ 20

   # Revoke grabbed/not-used resources after 2m.
   vtk_jobclass_set_revocation_delay "calibre" 2m

   FAIRSHARE_WEIGHTS /class/caldrc {
        john    100
        mary    150
        default  30