Difference between revisions of "Job management with LSF"

From ScientificComputing
Jump to: navigation, search
Line 9: Line 9:
 
<td style="width: 40%; background: white; text-align: left;>
 
<td style="width: 40%; background: white; text-align: left;>
  
<div style="width: 60%; background: #BFE5D9; height: 35px; border-radius: 10px; padding: 5px; margin:5px">
+
<div style="width: 60%; background: #B2D9EA; height: 35px; border-radius: 10px; padding: 5px; margin:5px">
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Job submission|1. Submit a job]]
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Job submission|1. Submit a job]]
 
</div>
 
</div>
  
<div style="width: 60%; background: #BFE5D9; height: 35px; border-radius: 10px; padding: 5px; margin:5px">
+
<div style="width: 60%; background:#B2D9EA; height: 35px; border-radius: 10px; padding: 5px; margin:5px">
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Parallel job submission|2. Submit a parallel job]]
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Parallel job submission|2. Submit a parallel job]]
 
</div>
 
</div>
  
<div style="width: 60%; background: #BFE5D9; height: 35px; border-radius: 10px; padding: 5px; margin:5px">
+
<div style="width: 60%; background: #B2D9EA; height: 35px; border-radius: 10px; padding: 5px; margin:5px">
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Job monitoring|3. Monitor a job]]
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Job monitoring|3. Monitor a job]]
 
</div>
 
</div>
  
<div style="width: 60%; background: #BFE5D9; height: 35px; border-radius: 10px; padding: 5px; margin:5px">
+
<div style="width: 60%; background: #B2D9EA; height: 35px; border-radius: 10px; padding: 5px; margin:5px">
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Job output | 4. Job output]]
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Job output | 4. Job output]]
 
</div>
 
</div>

Revision as of 09:50, 29 January 2021

250px

     1. Submit a job

     3. Monitor a job

      4. Job output

Quick examples

Submit a job with a command line

$ env2lmod
$ module load gcc/6.3.0 openmpi/4.0.2 python/3.8.5
$ bsub -n 4 -W 4:00 -R "rusage[mem=2048]" "python myscript.py"

Submit with a job script

Create a job script called job_script.bsub

#!/bin/bash
#BSUB -n 4                     # 4 cores
#BSUB -W 4:00                  # 8-hour run-time
#BSUB -R "rusage[mem=2048]"    # 2048 MB per core

source /cluster/apps/local/env2lmod.sh
module load gcc/6.3.0 openmpi/4.0.2 python/3.8.5
python myscript.py

Submit the script

$ bsub < job_script.bsub

Monitor submitted job

Check the status of your submitted job

$ bjobs