License usage enforcement with FLEXnet

Depending on how each application uses the licenses, License Scheduler manages and enforces license usage in different ways. License Scheduler has two levels of classifications for applications depending on how the application uses the license features and whether these license features are known at the start of the job.

License Scheduler and FLEXnet work with both classes of applications.

Class A and B applications

Class A applications are those where all license features needed to run its jobs are known before the start of the job, and these features are used for the entire job.

Class B applications are those where all license features needed to run the job are known before the start of the job, but not all of these features are used all the time. The period of time that the license features are not in use are known to License Scheduler, so additional requests for the unused license features can be handled appropriately using the Class A request process.

Class A and B license requests

  1. The user application makes a license usage request to the Platform LSF cluster.

  2. LSF sends a query to License Scheduler to see if the license token can be given to the application.

  3. When License Scheduler grants permission, LSF gives authorization to the user application.

  4. The user application sends a request to FLEXnet to check out a license.

License resource duration

If you specify DYNAMIC=Y in the lsf.licensescheduler Feature section, you must specify a duration in an rusage resource requirement for the feature. This enables License Scheduler to treat the license as a dynamic resource and prevents License Scheduler from scheduling tokens for the feature when they are not available, or reserving license tokens when they should actually be free.

For example, feature p1_2 is configured with DYNAMIC=Y:

Begin Feature 
NAME = p1_2 
DISTRIBUTION= Lan1 (a 1 b 1 c 1 default 1) 
DYNAMIC=Y 
End Feature

A job is submitted requesting license feature p1_2 with a duration of 2 minutes:

taskman -R "rusage[p1_2=1:duration=2]" myjob [1] 7141

myjob is granted the license token it requests:

blstat -t p1_2 
FEATURE: p1_2 
SERVICE_DOMAIN: Lan1 
TOTAL_INUSE: 1    TOTAL_RESERVE: 0    TOTAL_FREE: 1    OTHERS: 0  
PROJECT                 SHARE   OWN  INUSE RESERVE FREE   DEMAND  
a                       25.0 %  0   0       0      0     0  
b                       25.0 %  0   0       0      0     0  
c                       25.0 %  0   0       0      1     0  
default                 25.0 %  0   1       0      0     0

After the duration expires, myjob checks in the license, and the token for p1_2 is available again:

bltasks 
TID    USER     STAT      HOST    PROJECT       FEATURES        CONNECT TIME 
41     user1    RUN       hostA   default       p1_2            Oct 27 07:15:10 % 
blstat -t p1_2 
FEATURE: p1_2 
SERVICE_DOMAIN: Lan1 
TOTAL_INUSE: 0    TOTAL_RESERVE: 0    TOTAL_FREE: 2    OTHERS: 0   
PROJECT                 SHARE   OWN  INUSE RESERVE FREE   DEMAND  
a                       25.0 %  0   0       0      0     0  
b                       25.0 %  0   0       0      1     0  
c                       25.0 %  0   0       0      1     0  
default                 25.0 %  0   0       0      0     0

Class C applications

Class C applications require an initial feature license to start a job and additional feature or sub-feature licenses during job execution. The user who submits the job knows the main license feature needed to start the job, but might not know the additional feature names or the number of additional features required. At any time, the user application can either make a request to LSF without requesting verification from License Scheduler, or it can bypass LSF entirely by sending the license request directly to the FLEXnet license servers.

Managed Class C license requests

  1. The user application makes a request to LSF without requesting verification from License Scheduler.

  2. LSF gives authorization to the user application because the request did not specify the need for License Scheduler verification.

  3. The user application sends a request to FLEXnet to check out a license.

Managing class C license checkout

To enforce license distribution policies for class C license features, configure ENABLE_DYNAMIC_RUSAGE=Y in the feature section of lsf.licensescheduler

Example: managed class C workload

License feature feat2 is configured as a managed class C feature:

Begin Feature 
NAME = feat2 
DISTRIBUTION = LanServer(proj1 1 default 1) 
ENABLE_DYNAMIC_RUSAGE = y 
End Feature

User user1 submits a job to run app1, which specifies license feature feat1:

bsub -R "rusage[feat1=1]" -Lp proj1 app1 

The job runs and license feat1 is checked out:

blstat FEATURE: feat1 SERVICE_DOMAIN: LanServer TOTAL_INUSE: 1    TOTAL_RESERVE: 0    TOTAL_FREE: 4    OTHERS: 0  
  PROJECT                 SHARE   OWN  INUSE RESERVE FREE   DEMAND 
 proj1                    50.0 %   0     1    0      2       0
 default                  50.0 %   0     0    0      3       0
FEATURE: feat2             
SERVICE_DOMAIN: LanServer TOTAL_INUSE: 0    TOTAL_RESERVE: 0    TOTAL_FREE: 10   OTHERS: 0   
PROJECT                 SHARE   OWN  INUSE RESERVE FREE   DEMAND 
 proj1                    50.0 %   0     0    0      5       0
 default                  50.0 %   0     0    0      5       0
blusers -l 
FEATURE  SERVICE_DOMAIN  USER   HOST    NLICS   NTASKS OTHERS  DISPLAYS PIDS 
feat1    LanServer       user1  hostA   1       1      0     (/dev/tty) (16326)
% blusers -J 
JOBID   USER     HOST     PROJECT          CLUSTER        START_TIME 
1896    user1    hostA    proj1            cluster1       Aug  9 10:01:25 
RESOURCE        RUSAGE        SERVICE_DOMAIN 
feat1           1             LanServer

Later, app1 checks out feature feat2. Since it was not specified at job submission, feat2 is a class C license checkout. But since it is configured with ENABLE_DYNAMIC_RUSAGE=Y, jobs that require feat2 are considered managed workload, and subject to the distribution policies of project proj1:

blstat 
FEATURE: feat1 
SERVICE_DOMAIN: LanServer 
TOTAL_INUSE: 1    TOTAL_RESERVE: 0    TOTAL_FREE: 4    OTHERS: 0 
PROJECT                 SHARE   OWN  INUSE RESERVE FREE   DEMAND 
 proj1                    50.0 %   0     1    0      2       0
 default                  50.0 %   0     0    0      2       0
FEATURE: feat2             
SERVICE_DOMAIN: LanServer 
TOTAL_INUSE: 1    TOTAL_RESERVE: 0    TOTAL_FREE: 9    OTHERS: 0 
PROJECT                 SHARE   OWN  INUSE RESERVE FREE   DEMAND 
 proj1                    50.0 %   0     1    0      4       0
 default                  50.0 %   0     0    0      5       0
 blusers -l 
FEATURE  SERVICE_DOMAIN  USER   HOST    NLICS  NTASKS  OTHERS  DISPLAYS   PIDS 
feat1     LanServer       user1  hostA  1      1       0    (/dev/tty)  (16326) 
feat2     LanServer       user1  hostA  1      1       0    (/dev/tty)  (16344)
blusers -J 
JOBID   USER      HOST      PROJECT             CLUSTER        START_TIME 
1896    user1     hostA     proj1               cluser1        Aug  9 10:01:25 
RESOURCE        RUSAGE        SERVICE_DOMAIN 
feat1           1             LanServer 
feat2           1 (class-C)   LanServer