welcome: please sign in
location: Diff for "Cluster/SGE/howto/basic_usage.html"
Differences between revisions 1 and 2
Revision 1 as of 2012-02-20 15:48:27
Size: 2513
Editor: marco
Comment:
Revision 2 as of 2012-02-20 15:52:16
Size: 2541
Editor: marco
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Basic Usage of Grid Engine =Status of Grid Engine Resources=
Line 3: Line 3:


qstat - Show job/queue status
'''qstat''' - Show job/queue status
Line 11: Line 9:
qhost - Show job/host status
'''
qhost''' - Show job/host status
Line 18: Line 17:
Using Grid Engine === Using Grid Engine ====
Line 20: Line 19:
The main submit commands are qsub, qrsh and qtcsh. See the man pages for submit(1) and qtcsh(1) for more details. The main submit commands are qsub, qrsh and qtcsh.
See the man pages for submit(1) and qtcsh(1) for more details.

=Status of Grid Engine Resources=

qstat - Show job/queue status

no arguments Show currently running/pending jobs -f Show full listing of all queues -j Shows detailed information on pending/running job -U Shows current jobs by user

qhost - Show job/host status

no arguments Show a table of all execution hosts and information about their configuration -l attr=val Show only certain hosts -j Shows detailed information on pending/running job -q Shows detailed information on queues at each host

=== Using Grid Engine ====

The main submit commands are qsub, qrsh and qtcsh. See the man pages for submit(1) and qtcsh(1) for more details.

qsub - submit scripts

Started with no arguments it accepts input from STDIN (^D to send submit input) -cwd Run the job from the current working directory (Default: Home directory) -v Pass the variable VAR (-V passes all variables) -o Redirect standard output (Default: Home directory) -e Redirect standard error (Default: Home directory)

Example:

qsub -cwd -v SOME_VAR -o /dev/null -e /dev/null myjob.sh

In general, qsub is used for traditional batch submit, that is where I/O is directed to a file. Note that qsub only accepts shell scripts, not executable files.

See the qsub(1) man page for more details.

qrsh

Qrsh acts similar to the rsh command, except that a host name is not given. Instead, a shell script or an executable file is run, potentially on any node in the cluster. I/O is directed back to the submitter's terminal window. By default, if the job cannot be run immediately, qrsh will not queue the job. Using the '-now no' flag to qrsh will allow jobs to queue. Note that I/O can be redirected with the shell redirect operators. For example, to run the uname -a command:

qrsh uname -a

The uname of some machine the scheduler selects in the cluster will then be displayed on the submitting terminal. To redirect the output,

qrsh uname -a > /tmp/myfile

The output from uname will be written to /tmp/myfile on the submitting host. To allow the command to queue:

qrsh -now no uname -a

If a suitable host is not immediately available the command will block until a suitable host is available. At that time, the command output will be displayed on the submitting terminal.

See the qrsh(1) man page for more details.

qtcsh

Grid Engine contains a modified tcsh, qtcsh which will automatically submit jobs listed in a task file to the cluster. See the qtcsh(1) and qtask(5) man pages for more details.

eciencia: Cluster/SGE/howto/basic_usage.html (last edited 2012-02-20 16:03:34 by marco)