Gridware Tutorial
From SOMWiki
Contents |
Gridware Overview
This document provides a basic overview of the cluster setup at the School Of Management. For more resource on how to use the gridengine software, please visit the Grid Engine HOWTOs site.
Basic Usage of Grid Engine
qstat - Show job/queue status
Qstat allows you to check the status of your job on the grid. usage: qstat -U (your netid) 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
Example:
qstat -U djh29
This will show all submited jobs running for netid: djh29.
qhost - Show job/host status
Use the qhost command to see which machines are available for use within the grid. This will also show you what resources are available for use.
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.
qmake
Grid Engine contains a great utility for distributing your build process across the grid.
To use qmake, configure your Makefile as usual (or use ./configure for most gnu packages).
Next, type:
qmake -v PATH -cwd -pe make --
Example:
qmake -v PATH -cwd -pe make 2-20 --
This will start make across 2-20 Processors.
--Djh29 10:21, 13 Oct 2005 (EDT)

