Difference between revisions of "Job submission"

From ScientificComputing
Jump to: navigation, search
Line 43: Line 43:
 
|}
 
|}
 
Command line advisor
 
Command line advisor
 +
 +
=== LSF options ===
 +
==== Requesting resources ====
 +
 +
==== Other LSF options ====
  
 
== Job script ==
 
== Job script ==

Revision as of 21:38, 20 January 2021

Basic job submission

A basic BSUB job submission command consists of three parts:

bsub LSF options job
  1. The BSUB executable command
  2. LSF options requesting resources and defining job-related options
  3. A job to be submitted

Here is an example:

bsub -n 4 -W 4:00 -R "rusage[mem=4096]" "python myscript.py"

Job

A job can be one of the following:

Job Command Examples of job submission command
a single Linux command cmd
a program with its path /path/to/myprogram bsub ./bin/hello
a command or program with its arguments cmd arg1 arg2 bsub echo hello
multiple commands "cmd1 ; cmd2" bsub "date; pwd; ls -l"
piped command "cmd1 | cmd2"
a command with I/O redirection, quote "cmd<in >out" bsub "du -sk/scratch > du.out"
a here document, passed via "<<" << EOF ... EOF
a shell script, passed via "<" < script bsub < hello.sh

Command line advisor

LSF options

Requesting resources

Other LSF options

Job script

#!/bin/bash
#BSUB -n 24                     # 24 cores
#BSUB -W 8:00                   # 8-hour run-time
#BSUB -R "rusage[mem=4000]"     # 4000 MB per core
cd /path/to/execution/folder
command arg1 arg2
bsub < job_script.bsub

Interactive session

bsub -n 4 -W 4:00 -R "rusage[mem=4096]" -Is bash