Automatic Resource Limits

The resources of type Limit are treated specially by VOV. When a job is created or submitted, if the name of the job resource contains one or more of these tokens @USER@, @GROUP@, @JOBCLASS@, @JOBPROJ@ then each token is replaced by the value of the corresponding field for the job. The resource map with the token is called the symbolic limit while the derived resource map is called the specific limit.

For example, if user "john" submits a job with the resources Limit:abc_@USER@, the following happens:
  • The resource requirement for the job is changed so that Limit:abc_@USER@ is replaced with Limit:abc_john
  • A new resource map called Limit:abc_john is created. This resource map will be assigned a maximum amount equal to the maximum of the resource map called Limit:abc_@USER@, if such resource map exists, or just 1 if the resource does not exist.
To use the automatic limit resources, the admin needs to create the symbolic resource. For example:
# In resources.tcl
vtk_resourcemap_set Limit:queue_normal_@USER@ 10
To change the value of all limits derived from a symbolic limit, you should use the procedure vtk_resourcemap_set_limit. This procedure normally sets all derived limits to the same new value, but it also allows the specification of different limits for selected users or the reduction of specific limits based on the out-of-queue usage of a given license.
# Example 1: set all derived limits to 15:
vtk_resourcemap_set_limit Limit:queue_normal_@USER@ 15

# Example 2: set all derived limits to 15, with a few exceptions:
vtk_resourcemap_set_limit Limit:queue_normal_@USER@ 15 -special {
   Limit:queue_normal_mary 20
   Limit:queue_normal_john  3
}

# Example 3: set all derived limits to 15, but consider out-of-queue usage
#            Since this limit changes over time, we put it inside a TIMEVAR
#            procedure, so it is computed once every minute.
TIMEVAR hsim_ooq {
   default {
       vtk_resourcemap_set_limit Limit:queue_hsim_@USER@ 15 -ooq License:hsim
   }
}