Cheaha Quick Start (Deprecated): Difference between revisions

From Cheaha
Jump to navigation Jump to search
(added common commands)
No edit summary
Line 1: Line 1:


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'.  
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.
 
Following is a simple job script to uncompress a tar.gz compressed file.


<pre>
<pre>
Line 17: Line 15:
# Tell the scheduler only need 10 minutes
# Tell the scheduler only need 10 minutes
#
#
#$ -l h_rt=00:10:00,s_rt=0:09:50,vf=512M
#$ -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
# Set your email address and request notification when you job is complete or if it fails
Line 28: Line 26:
#$ -V
#$ -V


tar xzf sample.tar.gz
echo "The job $JOB_ID is running on $HOSTNAME"


</pre>
</pre>


SGE scheduler provides commands to manage jobs and view cluster status. There are many commands available, but following three commands are the most common:
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
* qsub - to submit job
* qdel - to delete job
* qdel - to delete job
* qstat - to view job status
* qstat - to view job status
 
We can submit above job script using qsub command:
<pre>
$ qsub HelloCheaha.sh
</pre>

Revision as of 19:40, 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