Configure Allocator

To configure Allocator, you need to create a file called config.tcl.

This file consists of the following parts:
  • Declaration of shared resources
  • Declaration of sites
  • Optional declaration of user maps
  • Optional declaration of local names for resources
  • Optional declaration of the Allocator systems to use
  • Optional declaration of constraints like stand-by allocations and out-of-queue reservations
Note: The declaration of sites and resources must precede configuration of sites or resources. If an attempt is made to configure a site or resource, such as setting the weight of a resource for a given site, before the site or resource has been declared, Allocator will generate an alert.
The config.tcl file can be built starting from a template found in $VOVDIR/etc/config/vovlad/config.tcl as shown in the following example.
### LicenseAllocator(tm) configuration file.
###
### This file should be placed in the la.swd/vovlad directory.
###
### Examples of a few basic commands are included in this file. Please uncomment
### relevant lines and modify as appropriate for your installation.

### Control the rank of LicenseAllocator.  Default is 30.  It must be >= 20 and < 1000.
### This allows the setup of a failover LicenseAllocator.
### The main LicenseAllocator should have a rank higher than the failover.
LA::SetRank 30

###########################
### DECLARATION SECTION ###
###########################
# Declare LicenseMonitor, Resources, and Sites in this section.
# All these declaration must precede configuration in the Configuration section.

### Specify server and port for LicenseMonitor. Alternately, you can let LA
### automatically detect the host and port from the registry, by using the keyword
### "auto" in place of host:port specification, and using LM project name (licmon
### by default)
### If the LicenseMonitor instance has SSL enabled, you must specify the -ssl
### flag on this command.
# LA::AddLicenseMonitor "lmsrv:5555" -version 2016.09 -ssl 1
# LA::AddLicenseMonitor "lmsrv1:5555 lmsrv2:6666"
# LA::AddLicenseMonitor "auto" -ssl 1 -version SAME

### Add a resource to share across all sites.
### LA::AddResource <name>      <tag/feature | qty>             <optional map>

# LA::AddResource   M5          10                              ""
# LA::AddResource   Lic:dc      FlexLM/SYNOPSYS/Design-Compiler ""
# LA::AddResource   WAN:lic_drc FlexLM/EDA/lic_drc              ""

### Alternatively, you can add all features we find in LicenseMonitor.
# LA::AddAllResources -includeTag _wan -useGroups 0 -resmapType License

###
### Define resource groups, i.e. groups of resources that
### should be handled together.
###
# LA::DefineResourceGroup "WAN:Spice" {
#     LA::AddResource "India:spice"  FLEXLM/IN/spice ""
#     LA::AddResource "Russia:spice" FLEXLM/RU/spice ""
# }

### Add two or more sites.  LicenseAllocator is not needed for only one site.

### Syntax:
### AddSite <NC instance> <nickname> { <resources> } [OPTIONS]
###   where options can be:
###    -port          <NC web port number>
###    -version       <RTDA version>
###    -remotehost    <host>
###    -defaultweight <WEIGHT>
###    -ssl           1
###    -autodetect    <Automatically detect the host and port from the
###                    registry, for the specified NC instance>

###  The <nickname>  should be a short name for the site.  We recommend using 2 to 4 characters,
###  and no spaces.

###  The <resources> are a list of alternating resource names
###  and weights.  When there is contention, each site's allocation
###  is the ratio of its weight divided by the sum of the weights
###  for all sites where that resource is in demand.
###  For the example below, when San Jose and Shanghai both have
###  jobs needing License:h1, San Jose gets 20/(20+40) = 1/3
###  and Shanghai gets 40/(20+40) = 2/3
###  BEST USAGE: it is best to leave the resources list empty and control the
###  weights of resources with LA::SetResourceWeight  and with -defaultweight in AddSite.
###
###  If the NC instance has SSL enabled, this command must include -ssl 1 flag to enable
###  communication with that NC site. When using SSL, make sure you specify the Web Port
###  for the NC instance, and not the VOV port.

###
### If a remote host is specified, the information from the site is gathered
### by doing an ssh to that host and by compressing the data with gzip.
### You must set up ssh so that no password is requested.
# LA::AddSite vncju@jupiter "SJ" {
# } -port 6271 -version 2016.09 -remotehost sj-login -ssl 1

# LA::AddSite vncpl@pluto "CN" {
# } -port 6271 -version 2016.03

# LA::AddSite vncsn "SN" {
# } -autodetect -version 2016.09 -defaultweight 240 -ssl 0

########### ADD AN LSF CLUSTER
### You need to use the options -lsf and setup a few directories and scripts.
### Please refer to documentation for details.

# LA::AddSite lsf1@uni00 lsfUni {} \
# -lsf -user cadmgr -mqdir [vtk_path_expand ./lsf_mq_dir]  \
# -remotehost uni00 -timezone PST8PDT

#############################
### CONFIGURATION SECTION ###
#############################
# Configure various aspects of LicenseAllocator. Note, all LicenseMonitor,
# Resources, Sites must have already been declared above in the Declaration
# section.

### Define different names for resources for specific sites
### LA::DefineRemoteResourceName <site>    <resourcemap> <remotename>
# LA::DefineRemoteResourceName   vnc@pluto License:h1    lic_h1

### Define a mimimum Stand-By quantity for a resource in a site.
# LA::SetMinQuantity CN License:h1 3

### Allow for reservations for out-of-queue jobs
### Reserve 3 licenses of License:abc for user edward to use out-of-queue.
# LA::SetReserveForUser License:abc edward 3
### Reserve 10 license of License:abc for any out-of-queue user.
# LA::SetReserveForUser License:abc * 10

### Reload historical metric data for all sites and resources for the last 30 days
# LA::ReloadHistoricalMetrics 30d

##################### ADVANCED SETTINGS ##################################

###  MQdebug  array.   If you need to generate additional debugging output for a specific resource
###                    set the variable MQdebug($RESOURCE) to 1.   Reset it to 0 to stop the output.
###
global MQdebug
# set MQdebug(License:abc) 1

### MQ(loopSleep)      The delay between cycles.
###
set MQ(loopSleep)      30

### MQ(useAllocFiles)  Used only for LSF sites. If set, create files  lsfdata/$NICNAME/elim.sitealloc_{status,total}
###                    Default is 0.
set MQ(useAllocFiles)  0

### If you want to execute a script at every cycle
### This can be repeated.
#
# LA::RegisterScript $tclScript
#
To configure Allocator, you need to create a file called config.tcl. This file consists of the following parts:
  • Declaration of shared resources
  • Declaration of sites
  • Optional declaration of user maps
  • Optional declaration of local names for resources
  • Optional declaration of the Allocator systems to use
  • Optional declaration of constraints like stand-by allocations and out-of-queue reservations
Note: The declaration of sites and resources must precede configuration of sites or resources. If an attempt is made to configure a site or resource, such as setting the weight of a resource for a given site, before the site or resource has been declared, Allocator will generate an alert.

Modify the Configuration File

The configuration file can be changed at any time, even as Allocator is running. The changes will be automatically detected within 1 minute or less.

The changes may include:
  • Adding or removing resources
  • Adding or removing queues
  • Changing the distribution weights of resources among the queues