Cheaha Quick Start (Deprecated)

From UABgrid Documentation
(Difference between revisions)
Jump to: navigation, search
Line 38: Line 38:
 
<pre>
 
<pre>
 
$ qsub HelloCheaha.sh
 
$ qsub HelloCheaha.sh
 +
Your job 9043385 (HelloCheaha.sh) has been submitted
 
</pre>
 
</pre>
 +
 +
When the job script is submitted, SGE queues it up and assigns it a job number (e.g. 9043385 in above example). The job number is available inside job script using environment variable $JOB_ID. This variable can be used inside job script to create job related directory structure or file names.

Revision as of 13:49, 27 March 2013

Cheaha is a shared cluster computing environment for UAB researchers. A shared cluster environment uses a job scheduler to run tasks on the cluster to provide optimal resource sharing among users. Cheaha uses a job scheduling system call SGE to schedule and manage jobs. A user needs to tell SGE about resource requirements (e.g. CPU, memory) so that it can schedule jobs effectively. These resource requirements along with actual application code can be specified in a single file commonly referred as 'Job Script/File'. Following is a simple job script that prints job number and hostname.

#!/bin/bash
#
# Define the shell used by your compute job
#
#$ -S /bin/bash
#
# Tell the cluster to run in the current directory from where you submit the job
#
#$ -cwd
#
# Tell the scheduler only need 10 minutes
#
#$ -l h_rt=00:01:00,s_rt=0:00:55,vf=512M
#
# Set your email address and request notification when you job is complete or if it fails
#
#$ -M YOUR_EMAIL_ADDRESS
#$ -m eas
#
# Tell the scheduler to use the environment from your current shell
#
#$ -V

echo "The job $JOB_ID is running on $HOSTNAME"

Lines starting with '#$' have a special meaning in the SGE world. SGE specific configuration options are specified after the '#$' characters. SGE offers many configuration options but above mentioned options should be useful for basic job scripts. A job script is submitted to the cluster using SGE specific commands. There are many commands available, but following three commands are the most common:

  • qsub - to submit job
  • qdel - to delete job
  • qstat - to view job status

We can submit above job script using qsub command:

$ qsub HelloCheaha.sh
Your job 9043385 (HelloCheaha.sh) has been submitted

When the job script is submitted, SGE queues it up and assigns it a job number (e.g. 9043385 in above example). The job number is available inside job script using environment variable $JOB_ID. This variable can be used inside job script to create job related directory structure or file names.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox