Batch Jobs On Lxplus


Login to Lxplus

On lxplus you are limmited both in disk space and CPU time. In order to run medium to large size jobs from lxplus, you will need to submit a batch job using bsub. Your job will be submitted to a machine compatible with the machine you are submitting from, so for CMSSW_1_3_X and lower

and for CMSSW_1_4_X and higher

Batch Job Script

Copy the following script into a file (say lxplusbatchscript.csh) and edit the file to run on your .cfg file. Also edit the last line to write into your CASTOR area (you have limited space on lxplus. If you don't use CASTOR you may lose your output!).

# Lxplus Batch Job Script
set CMSSW_PROJECT_SRC="cmssw_projects/13X/cmssw131hlt6/src"
set CFG_FILE="cfgs/steps2_3_4_5.cfg"
set OUTPUT_FILE="Analyzer_Output.root"
set TOP="$PWD"

eval `scramv1 runtime -csh`
cd $TOP
rfcp Analyzer_Output.root /castor/$OUTPUT_FILE

Set the permissions on the script file with

chmod 744 lxplusbatchscript.csh

Job Submission

Now you can submit the job by using bsub, passing it the above script. An example command is

bsub -R "pool>30000" -q 1nw -J job1 < lxplusbatchscript.csh

There are a few arguments specified in this example

  • -R "pool>30000" means you want a minimum free space of 30G to run your job.
  • -q 1nw means you are submitting to the 1-week que. Other available queues are:
    • 8nm (8 minutes)
    • 1nh (1 hour)
    • 8nh
    • 1nd (1day)
    • 2nd
    • 1nw (1 week)
    • 2nw
  • -J job1 sets job1 as your job name.
  • < lxplusbatchscript.csh gives your script to the job.
See man bsub and the links for more info.

After entering the above command you will get the output

Job <557650> is submitted to queue <1nw>.
The unique job number 557650 is automatically generated.

Checking Job Satus

You can check the status of your job with the command bjobs. (To specify the job use bjobs -J job1 or bjobs 557650)

which gives the output
557650  ssimon  PEND  1nw        lxplus096               job1       Aug  9 16:16
You can see that this job is pending. To see more information about pending jobs use bjobs -l, and see man bjobs for more info.

Killing a Job

If you make a mistake and need to kill a job (i.e. submit to wrong queue), you can do so with

bkill -J job1  
Using bkill without specifying the job will kill all of your jobs.


Topic revision: r3 - 2008/04/04 - 18:32:38 - SeanSimon
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback