Anchor | ||||
---|---|---|---|---|
|
Basic Job Submission
The Helium cluster uses the Sun Grid Engine (SGE) queue scheduler system. The feature of a queue scheduler system that users interact with the most is that of job submission. The manual pages for SGE are very good and should be referred to for details. For this particular topic the qsub manual page is the authoritative source.
...
This document provides a brief introduction to the most common options that might be used to submit jobs to the SGE system. It will focus on single processor jobs as that is the most basic case, but not necessarily the most common. Details on submission of parallel jobs is covered in Advanced Job Submission.
Anchor | ||||
---|---|---|---|---|
|
Job Script
While it is possible to submit programs directly to the SGE system (using the -b option flag) it is generally preferable to create a job script. The job script is just like any other script that you write in terms of specifying commands that you would like to run. The difference is that instead of a user running the script, it is submitted to SGE and SGE then runs the script. It does so after determining what nodes are available for it to run on. In its simplest form, the job script is simply a call to the program that performs the calculation.
...
#!/bin/sh # This is a very simple example job script /Users/jdoe/my_program |
Anchor | ||||
---|---|---|---|---|
|
Submitting the job
To run the above program on the cluster it must first be submitted to SGE. This is done with the qsub command.
...
If an option is specified on the command line it will supersede the specification in the job script file. |
Anchor | ||||
---|---|---|---|---|
|
Commonly Used Options
The following are some common options for the qsub command. For information on other options for more complex submissions, check the man pages with the command "man qsub".
qsub option | Description | ||
---|---|---|---|
-V | This imports your current environment to the job. This is set by default. As such, it does not have to be specified but is good to know about. | ||
-N [name] | The name of the job. Make sure this makes sense to you. | ||
-l h_rt=hr:min:sec | Maximum walltime for this job. You may want to specify this if you think your job may run out of control. | ||
-r [y,n] | Should this job be re-runnable (default n) | ||
-pe [type] [num] | Request [num] amount of [type] processors. | ||
-cwd | Determines whether the job will be executed from the current working directory. If not specified, the job will be run from the user's home directory. | ||
-S | Specify the shell to use when running the job script. | ||
-e [path] | Name of a file or directory for standard error. | ||
-o path | Name of a file or directory for standard output. | ||
-j [y,n] | Merge the standard error stream into the standard output stream. | ||
-pe [name] [n] | Parallel environment name and number of slots (cores). | ||
-M email address | Set the email address to receive email about jobs. This will most likely be your University of Iowa email address/ | ||
-m b|e|a|s|n,... | Specify when to send an email message 'b' Mail is sent at the beginning of the job. 'e' Mail is sent at the end of the job. 'a' Mail is sent when the job is aborted. 's' Mail is sent when the job is suspended. 'n' No mail is sent.
|
Anchor | ||||
---|---|---|---|---|
|
Memory request
If you need a certain amount of memory to be available for your computation to start, you can request that with a resource request.
...
Where n is the number of gigabytes or megabytes of memory you expect to use, respectively. |
Anchor | ||||
---|---|---|---|---|
|
Output Redirection
It is often necessary or desired to redirect the standard output and standard error streams to files. This can be accomplished with the typical shell redirection calls but SGE also provides a mechanism for capturing the stdout and stderror streams. By default, the standard error is written to a file named $JOB_NAME.e$JOB_ID and the standard output is written to a file called $JOB_NAME.o$JOB_ID. These can be set via the -e
and -o
flags to qsub, respectively.
...
Shell redirection, ie.
will over ride the ' |
Anchor | ||||
---|---|---|---|---|
|
Array Jobs
An array job is a group of identical tasks that are differentiated only by an index number.
...
render.sh would then be run 4 times, each with the default allocation of resources, with the input file corresponding to the basename + index number.