|
|
# SLURM commands
|
|
|
There is a lot of information available on the [SLURM website](https://slurm.schedmd.com/) or by using the ```man``` command.
|
|
|
The most common commands are:
|
|
|
* [srun](https://slurm.schedmd.com/srun.html)
|
|
|
* sbatch
|
|
|
* salloc
|
|
|
* squeue
|
|
|
* scontrol
|
|
|
* sview
|
|
|
* sdiag
|
|
|
|
|
|
## Interactive Session
|
|
|
To start an interactive job issue the command:
|
|
|
```
|
|
|
srun <resources> --pty /bin/bash
|
|
|
```
|
|
|
### resources
|
|
|
The resources are optional, if you need more then the default you should set them.
|
|
|
The default resources you get: 1 core, 2GB memory and 1 hour run time
|
|
|
* --time=
|
|
|
* Acceptable time formats include "minutes", "minutes:seconds", "hours:minutes:seconds", "days-hours", "days-hours:minutes" and "days-hours:minutes:seconds".
|
|
|
* --mem=
|
|
|
* Specify the real memory required per node (OGS uses mem/core). Different units can be specified using the suffix [K|M|G|T]
|
|
|
* --ntasks-per-node=
|
|
|
* Request number of cores per node
|
|
|
To submit a singe node job with 2 cores and 4GB memory and 120 minutes run time :
|
|
|
```
|
|
|
srun --ntasks=1 --cpus-per-task=2 --mem=4gb -t 90 --pty /bin/bash
|
|
|
or
|
|
|
srun --ntasks-per-node=2 --mem=4gb -t 90 --pty /bin/bash
|
|
|
```
|
|
|
## Submit a Job
|
|
|
To submit a job to the cluster issue the command :
|
|
|
```
|
|
|
sbatch <resources> <script Name>
|
|
|
```
|
|
|
The resources are the same as the interactive session, for more resources options please read the manual. |
|
|
\ No newline at end of file |