LSF Batch Jobs


IMPORTANT NOTE to AFS users:
To use LSF in personal AFS file space, the directory path to all data and executables should have AFS read permissions for system:lsfd, and in the case of data output, system:lsfd should have AFS write permission. See Access control lists for more information on AFS permissions.

Once LSF is tapped for the the first time, the directory /users/$USER/pub/lsf will be created with permissions for only the user invoking the tap command, and for system:lsfd. For the LSF batch facility, It is highly recommended that all personal data and executables reside and be run from within that directory, and all references to them should have full path-names starting with /users/$USER/pub/lsf.


Batch jobs may be submitted to various LSF queues at any time, and will be released to the cycle servers for execution whenever the related scheduling parameters are met. Four different queues have been established, each with a different set of scheduling parameters. The number and characteristics of batch queues may be adjusted as we gain more experience with the facility.

Use the bqueues command to list the available queues, e.g.

glue:-~ >bqueues
QUEUE_NAME     PRIO      STATUS      MAX  JL/U JL/P JL/H NJOBS  PEND  RUN  SUSP
night            1   Open:Inactive    30    5    5    -     0     0     0     0 
lowpri           1   Open:Inactive    30    5    5    -     0     0     0     0 
short            1    Open:Active     30    5    5    -     0     0     0     0 
long             1    Open:Active     30    5    5    -     0     0     0     0 
glue:-~ >

To get the spectifics on a particular queue, use bqueues -l <quename>, for example:

glue:-~ >bqueues -l night
QUEUE: night
  -- For jobs starting between 11:30pm and 6:30 am and on weekends  This is the default queue.

PARAMETERS/STATISTICS
PRIO NICE     STATUS       MAX JL/U JL/P JL/H NJOBS  PEND  RUN  SSUSP USUSP  RSV
   1   5  Open:Inact_Win    30    5    5   -     0     0     0     0     0    0

Interval for a host to accept two jobs is 0 seconds

SCHEDULING PARAMETERS
           r15s   r1m  r15m   ut      pg    io   ls    it    tmp    swp    mem
 loadSched   -     -    5.0    -       -     -    -     -     -      -      -  
 loadStop    -     -     -     -       -     -    -     -     -      -      -  

DISPATCH_WINDOW:  5:20:00-1:6:30 23:30-6:30

USERS:  all users
HOSTS:  all hosts used by the lsbatch system
glue:-~ >

For more information see bqueues

To submit jobs to a batch queue, use the bsub command. If a queue name is not specified, jobs will be submitted to the default queue. (See bqueues -l default) An e-mail message, with summary information, will be automatically sent to you when a job finishes.

For example:

glue:-/users/sackett/pub/lsf/src >bsub -q long make
Job <407> is submitted to queue <long>.
glue:-~/src >

The make command is submitted to the lsf queue long. All output of the command will be in the e-mail message you get when the command finishes. The results of the make will be created in the directory from which the command was executed.

The following will submit a job to the short queue, putting output in date.out in the current directory.

glue:-/users/sackett/pub/lsf >bsub -q short "date > date.out"
Job <406> is submitted to queue <short>.
glue:-~ >

For more info on submitting jobs, see bsub.

To obtain the status of a job that has been submitted to LSF, use the bjobs command.

glue:-~/src >bjobs
JOBID USER     STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME SUBMIT_TIME
409   sackett  PEND  night      glue            date       Feb 27 15:19
glue:-~/src >

For more detailed info about the jobs pending, use the -l switch; for example:

glue:-~/src >bjobs -l 409

Job Id <409>, User <sackett>, Status <PEND>, Queue <night>, Command
<date>
Thu Feb 27 15:19:35: Submitted from host <glue>, CWD
<$HOME/src>;

 PENDING REASONS:
The queue is inactivated by its windows;

           r15s   r1m  r15m   ut      pg    io   ls    it    tmp   swp    mem
 loadSched   -     -    5.0    -       -     -    -     -     -      -      -  
 loadStop    -     -     -     -       -     -    -     -     -      -      -  

glue:-~/src >

For more info about bjobs, see bjobs.