| `-n \<N>` | set number of processors (cores) to N(default=1) |
| `-W \<hh:mm>` | set maximum wall clock time to `<hh:mm>`|
| `-J \<name>` | assigns the specified name to the job |
| `-eo \<errfile>` | writes the standard error output of the job to the specified file (overwriting) |
| `-o \<outfile>` | appends the standard output of the job to the specified file |
| `-R span\[hosts=1\]` | use only one SMP node (automatically set by the batch system) |
| `-R span\[ptile=2\]` | run 2 tasks per node |
| `-x` | disable other jobs to share the node ( Atlas ). |
| `-m` | specify hosts to run on ( [see below](#HostList)) |
| `-M \<M>` | specify per-process (per-core) memory limit (in MB), the job's memory limit is derived from that number (N proc \* M MB); see examples and [Attn. #2](#AttentionNo2)below |
| `-P \<project> `| specifiy project |
| Bsub Option | Description |
|:-------------------|:------------|
| `-n <N>` | set number of processors (cores) to N(default=1) |
| `-W <hh:mm>` | set maximum wall clock time to `<hh:mm>` |
| `-J <name>` | assigns the specified name to the job |
| `-eo <errfile>` | writes the standard error output of the job to the specified file (overwriting) |
| `-o <outfile>` | appends the standard output of the job to the specified file |
| `-R span[hosts=1]` | use only one SMP node (automatically set by the batch system) |
| `-R span[ptile=2]` | run 2 tasks per node |
| `-x` | disable other jobs to share the node ( Atlas ). |
| `-m` | specify hosts to run on ( [see below](#host-list)) |
| `-M <M>` | specify per-process (per-core) memory limit (in MB), the job's memory limit is derived from that number (N proc * M MB); see examples below |
| `-P <project>` | specify project |
You can use the `%J` -macro to merge the job ID into names.
It might be more convenient to put the options directly in a job file
which you can submit using
```Bash
```console
bsub <my_jobfile>
```
...
...
@@ -44,7 +46,7 @@ The following example job file shows how you can make use of it:
#BSUB -n 4 # number of processors
#BSUB -M 500 # 500MB per core memory limit
#BSUB -o out.%J # output file
#BSUB -u name@tu-dresden.de # email address; works ONLY with @tu-dresden.de
#BSUB -u name@tu-dresden.de # email address; works ONLY with @tu-dresden.de
echo Starting Program
cd $HOME/work
...
...
@@ -52,21 +54,21 @@ a.out # e.g. an OpenMP program
echo Finished Program
```
**Understanding memory limits** The option -M to bsub defines how much
**Understanding memory limits** The option `-M` to bsub defines how much
memory may be consumed by a single process of the job. The job memory
limit is computed taking this value times the number of processes
requested (-n). Therefore, having -M 600 and -n 4 results in a job
requested (`-n`). Therefore, having `-M 600` and `-n 4` results in a job
memory limit of 2400 MB. If any one of your processes consumes more than
600 MB memory OR if all processes belonging to this job consume more
than 2400 MB of memory in sum, then the job will be killed by LSF.
-For serial programs, the given limit is the same for the process and
the whole job, e.g. 500 MB `bsub -W 1:00 -n 1 -M 500 myprog`
-For MPI-parallel programs, the job memory limit is N processes \*