Difference between revisions of "Job submission"
From ScientificComputing
(Created page with "__NOTOC__ == Command line == bsub -n 4 -W 4:00 -R "rusage[mem=4096]" echo hello Command line advisor == Job script == #!/bin/bash #BSUB -n 24 # 24 c...") |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | == Basic job submission == | ||
+ | A basic BSUB job submission command consists of three parts: | ||
+ | {| style="color: black;" | ||
+ | |- | ||
+ | | style="width: 50px; background: #BFE5D9; text-align: center;"| bsub | ||
+ | | style="width: 100px; background: #B2D9EA;text-align: center; "| LSF options | ||
+ | | style="width: 50px; background: #FFBDAF; text-align: center"| job | ||
+ | |} | ||
− | + | # The BSUB executable command | |
+ | # LSF options requesting resources and defining job-related options | ||
+ | # A job to be submitted | ||
− | + | Here is an example: | |
+ | {| style="color: black;" | ||
+ | |- | ||
+ | | style="width: 50px; background: #BFE5D9; text-align: center;"| bsub | ||
+ | | style="width: 250px; background: #B2D9EA;text-align: center; "| -n 4 -W 4:00 -R "rusage[mem=4096]" | ||
+ | | style="width: 150px; background: #FFBDAF; text-align: center"| "python myscript.py" | ||
+ | |} | ||
+ | Let's start from the third part, a job can be either | ||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | | a single Linux command || cmd | ||
+ | |- | ||
+ | | a program with its path || /path/to/myprogram | ||
+ | |- | ||
+ | | a command or program with its arguments || cmd arg1 arg2 | ||
+ | |- | ||
+ | | multiple commands || "cmd1 ; cmd2" | ||
+ | |- | ||
+ | | piped command || "cmd1 | cmd2" | ||
+ | |} | ||
Command line advisor | Command line advisor | ||
Revision as of 15:43, 20 January 2021
Basic job submission
A basic BSUB job submission command consists of three parts:
bsub | LSF options | job |
- The BSUB executable command
- LSF options requesting resources and defining job-related options
- A job to be submitted
Here is an example:
bsub | -n 4 -W 4:00 -R "rusage[mem=4096]" | "python myscript.py" |
Let's start from the third part, a job can be either
a single Linux command | cmd |
a program with its path | /path/to/myprogram |
a command or program with its arguments | cmd arg1 arg2 |
multiple commands | "cmd1 ; cmd2" |
piped command | cmd2" |
Command line advisor
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