Running Jobs From the Command Line

See Using the Command Line with Schrodinger Platform for a quick reference sheet.

For most purposes, you can start jobs from Maestro. You can also run or submit jobs from the command line on Linux hosts or from a Schrödinger shell on Windows hosts (see below). The Job Control facility recognizes a number of command-line options that can be used to control the behavior of the job. These options are summarized in Table 1.

Table 1. Command options.

Option

Description

-DISP policy

Set the project incorporation policy for this job: ignore, append, appendinplace, or replace. Requires -PROJ, and overrides SCHRODINGER_JOB_DISPOSITION. The policies are described in Incorporation of Job Output. Default: ignore.

-DRIVERHOST host

For distributed jobs, specify the host on which to run the driver (“master job”). Must specify a single host.

-HOST host

-HOST host:n

-HOST "host1:n1 host2 ..."

Run a job on the specified host or submit a job to the specified batch queue. host is the value of a name entry in the hosts file or the actual address of a host. To specify multiple hosts, supply a blank-separated list in quotes. To specify the (maximum) number of subjobs to run on a host, append a colon and the number of subjobs to the host name.

Default: run on the local host.

-NICE

Run the job at reduced priority. On Linux, the program is run with nice -19. On Windows, the program is run at “idle” priority. Overrides SCHRODINGER_NICE.

-NOLAUNCH

Perform all the steps necessary for launching the job, but stop short of actually launching it.

-NONICE

Do not run the job at reduced priority.
Overrides SCHRODINGER_NICE.

-NOSTARTUP

In the process of launching the job, stop short of executing the application startup script. Mainly useful for debugging.

-PROJ projectname

Assign the job to a Maestro project.
Overrides SCHRODINGER_PROJECT

-QARGS queue-args

Pass arguments to the queue manager. These arguments are appended to those specified by the qargs settings in the hosts file and the SCHRODINGER_QUEUE_ARGS environment variable.

-SAVE

Copy the archived contents of the job directory back to the submission directory after the job finishes, as jobid-jobdir.zip.

-SUBHOST host

-SUBHOST host:n

-SUBHOST "host1:n1 host2 ..."

For distributed jobs, specify the hosts on which the subjobs will run. The syntax is the same as for -HOST.

Default: run subjobs on the hosts specified by -HOST.

-TMPDIR directory

Specify the scratch directory for the job. The job directory is created as a subdirectory of the scratch directory. Overrides any user setting of SCHRODINGER_TMPDIR

-USER username

Specify the user name to be used for remote jobs. Must be used with ‑HOST. Default: use the same user name as on the submission host.

In addition to these options, the startup scripts for some programs support several other options. These options are summarized in Table 2. You should check which options are supported by entering the command

$SCHRODINGER/program -HELP  

Table 2. Options supported by some programs

Option

Description

-LOCAL

Write temporary files in the submission directory instead of the scratch directory. Input and output files are not copied.
Default: write temporary files in the scratch directory.

-NOJOBID

Run the job outside of Job Control. If you use this option, you are responsible for managing all the environment variables, file handling, and checking done by Job Control.

-NOLOCAL

Write temporary files in the scratch directory instead of the submission directory. Some programs and utilities write files locally when run on the local host; this option can be used to force the use of the scratch directory.

-WAIT

Wait for the job to finish before executing another command. In a terminal window, this means that the command prompt is not displayed until the job finishes. In a script, it means that the next command is not executed until the job finishes.
Default: return control to the shell immediately.

Command-line options always take precedence over the corresponding environment variable. Some of the options from Table 1 and Table 2 are described in more detail in the topics listed below. You can also obtain information for each program about the hosts you can use. These options are listed in Table 3.

Table 3. Information options

Option

Description

-DEBUG

-DDEBUG

Show the details of operation of the top-level script.

Show the verbose details of operation of the top-level script.

-ENTRY

Show the section of the schrodinger.hosts file that will be used for this job.

-HELP

Display command syntax for the application.

-HOSTS

List the hosts that are available for calculations.

On Windows, you can run Unix (Linux) commands by opening a Schrödinger Command Prompt window from the Start menu, then entering the sh command. The unxutils package provides many of the commands available in a Unix shell.