Automatic Setting of LM_LICENSE_FILE
The capability described in this section is useful when the same license is provided by more than license server.
Problem Description
- The daemon 1234@lan.company.com has 3 licenses for LAN use
- The daemon 9999@wan.company.com has 10 licenses for WAN use
setenv LM_LICENSE_FILE 1234@lan:9999@wan
For this example, the scheduler has decided that a given job should use a WAN license. When the job is launched, however a LAN license has just become available, and the tool actually checks out a LAN license instead of a WAN license.
- One WAN license is considered in use by the scheduler (requested but not yet used).
- One LAN license is actually in use (not requested but currently used).
In this situation, it would be desirable for the scheduler to decide that a job should use a WAN licenses and the value of LM_LICENSE_FILE should be only 9999@wan. However, if the scheduler chooses the LAN license, then the value of LM_LICENSE_FILE should be only 1234@lan. This arrangement works best if the license checkouts need to be queued by FlexNet Publisher.
The farm would work more efficiently if the value of LM_LICENSE_FILE were controlled at execution time on the basis of the resources grabbed for each individual job. A solution is described in the following section.
Solution: set VOV_LM_VARNAMES
vw2
and its aliases. Interactive jobs that have a PTY do
not use this wrapper, so the VOV_LM_VARNAMES capability is only available for batch jobs.A typical value of VOV_LM_VARNAMES is LM_LICENSE_FILE, but sometimes it is necessary to control other variables such as CDS_LICENSE_FILE (for Cadence tools). At times, it may be desirable to set VOV_LM_VARNAMES to another variable name which is then processed by one of the wrapper scripts.
There may be cases where it is desired to exclusively set license variables instead
of prepending to existing values. To accomplish this, set the VOV_UNSET_VARNAMES
environment to a comma-separated list of environment variables to unset and they
will be unset before the vw
wrapper populates them.
setenv VOV_LM_VARNAMES LM_LICENSE_FILE
# Examples of uses of VOV_LM_VARNAMES
setenv VOV_LM_VARNAMES CDS_LICENSE_FILE
setenv VOV_LM_VARNAMES CDS_LICENSE_FILE,LM_LICENSE_FILE
setenv VOV_LM_VARNAMES MY_VAR
Job submission with VOV_LM_VARNAMES
setenv VOV_LM_VARNAMES LM_LICENSE_FILE
% ves MYENV
% nc run -r License:abc -- abcTool ...
% nc run -e MYENV -r License:WAN_abc -- abcTool ...
LM_VAR_NAME - deprecated
For backwards compatibility, the variable LM_VAR_NAME could be used to set the name of a single environment variable.
vovgetflexlmdaemons
In some situations, using other methods to set the LM_VAR_NAME variable on the fly may be preferred. The utility vovgetflexlmdaemons can be used to locate the daemons that need to be used based on the resources grabbed by Accelerator at dispatch time.
vovgetflexlmdaemons: Usage Message
DESCRIPTION:
Processes VOV_UNSET_VARNAMES, VOV_LM_VARNAMES, and/or LM_FILE_VAR
environment variables and generates script for the specified shell that
will unset the variables listed in VOV_UNSET_VARNAMES and then set
LM_LICENSE_FILE to match the resources used by the job whose ID is in
VOV_JOBID or those provided on the command line.
USAGE:
% vovgetflexlmdaemons [OPTIONS] [RESOURCES]
OPTIONS:
-v -- Increase verbosity
-h -- This help
-sh -- Specify the shell for the output script, default is csh
-bash
-ksh
-csh
-tcsh
EXAMPLES:
% vovgetflexlmdaemons -h
% vovgetflexlmdaemons
% vovgetflexlmdaemons -bash
% vovgetflexlmdaemons -bash License:lic_drc
EXAMPLE OUTPUT:
### With -bash option.
LM_LICENSE_FILE=6306@mac05;
export LM_LICENSE_FILE;
### With -csh option.
setenv LM_LICENSE_FILE 6306@mac05
USAGE IN SCRIPTS:
eval `vovgetflexlmdaemons`;