In order to submit jobs to the physics cluster you need to first load the grid engine module.
You will first login to physlogin which allows Linux command line access to the system, which is necessary for the editing programs, compiling and running the code. Usage of physlogin nodes is shared amongst all who are logged in. These systems should not be used for running your code, other than for short test runs.
Access to the job/batch submission system is through the login nodes. When a submitted job executes, processors on the compute nodes are exclusively made available for the purposes of running the job.
In order to interact with the job/batch system, the user must first give some indication of the resources they require. At a minimum these include:
- how long does the job need to run for
- on how many processors to run the job
The default resource allocation for jobs are
|Default Resource Allocation|
|Time limit||-||24 hours and 7 days|
Armed with this information, the scheduler is able to dispatch the jobs at some point in the future when the resources become available. A fair-share policy is in operation to guide the scheduler towards allocating resources fairly between users.
Currently the facility is configured with a single general access queue, allowing submission to all available compute resources. Thus, there is no need to specify a queue name in job submissions.
The general command to submit a job with the qsub command is:
$ qsub [options] script_file_name [--script-args]
where script_file_name is a file containing commands to executed by the batch request.
For example submission scripts please look at these Job Script FIles.
The qstat command may be used to display information on the current status of Grid Engine jobs and queues.
|job-ID||A number used to uniquely identify your job within the LSF system. Use this number when you want to halt a job via the qdel command.|
|rior||The user's current job priority, based upon current and recent cluster utilisation|
|name||The job's name, as specified by the job submisison script's -N directive|
|user||The username of the job owner|
|state||Current job status: r (running), t (in transfer) and qw (queued and waiting)|
|submit/start at||For waiting jobs: the time the job was submitted. For running the jobs: the time the job started running|
|queue||For running jobs, the queue and compute node the job is running on|
|slots||The number of job slots the job is consuming (1 for serial jobs, greater than 1 for parallel jobs)|
|ja-task-ID||A special field for task arrays|
By default, users will only see their jobs in the qstat output. To see all jobs use a username wildcard
Important switches to qstat are:
Prints a list of all options.
Prints full display output of all queues
Print a 'cluster queue' summary - good for understanding what resources are free, across different queue types
Print 'traditional' output, i.e. print a line per queue used, rather than a line per job
Displays all jobs for a particular username.
|-j jobid||Displays details about a particular job|
|-f||Display in full mode|
To delete a job from the queue use the qdel <jobid> command, where jobid is a number referring to the specified job (available from qstat).
To force action for running jobs use the -f option
A user can delete all their jobs from the batch queues with the -u option
Information about old jobs
To display a list of recently completed jobs
To see information about completed jobs use the qacct command -o for a user, -d <n> for jobs over the last n days
Information about the system
The qhost command checks the status of the compute nodes
Why do I get an email saying I am not using the /scratch filestore, when I am?
If you receiving an email about using the wrong directory for job submission and you are sure you are submitting your job from the scratch directory, you probably have edited your file on a Windows PC and transferred it to /scratch.
Editing text files on Windows has the bad effect of inserting additional characters into the file. After you have transferred the file to the login server, use the following command to remove these characters:
We do not recommend that you edit your files on a Windows PC and transfer them to the cluster.
My jobs are not running, they just sit in the queue
There are two main causes for your jobs to sit in the queue and do not run (the are in the Pending state:
- Use the command :
qalter -w p job-id
This means you job script is OK. If you get the message
verification: no suitable queues
there is something wrong with your job script, see (2)
- The job script is wrong
- You may have missed out the runtime parameter "#$ -l h_rt=0:15:00"
- You have asked for a resource that is not available, the scheduler will wait for the resource to appear. for example specifying "#$ -l h_vmem=512G" when we have no nodes with 51G Gbytes of memory. Remember total memory requested is slots * memory.
- The resources you are requesting are currently in use
- You may be requesting for a node with 20 cores and 128GB of memory. This node may be being used by another job, the node may be ether fully utilised, or only one slot may be active.
- The queue suitable for the job is not currently enabled. For example a job requiring 48 hours to run will only start on the weekend queue, which is enabled on Friday evening.
- Use the command 'qstat -j <jobid>' to display why the job is currently running.
What resources did my job use
In order to tune your job submission parameters use the '-me' directive to inform you of the resources used:
Here we can see the job used 3 seconds of CPU time an 69 MB of memory.
More information can be found by using the "qacct" command: