qsh
Overview
qsh submits jobs and supports specifying resources, accounts, and execution environments. It is a compatible implementation of the SGE qsub command, adapted for FSCHED.
Options
Parameter List
| Option | Type | Purpose | Limits/Notes |
|---|---|---|---|
-A <account> | Requires value | Specify the account for the job. | Must provide a valid account name. |
-cwd | No value | Use the current directory as the job working directory. | Not enabled by default; must be specified explicitly. |
-hard | No value | Subsequent -l/-q options are hard constraints (must be satisfied). | Default may be hard; if neither -hard nor -soft is specified, behavior is system-dependent. |
-l <resources> | Requires value | Request resources, e.g. mem_free=2G,hostname=node01,num_proc=4. Supported: memory (mem_free), host (hostname), processors (num_proc). | Only some resources are available; multiple entries are comma-separated. |
-M <email> | Requires value | Set the email address for notifications. | Must be used with -m to define triggers. |
-m <options> | Requires value | Email trigger events (e.g., b start, e end). | Ensure mail is configured in the system. |
-N <name> | Requires value | Set the job name. | Defaults to a random name; provide a meaningful one. |
-now | No value | Run immediately (enabled by default). | Explicit use improves clarity. |
-p <priority> | Requires value | Set priority (range: -1023 ~ 1024). | Admins only; ignored for normal users. |
-pe <type> <slots> | Requires 2 values | Specify parallel type and slots (e.g., mpi 4 or smp 8). Valid types: mpi, smp. | Both type and slots are required. |
-q <queue> | Requires value | Bind the job to a specific queue (single queue only). | May be limited or unstable. |
-soft | No value | Subsequent -l/-q options are soft constraints (try to satisfy, can relax). | Default may be hard; mutually exclusive with -hard. |
-S <interpreter> | Requires value | Specify script interpreter path (e.g., /bin/bash). | Path must be valid and support shebang. |
-V | No value | Export all environment variables (enabled by default; no need to specify). | Disabling has no effect. |
-w <level> | Requires value | Set job verification level. | May be unavailable or unstable. |
-wd <dir> | Requires value | Specify the job working directory path. | Mutually exclusive with -cwd. |
Examples
-
Basic submission
qsh -N "my_analysis" analysis_script.sh -
Resource request and parallel job
# Request 8 cores, 16GB memory, and use MPI:
qsh -l "num_proc=8,mem_free=16G" -pe mpi 4 parallel_job.py -
Queue binding and immediate execution
# Bind to batch queue and run immediately:
qsh -q batch -now my_script.sh -
Email notifications
# Send an email to user@example.com on completion:
qsh -M user@example.com -m e report_generation.sh
Notes
Functional Limits
-p: only administrators can set priority; normal users are ignored.-l: onlymem_free(memory),hostname(host), andnum_proc(processors) are supported.-q: only a single queue name is supported; behavior may be unstable.
Additional Notes
- Environment export:
-Vis enabled by default; no need to add it. - Verification (
-w) and notification options: may be unstable or not implemented; do not rely on them.
Incompatible Features
| Option | Limitation |
|---|---|
-p | Normal users cannot set priority. |
-q | Only a single queue name is supported. |
-w | Not reliably implemented; avoid using. |
-l | Resource options are limited to mem_free, hostname, and num_proc. |