Preemption Methods
A preemption method is a set of actions that are applied to the preemptable job to revoke its resources. Some methods are provided with the Accelerator software. Additional methods can be implemented by writing procedures in Tcl using the Accelerator API calls.
VovPreemptMethod can be used in the configuration file to associate a method with a resource to be revoked.
AUTOMATIC- This is the default method and means that the actual preemption method is computed on the basis of the licenses (not the grabbed resources) actually held by the preempted job.
SIGTSTP- The job's process group is signalled with the operating system TSTP
signal. Many software tools will first give up their licenses, then
self-suspend after receiving this signal. Verify that your tool responds
as desired when using this method.
This method sends
TSTPto all processes in the process tree of the job. If the job requiresTSTPto be sent to only a few processes, as in the case of ModelSim, theEXTmethod needs to be used. SIGTSTP+LMREMOVE- The same as above but also calls
lmremoveto remove all license checkouts detected for the job being preempted. This is useful for tools that use 3rd-party licenses, such as a piece of IP provided by a 3rd-party vendor, that is used in a simulation. SUSPEND- The job's process group is signalled with the operating system STOP
signal. This causes it to be inactive until it is resumed by the
operating system
CONTsignal. SUSPEND+LMREMOVE- Like
SIGTSTP+LMREMOVE, but uses theSTOPsignal instead ofTSTP. STOP- The job is dequeued or stopped, and rescheduled. Mainly used with jobs that have only been running a short time.
EXT- This method uses an EXTernal script to send a specified list of signals to one or more of the processes in the job. This method is used, for example, to preempt ModelSim jobs.
EVENTS-ONLY- The
EVENTS-ONLYmethod does not actually preform any preemption but only issues preemption events. This method can be useful for those users that wish to perform specific preemptions themselves using custom scripts.
% nc cmd vovshow -preemptmethods
1 SIGTSTP+LMREMOVE *:RETRACING:SIGTSTP 5:WAIT:SUSPEND 10:SUSPENDED:LMREMOVE 20:LMREMOVED:DONE
2 SUSPEND *:*:SUSPEND
3 SIGTSTP+SUSPEND *:RETRACING:SIGTSTP 5:WAIT:SUSPEND
4 SIGTSTP *:*:TSTP
5 KILL+RESUBMIT 0:*:KILL 10:WITHDRAWN:RESUBMIT
6 LMREMOVE *:*:SUSPEND 10:SUSPENDED:LMREMOVE 20:LMREMOVED:DONE
7 AUTOMATIC *:*:*
8 JOBHANDLER 0:*:EXT,SIGTSTP,tclsh* 5:SUSPENDED:NOLMREMOVESelect the Preemption Method
- If the job uses
SmartSuspend, then the propertySSR_STATUS_PATHexists on the job and the methodSMARTSUSPENDwill be used. - Set the property
VOVPREEMPT_METHODon the job. For example:% nc run -P VOVPREEMPT_METHOD=LMREMOVE -r License:abc -- myscript mychip.x - Set the property
VOVPREEMPT_METHODon the jobclass. This can be set using the procedure vtk_jobclass_set_preemption_method, as in this example:# This could be in vovpreemptd/config.tcl vtk_jobclass_set_preemption_method hsim_lo STOP - Assign a preemption method to each resource map, using the procedure VovPreemptMethod in the file vnc.swd/vovpreemptd/config.tcl.
The procedure VovPreemptMethod is used to specify which method to use for each resource this is used by the preempted job.
LMREMOVE
While the method LMREMOVE works well with a majority of licenses, some licenses are harder to get and this procedure allows specifying how this should be done.
SIGTSTP signal, but it can only
be sent to a specific process in the process tree. ModelSim is one such tool, which
wants the SIGTSTP signal to be delivered only to the
vish process.
VovPreemptMethod License:msimhdlsim EXT -signal TSTP -include vishLicense:simtoken, presumably derived from the FlexNet Publisher feature Virtuoso_MultiMode_Simulator, the
EXT method (external) and sending the signal
SIGTSTP are required, but only for the processes either
spectre or ultrasim:
VovPreemptMethod License:simtoken EXT -signal TSTP -include "spectre ultrasim"Incisive_Enterprise_Simulator:VovPreemptMethod License:Incisive_Enterprise_Simulator EXT -signal TSTP -include "ncsim ncvlog_main"
vovpreemptmethod
Specify which method to use for each resource this is used by the preempted job.
Usage: VovPreemptMethod resourcemap methods [OPTIONS]
WHERE: methods -- A list of one or more of
EXT SUSPEND MODELSIM LMREMOVE SIGTSTP JOBHANDLER
OPTIONS:
-signal <SIGNAME> -- TSTP, USR1, USR2, ...
-include patternList -- Only send signal to processes that match one of
the pattern in the list
-exclude patternList -- Do not send signal to processes that match one of
the pattern in the list
-process patternList -- Synonym for -include.
EXAMPLES:
VovPreemptMethod License:msimhdlsim EXT
-signal TSTP -include vish
VovPreemptMethod License:Virtuoso_Multi_mode_Simulation EXT
-signal TSTP -include "spectre ultrasim"
VovPreemptMethod License:Virtuoso_Multi_mode_Simulation EXT
-signal TSTP -include "spectre* *ultra*"
VovPreemptMethod License:DesignCompiler LMREMOVE