Configure Taskers

The file taskers.tcl describes the vovtaskers for Accelerator.

vovtasker Configuration

You can find the file taskers.tcl in server configuration directory, default at $VOVDIR/../../vnc/vnc.swd/taskers.tcl, and in our test case at ~/ncadmin/vncdexin.swd/taskers.tcl.

This file is based on two commands (Tcl procedures), vtk_tasker_define and vtk_tasker_set_default:
# Set default behavior of vovtaskers 
vtk_tasker_set_default [options]

# Define a vovtasker 
vtk_tasker_define hostname [options]

If you set some options with vtk_tasker_set_default command, all the following vtk_tasker_define commands will use those options implicitly, and options set explicitly in vtk_tasker_define overwrite those set in vtk_tasker_set_default.

For example, to declare 3 vovtaskers on the hosts apple, orange, and pear, use:
# In taskers.tcl 
vtk_tasker_define apple 
vtk_tasker_define orange 
vtk_tasker_define pear
or some equivalent code:
# In taskers.tcl
foreach host {apple orange pear} { 
   vtk_tasker_define $host
}
To understand the use of vtk_tasker_set_default, define 3 vovtaskers as follows:
vtk_tasker_define apple -resources "@STD@ big_memory" -CPUS 2 
vtk_tasker_define orange -resources "@STD@ big_memory" -CPUS 2 
vtk_tasker_define pear -resources "@STD@ big_memory" -CPUS 4
vtk_tasker_set_default does the following:
vtk_tasker_set_defaults -resources "@STD@ big_memory" -CPUS 2 
vtk_tasker_define apple
vtk_tasker_define orange 
vtk_tasker_define pear	-CPUS 4

Tasker Configuration Examples

The default taskers.tcl provides pretty good examples of configuring vovtaskers. Most of the time, you just need to plug in some host names in brackets to define vovtaskers. For example, here is one piece of code in taskers.tcl.
# ADD THE NAMES OF THE COMPUTE SERVERS TO THE FOLLOWING LIST
set mainComputeServers {}

foreach host $mainComputeServers {
   vtk_tasker_define $host -resources "VovResources::Standard @RAMTOTAL@ @SWAPFREE@"
}
Note: -resources "VovResources::Standard" is equivalent to -resources"@STD@"
To add some "Server" class vovtaskers, you just need to add the names of those hosts into the list mainComputerServers, like the following:
set mainComputeServers { apple orange pear }
You can certainly add or modify the vovtasker definition as you want (subject to license restriction). For example, you have many dual CPU machines, and you would like to make the maxload of these vovtasker machines bigger, say, equal to 1.5 times of the CPUs, for example 3.0. Then you can do this:
set myDualCpuServers {}

foreach host $myDualCpuServers { 
    vtk_tasker_define $host -maxload   3.0    -resources "VovResources::Standard @RAMTOTAL@ @SWAPFREE@"
}

Add Workstation/Offhours vovtaskers

# Add a Workstation vovtasker that will only start to accept
# job after 10 minutes of ilde and will only accept jobs
# with expected duration no longer than 5 minutes
vtk_tasker_define ftcsun44 -resources "VovResources::Workstation -minIdle 10m -maxtime 5m @RAMTOTAL@"

# Add a Offhours vovtasker that's only available from 7pm to 6am
# every weekday and on weekends
vtk_tasker_define ftcsun66 -resources "VovResources::Offhours"

Start Newly Defined vovtaskers

Like other configurations, Accelerator will pick up the changes in taskers.tcl when the server is stopped and restarted. This is often too disruptive and not favorable, especially when there are jobs running in Accelerator. Here are some other ways to apply your changes:

  1. To start the vovtaskers that you just defined, use command:
    % ncmgr reset -taskers
  2. To start vovtaskers that you just modified, you must stop and start them.

Start/Stop vovtaskers (Advanced)

You can start/stop vovtaskers from the GUI and the browser.

The following is an advanced command of FlowTracer vovtaskermgr and how to run any command in the context of Accelerator using nc cmd.
# List all vovtaskers defined in taskers.tcl
# Also checks the taskers.tcl file for syntax errors
% nc cmd vovtaskermgr list

# Start all vovtaskers defined in taskers.tcl
% nc cmd vovtaskermgr start

# Start some vovtasker(s)
% nc cmd vovtaskermgr start tasker1 tasker2

# Stop all vovtaskers
% nc cmd vovtaskermgr stop

# Stop some vovtasker(s)
% nc cmd vovtaskermgr stop tasker1 tasker2

# Show detail information of all vovtaskers
% nc cmd vovtaskermgr show

# Get usage of all vovtaskermgr commands
% nc cmd vovtaskermgr

Start a vovtasker from Command Line (Advanced)

You can also start a vovtasker on the fly from the command line using the vovtasker binary. This can sometimes be handy, for example, for debugging. This is the command that Accelerator uses to start the vovtaskers after it reads the taskers.tcl configuration file.

  1. To start a vovtasker on a particular host, you need to go to that host and use command nc cmd vovtasker with appropriate options, which are similar to the options of vtk_tasker_define.
  2. Try the following examples and monitor the vovtaskers using the Monitor GUI or browser Tasker page.
    • Get usage of this command:
      % nc cmd vovtasker
      usage: vovtasker [-A startupLogFile] [-a name] [-b capabilities] [-B] 
                      [-c coefficient] [-C cpus] [-d] [-D integer] [-e reserveExpr] [-E] [-f tclfile][-F <file>] 
                      [-g taskergroup] [-G group] [-h host] [-H HEALTHCHECKFLAGS] [-I 0|1] [-I tclfile] [-j] [-k d|n|v] [-l rootofDailyLogFile]
                      [-L <loadSensor>] [-m <integer>][-M max_load] [-n <integer>] [-N] [-o local resource] [-p project] 
                      [-P <double>] [-r resources] [-R resources] [-s] [-S resources] [-t timeout] [-T capacity/max_capacity] 
                      [-U updateInterval] [-v number] [-V ncName@ncHost[:port]]
                      [-w WX properties] [-z <timeSpec>] [-Z <timeSpec>] [-g name] [-u name]
                     
              -A: The name of the startup log file
              -a:     Name this tasker. The name may contain only letters, numbers, dash(-) and underscore(_), or the expressions @HOST@ and @PID@ that get expanded on the fly
              -b:     Comma-separated list of capabilites, case insensitive:
                          symbolic: FULL NC LM
                          normal: PROCINFO NC LM
                          short: P N X R
              -B:    Show BPS tasker objects. Default to not show.
              -c:       Tasker coefficient (positive, default 1.0)
              -C:       Number of CPU's in this machine (automatic on win64). Use 0 to specify default value
      
      ...OMITTED...
    • Start a normal vovtasker (with all default settings):
      % nc cmd vovtasker -N
      vovtasker Jan 10 13:44:42
      Copyright © 1995-2020, Altair Engineering Linux/7.1 Jan 10 2019 10:00:59
      vnc@alpaca
      vovtasker Jan	10	13:44:42	Test	1: INTEGER OPS	W= 1.00 Reps=	500 T=	5.00ms
      vovtasker Jan	10	13:44:42	Test	1: DOUBLE OPS	 W= 1.00 Reps=	25 T=	10.00ms
      vovtasker Jan	10	13:44:42	Test	1: CHAR	OPS    W= 0.10 Reps=	10 T=	10.00ms
      vovtasker Jan	10	13:44:42	----	Weighted time:	16.00ms		
      vovtasker Jan	10	13:44:42	Test	2: INTEGER OPS	W= 1.00 Reps=	500 T=	5.00ms
      vovtasker Jan	10	13:44:42	Test	2: DOUBLE OPS	 W= 1.00 Reps=	25 T=	10.00ms
      vovtasker Jan	10	13:44:42	Test	2: CHAR	OPS    W= 0.10 Reps=	10 T=	20.00ms
      vovtasker Jan	10	13:44:42	----	Weighted time:	17.00ms		
      vovtasker Jan	10	13:44:42	Test	3: INTEGER OPS	W= 1.00 Reps=	500 T=	5.00ms
      vovtasker Jan	10	13:44:42	Test	3: DOUBLE OPS	 W= 1.00 Reps=	25 T=	10.00ms
      vovtasker Jan	10	13:44:42	Test	3: CHAR	OPS    W= 0.10 Reps=	10 T=	20.00ms
      vovtasker Jan	10	13:44:42	----	Weighted time:	17.00ms		
      vovtasker Jan	10	13:44:42	Best	weighted time:	16.00ms		
    • Start a vovtasker with name "myvovtasker", max load 4.0, and offers standard resources "@STD@" and resource "special_license":
      % nc cmd vovtasker -a myvovtasker -M 4.0 -r "@STD@ special_license"
      vovtasker Jan 10 13:51:00
      Copyright © 1995-2020, Altair Engineering Linux/7.1 Jan 10 2019 10:00:59
      vnc@alpaca
      vovtasker Jan	10	13:51:00	Test	1: INTEGER OPS	W= 1.00 Reps= 500  T=	5.00ms
      vovtasker Jan	10	13:51:00	Test	1: DOUBLE OPS 	W= 1.00 Reps= 25   T=	5.00ms
      vovtasker Jan	10	13:51:00	Test	1: CHAR	OPS    W= 0.10 Reps= 10   T=      20.00ms
      vovtasker Jan	10	13:51:00	----	Weighted time:	12.00ms	
      vovtasker Jan	10	13:51:00	Test	2: INTEGER OPS	W= 1.00 Reps= 500  T=	5.00ms
      vovtasker Jan	10	13:51:00	Test	2: DOUBLE OPS	 W= 1.00 Reps= 25   T=	5.00ms
      vovtasker Jan	10	13:51:00	Test	2: CHAR	OPS    W= 0.10 Reps= 10   T=      20.00ms
      vovtasker Jan	10	13:51:00	----	Weighted time:	12.00ms	
      vovtasker Jan	10	13:51:00	Test	3: INTEGER OPS	W= 1.00 Reps= 500  T=	5.00ms
      vovtasker Jan	10	13:51:00	Test	3: DOUBLE OPS	 W= 1.00 Reps= 25   T=	5.00ms
      vovtasker Jan	10	13:51:00	Test	3: CHAR	OPS    W= 0.10 Reps= 10   T=      20.00ms
      vovtasker Jan	10	13:51:00	----	Weighted time:	12.00ms