Launch Jobs with Non-default Options

The example program shown earlier can submit an Accelerator job with no customizations. In reality, users often need to specify non-default properties for the jobs they submit. Examples are resources, slot counts, auto-kill times, and numerous other options that can be seen on the nc run -h CLI command help information and in the documentation with the Altair Accelerator Administrator Guide.

To view available job launch options, find the VOV_JOB_DESC table of options in Define Jobclasses of the Altair Accelerator Administrator Guide. Here is an excerpt of that table:
Field in Array
Set the autokill flag (option -kill)
Set it to 0 to disable checking of canonicalization of current directory (option -D)
Environment of the job (option -e). Set this to "" or to DEFAULT to force the use of an environment snapshot.
Force the job to be rescheduled (option -F)
Group the job belongs to (options -g and -G)
List of input files (dependencies) (option -i)
priority, default
Default priority (NOT USED)

Although the above document has good descriptions of the fields/keys that can be provided to job launch requests, some of those fields are usable in Accelerator jobclass definitions but not in REST job requests. To see the precise list of fields/keys that are supported in REST requests, see the Swagger docs described in the REST Request Detailed Documentation section later in this tutorial.

You can modify the script previously shown (or the script in an upcoming section) with additional options specified as key-value pairs in the VOV_JOB_DESC Python dictionary. For example, here is the modification to that specifies an auto-kill time of 60 seconds. The Python dictionary “update” method function provides a convenient way to do that.

 VOV_JOB_DESC.update( {
    "autokill"    : 60,
  } )

  vrest.submitRequest("POST", resturl, jsonData=VOV_JOB_DESC)