Submit Jobs with CLI Commands

This chapter provides examples of submitting jobs using CLI (command line interface) commands.

Note: CLI commands are case insensitive. For example, timetolerance and timeTolerance represent the same command.

Submit a Single Job

Note: In the job examples provided, each job performs sleep xx, which is wait, do nothing, for the duration specified by the integer value xx.
When submitting a single job:
  • Use an environment snapshot.
  • The default resource list is the vovarch of the machine that submits the job.
  • The name of the log file is automatically computed.

Run a Job, No Specifications

% wx run sleep 30
Fairshare= /time/users
Resources= linux64 CORES/1 RAM/500
Env      = SNAPSHOT(wx_logs/snapshots/jon/linux64/env16220.env)
Command  = vw sleep 30
Logfile  = wx_logs/20180404/132352.71209
JobURL   = http://SOMEHOST:SOMEPORT/cgi/node.cgi?id=001241627
JobId    = 001241627

Run a Job, Environment Specified (-e)

% nc run -e BASE sleep 30
...

Run a Job, Environment and Resources Specified (-r)

% wx run -e BASE -r RAM/333 -- sleep 30
Fairshare= /time/users
Resources= RAM/333 CORES/1
Env      = BASE
Command  = vw sleep 10
Logfile  = wx_logs/20180404/132618.92050
JobURL   = http://SOMEHOST:SOMEPORT/cgi/node.cgi?id=001241648
JobId    = 001241648

Run a Job, Environment and Resources Specified, Limited Verbosity (-v)

# Control verbosity: print the jobId only.
% nc run -v 1 -e BASE -r linux -- sleep 30
00002579
# Running a job,  environment and resources specified, limited verbosity and wait for job to finish (-w):
% nc run -w -v 0 -e BASE -r linux -- sleep 30

Submit Multiple Jobs

When a list of similar jobs is to be submitted, it is much more efficient to submit them all at once.

Note: When submitting multiple jobs use the same environment and the same resources, and the same priority level is scheduled for each job. Each job has its unique identification.
  1. Prepare a file with one command on each line. Empty lines are ignored and lines that begin with # are considered comments.
    # Example of file used to submit multiple jobs at once. 
    sleep 10
    sleep 11
    sleep 12
    sleep 13
  2. Use the option -f to specify the command file, as in the following example:
    % nc run -r unix -e BASE -f commandFile

Default Output of wx run

The default output from nc run includes the following information:
  • The resource list assigned to the job, which can be controlled with the option -r.
  • The environment used for the job, which can be controlled with the option -e.
  • The command line.
  • The log file used to store both stderr and stdout of the command, which can be controlled with the option -l
  • The JobId assigned by Accelerator Plus to this job. Job IDs are used as handles with many of the Accelerator Plus commands.