UK National HPC Service

Computer Services for Academic Research Logo
Home | Helpdesk | Machine Status | Search | Apply
 

7. Batch Jobs

An introduction to bsub

LSF is the batch system utilised by the CSAR machines. The command used to submit jobs to LSF is bsub. In order to submit to fermat and green you should issue commands on wren. Jobs to be run on newton can be submitted by logging into newton and running commands.

You must give LSF options to inform it about the needs of your job. The basic options are described below.

  • Number of cpus: requested using the -n flag.
  • Wall clock time: requested with the -W flag. This means that your job will automatically finish after that amount of time is used up if it has not already finished. Measured and specified in minutes.
  • Total CPU time: specified with the -c option and is similar to -W in that it is a way of restricting the amount of time your job runs for. However -c is the total amount of CPU time used. Measured and specified in minutes.
  • Where to run the job: to specify where your job runs can be achieved with the -q and -m options. The -m option specifies which machine to run on such as green. The -q option tells it which queue to run on for that particular machine.
  • Job name: to give your job a name which can be useful to identify which of your jobs are running when using some of the LSF monitoring commands use the -J option.
  • Output: the stderr and stdout can be controlled with the -e and -o options. The -e options specifies where the stderr should be put and the -o option specifies where the stdout should be put. If neither option is specified the output should be emailed to you, if only the -o option is specified the stdout and stderr are merged into the specified file. It is also useful to put "%J" at the end of the filename as this will create a unique file for each job output.

Submission script example

The following script can be submitted which will run a.out on 8 processors asking for one hour of green and writing the output to a file called output and calling the job my_job. It should be submitted using bsub < scriptname

#BSUB -n 8
#BSUB -W 1:00
#BSUB -m green
#BSUB -J my_job
#BSUB -q normal
#BSUB -o output

mpirun -np 8 ./a.out

Command line example

bsub -n 8 -W 1:00 -m green -J my_job -q normal -o output scriptname

Only the mpirun -np 8 ./a.out then needs to be in the script.

Further Information

Note that the IRIX machines and the Altix do differ slightly. Please consult the following webpages for more detailed information:

Job Submission (inc machine specific pages): http://www.csar.cfs.ac.uk/user_information/job_info/

LSF: http://www.csar.cfs.ac.uk/user_information/lsf/

Previous: Software and Modules Next: Porting and Parallelising Codes

Page maintained by This page last updated: Tuesday, 17-Aug-2004 15:32:34 BST