Complex submissions

From IBERS Bioinformatics and HPC Wiki
Revision as of 11:59, 14 July 2014 by Mjv08 (talk | contribs) (Sun Grid Engine and Limits)
Jump to: navigation, search

In Submitting your job using SGE we looked at the following script;

   
#specify the shell type
#$ -S /bin/sh

#run in the current working directory
#$ -cwd

#specify which queue you wish to use
#$ -q amd.q

#run a program command to print hostname and uptime
hostname && uptime
    

As mentioned in Submitting your job using SGE, unless the HPC is quiet, you may find it difficult to get this job to run or that you need more resources. This section discusses how to request resources using limits and gives some examples of some scripts.

Sun Grid Engine and Limits

Sun Grid Engine does not know what you're attempting to do until you tell it. There are three pieces of information that the scheduler needs to best load balance your job in the queue. It needs to know how much memory you need, how many CPU cores (also known as slots) and how long the job is expected to run for. This information is passed to the scheduler from your grid engine script. If you fail to specify the number of cpu cores, memory or time required, it will use the scheduler defaults, which may not be the best for your task.


Requesting Memory


Requesting memory is achieved by using the h_vmem limit in your script, like so;

   
#$ -l h_vmem=40G
    

This will request 40G of RAM from the available nodes in the queue you've submitted it to. For information about the specification of the nodes available, please see Bert and Ernie - An Overview.

If you submit a job requesting more memory than is available on a single node in the queue then your job will fail to run. e.g. If you submit a job requiring 512GB RAM to the intel queue, it will fail to run as the maximum amount of memory a node has in the intel queue is 192GB.

If your job uses more memory than you've requested, your job will fail.


Requesting Time


Requesting memory is achieved by using the h_rt limit in your script (h_rt=hour:minute:seconds), like so;

   
#$ -l h_rt=24:00:00
    

This will tell the scheduler that the job will take 24 hours to run.


Requesting CPU Cores

This is probably the most complicated of the requests to make.

SGE Defaults