Start a Test Queue

At a given site, a single queue is recommended, such as a single Accelerator setup, by default called "vnc". Such a setup is called a cluster by other systems. The scheduler in Accelerator does not have queues in the sense used by other batch systems.

In this tutorial, you will start a temporary Accelerator queue for our testing. This allows you to experiment with most of the administration tasks without disturbing your production Accelerator queue.

Find the Server Working Directory

The Accelerator configuration directory for the default queue named "vnc" is in the product hierarchy. The server working directory for this queue is:
$VOVDIR/../../vnc/vnc.swd

This directory contains the server configuration files and server/tasker logs, etc.

Start a Queue

The command to start a queue is ncmgr start. By default, this command will start the default queue in the directory of $VOVDIR/../../vnc.

  1. Get usage of this command:
    
    vncmgr: Usage Message
      
      USAGE:
              % ncmgr start [options]
      OPTIONS:
              -h                      This help.
              -force                  Do not ask confirmation.
              -block                  Do not return to the shell or command prompt
                                      after starting. This is only useful, and
                                      required, when starting Accelerator as a
                                      Windows service.
              -port  <port|mode>      Specify port number, port number list (colon
                                      separated) or port mode. Modes are:
                                      automatic - hash queue name into port number,
                                                  do not start if port is
                                                  unavailable.  The default queue
                                                  name 'vnc' hashes
                                                  to port 6271.
                                      any - hash queue name into port number, try
                                            additional ports in increments of 1
                                            until an available one is found. The
                                            default queue name 'vnc' hashes to
                                            beginning port 11437.
                                      Default: any
              -webport <port|mode>    Specify a dedicated web interface port for
                                      HTTP and HTTPS protocols.  This port must be
                                      configured to enable REST API v3 interface,
                                      to enable the dashboard web UI page, and to
                                      enable SSL.  A value of 0 directs VovServer
                                      not to open a web interface port.  Port
                                      number lists, 'automatic', and 'any' are not
                                      supported.
                                      Default: 0
              -webprovider <provider>    Specify the provider for   
                                         HTTP and HTTPS protocols.  
                                         This must be either "internal" or "nginx". 
                                         Default: "nginx"
              -roport  <port|mode>    Specify read-only guest access web interface
                                      port. A value of 0 disables this interface,
                                      requiring all web interface users to log in.
                                      Default: 0
              -q, -queue <name>       Name for queue (default is vnc).
      
              -dir <dir>              Directory of the server
                                      (default $VOVDIR/../../vnc).
              -dbhost <host>          Host for database.
              -dbroot <path>          Path on database host for database files.
              -dbport <port>          Port of the database to listen for
                                      connections.
              -v                      Increase verbosity.
      EXAMPLS:
              % ncmgr start -port 6271
              % ncmgr start -port 6271:6272:6273:any -force
              % ncmgr start -q bigqueue -dir /remote/queues
      
  2. Start the test queue in the home directory.
  3. Name your queue vncdexin (make sure you pick a name that does not conflict with any existing queue). The first three letters of the queue name should be formed by prefixing your login with vnc
    For example, if your login is 'danny', use the name 'vncdanny' for your queue.
    + start a shell on the machine where your NC vovserver should run
    % cd	           # Go to your home directory
    % mkdir ncadmin	# Create a directory for our testing queue
    % ncmgr start -dir ncadmin -queue vncdexin
      message: Checking the license... 
      message: ... the license is good. 
      message: Starting NC
      message: with name    vncdexin
      message: on host      alpaca
      message: in directory /home/dexin/ncadmin
      message: as user      dexin
    Do you want to proceed? (yes/[no]) > yes
      message: Updating config file '/remote/release/VOV/2013.09/linux64/local/vncConfig/vncdexin.tcl' message: Waiting for server to be ready ...
      message: Sanity check...
      message: NC vncdexin@alpaca is ready.
    Note: Make sure the directory $VOVDIR/local/vncConfig is writable to you, because a config file needs to be written in that directory to start a new queue. The Altair Accelerator installer should have set this.

Use a Specific Queue

Now that you have started a new queue, you have at least two Accelerator queues in your system. There are two ways to use a particular queue.

  1. Use -q or -queue option:
    # Submit a job to queue "vncdexin"
    % nc -q vncdexin run sleep 60
    
    # List my jobs in queue "vncdexin"
    % nc -q vncdexin list
    
    # Get info about queue "vncdexin"
    % ncmgr info -queue vncdexin
    
    # Reset all taskers for queue "vncdexin"
    % ncmgr reset -queue vncdexin -taskers
    
  2. Alternatively, you can set the environment variable NC_QUEUE:
    You can also set an environment variable NC_QUEUE to the name of queue you want. Then you can execute all your nc and ncmgr commands in the context of that queue without having to use -q or -queue options.
    % setenv NC_QUEUE vncdexin
    
    # Now submit a job to queue "vncdexin"
    % nc run sleep 61
    
    # etc.

    This way, you can easily switch between all the queues you have.