Request a License Before Executing Jobs

Occasionally, a script can include a job that requires a license. Normally, such jobs are submitted to the queue.

However, instead of submitting the job to the queue, it can be checked if a license if available,and then execute the job on the local host. This can be automated by wrapping the command with vovresreq.

Use vovresreq with Accelerator

The vovresreq command works by waiting until the resource License:hspice is available before executing the remainder of the command line. In this example: the remainder of the command line is the SPICE run. If the license is not immediately available, vovresreq waits for the license before running the job.

Instead of calling spice directly, call it as follows:
% nc cmd vovresreq License:spice spice netlist.spi

vovresreq

This utility creates a job for tool vovresgrab.


vovresreq: Usage Message
  
  DESCRIPTION:
        This utility is normally used within scripts.
  
        Execute a command after grabbing a list of
        resources (typically licenses) required to run the command.
        The utility waits until all requested resources have
        been made available.
        The command also reads the VNCSWD/vovresreq/config.tcl file.
        This file contains the optional line:
            set RESREQ(jobclass)   <jobclassName>
            set RESREQ(slavegroup) <slavegroupName>
            set RESREQ(slavenames) <commaSeparatedListOfSlaveNames>
        Currently the jobclass can be used but the resources it specifies are
        not currently used. But it is added here for a future release.
        The slavegroup and slavesnames are used in the resources of the
        vovresreq jobs. slavegroup if defined supercedes slavenames.
        The jobclass name is the name of a jobclass to use for the
        resource check out. This jobclass usually specifies a slave
        group to use that minimizes the number of job slots used. The
        slaves in this slavegroup are usually virtual slaves where the
        number of slots on the slave is much larger than the number of
        cores. The vovresreq jobs are very minimal jobs and do not use
        a lot of cpu time and very little memory (much less than 20 meg).
        This job class should be sure to specify resources of
            PERCENT/0 RAM/20
        so the server can accomodate a large number of jobs. It is up
        to the job class creator to determine the actual value of the resources.
  
        This utility creates a job for tool vovresgrab.
  
      USAGE IN SCRIPTS: optional arguments are in []
        Old style vovresreq command
            vovresreq [-v] RESOURCE_LIST [CMD]
        in the above case the -v switch if defined must preceed the
        RESOURCE_LIST and CMD
        This is exactly like submitting
            vovresreq [-v] -checkout RESOURCE_LIST -exec CMD
        Both of these ways of using vovresreq are for single checkouts
        and the checkout is done whne the CMD is completed.
  
        These ways of using vovresreq allow multiple checkouts and
        check ins with the resid switch.
            vovresreq [-v] -checkout RESOURCE_LIST [-resid N] [-exec CMD]
            vovresreq [-v] -checkin  RESOURCE_LIST [-resid N]
  
  USAGE WITH NetworkComputer:
       % nc cmd vovresreq RESOURCE_LIST CMD ...
  
  OPTIONS:
         -h                   -- display this usage message
         -v                   -- Increase verbosity.
         -checkout            -- Wait for license to be checked out, then
                                 return, else wait until the command completes.
         -checkin             -- Return the resources previously checked out.
         -exec                -- Execute command (this is the default)
         -resid               -- Define the resource Id so they can be
                                 checked in the order the user wants.
         -sameslave           -- Make sure the vovresgrab runs on the same slave
                                 as the job currently executing vovresreq.
                                 This is valuable for correct matching of
                                 handles and jobs. However this can be slow
                                 if the slave is highly loaded.
  
  EXAMPLES:
  
       Example 1:
          -- ...script fragment...
          vovresreq -v "License:calibre" calibre cell.drc
  
       Example 2:
          -- ...script fragment for a single checkout and check in...
          vovresreq -checkout "License:calibre" -resid 1
          calibre cell.drc
          vovresreq -checkin  "License:calibre" -resid 1
  
       Example 3:
           -- ...script fragment with multiple checkouts and check ins...
           vovresreq [-v] -checkout RESOURCE_LIST1 [-resid 1]
           calibre cell.drc
           vovresreq [-v] -checkout RESOURCE_LIST2 [-resid 2]
           calibre cell.erc
           vovresreq [-v] -checkin   RESOURCE_LIST2 [-resid 2]
           vovresreq [-v] -checkout  RESOURCE_LIST3 [-resid 3]
           calibre cell.lvs
           vovresreq [-v] -checkin   RESOURCE_LIST3 [-resid 3]
           vovresreq [-v] -checkin   RESOURCE_LIST1 [-resid 1]
  
      Example 4:
           -- Execute the command on the local machine but only after
           -- grabbing a License:calibre resource.
           % nc cmd vovresreq "License:calibre" -resid 1 calibre cell.drc
           % nc cmd vovresreq "License:drc License:hdrc" -resid 2
                              calib bigcell.drc
  

vovresgrab

vovresgrab is used in conjunction with vovresreq to request resources on the fly. This utility is not meant to be invoked by the user, but only by vovresreq.


vovresgrab: Usage Message
  
      DESCRIPTION:
             vovresgrab is used in conjuction with vovresreq
             to request resources on the fly.
             This utility is not meant to be invoked by the
             user, but only by vovresreq.
      USAGE:
         % vovresgrab <RESLIST> <JOBID> <HOST> <PORT> <RESID>