Skip to content

LSF Scheduler Jobs and Queues

Adam Kimbler edited this page Aug 7, 2017 · 1 revision

Submitting Jobs

bsub -q PQ_madlab < script_to_submit.sh


If you are submitting jobs in a bash 'for' loop you'll need to modify things like the following:

for subj in 1 2 3 4 5; do bsub -q PQ_madlab -e err_file -o out_file "./script_to_submit.py $subj"; done

Another way to submit jobs through a bash 'for' loop uses the following echo syntax:

for subj in 1 2 3 4 5; do
cmd="python some_python_script.py -s $subj -o /output/directory -w /working/directory"
echo `echo ${cmd}` | bsub -q PQ_madlab

Interactive jobs are sometimes useful when you need to use a GUI but don't want monopolize resource on the visualization node:

bsub -q PQ_madlab -I "NAME OF COMMAND YOU WANT TO RUN"

for example:

bsub -q PQ_madlab -I DTIPrep

This will launch the DTIPrep GUI on a compute node that will then enable you to run the processes through the GUI but not on a visualization node.

Tracking your jobs

To track your jobs (i.e., follow how they are doing and look if there are any errors or crashes occurring use the following two flags).

bsub -q PQ_madlab -e /directory/to/name/of/error_file -o /directory/to/name/of/out_file < name_of_script.py

example:

bsub -q PQ_madlab -e /scratch/madlab/crash/err_file -o /scratch/madlab/crash/out_file < name_of_script.py

Checking Jobs Submitted By Specific Account:

bjobs -u <username>

Example:

bjobs -u amora197

Checking All Queues Currently Running:

bqueues