Difference between revisions of "Job management with LSF"
From ScientificComputing
(Created page with "<table style="width: 100%;"> <tr valign=top> <td style="width: 30%; background: white; text-align: center;"> 250px </td> <td style="width: 40%; bac...") |
|||
Line 29: | Line 29: | ||
</table> | </table> | ||
+ | |||
+ | == 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 |
Revision as of 08:13, 14 January 2021
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