Advanced usage of qsub
Option files
- instead of giving qsub options on the command line, users may store those in .sge_requests files in their $HOME or current working directories
- content of a sample .sge_requests file:
-cwd -S /usr/local/bin/perl -j y -l t=24:00:00
Array jobs
- SGE allows to schedule n identical jobs with one qsub call using the -t option:
qsub -t 1-10 array_job_script
- within the script use the variable SGE_TASK_ID to select different inputs and write to distinct output files (SGE_TASK_ID is 1...10 in the example above)
Conditional job execution
- jobs can be scheduled to wait for dependent jobs to successfully finish (rc=0)
- jobs can be submitted in hold state (needs to be released by user or operator)
- jobs can be told not to start before a given date
- start dependent jobs on the same host (using qalter -q $QUEUE ... within script)