Policies and Resources

You can define site-specific policies on how resources are allocated to various projects by creating a file called $VOVDIR/local/resources.tcl. This file contains the definition of a procedure called vtk_resources_policy_hook and can be used to limit the amount of resources assigned to a given project.

The default definition for this procedure is:
# Default definition 
proc vtk_resource_policy_hook { projectName resName max } {
    return $max
}
For example, if you have 70 license of SPICE and do not want any project to have more than 20, except special projects, you can write the following definition for vtk_resources_policy_hook:
# Example of definition of vtk_resource_policy_hook
proc vtk_resource_policy_hook { projectName resName max } {
   switch -glob $resName {
      "spice*" {
          switch -glob $projectName {
             "special*" { return $max }
             default {
                 return [expr $max > 20 ? 20 : $max ]
              }
          }
       } 
       default {
            return $max
       }
    }
}