This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
guides:slurm:basics [08.10.2019 15:26] Juha Kekäläinen |
guides:slurm:basics [16.10.2020 10:47] Juha Kekäläinen |
||
---|---|---|---|
Line 11: | Line 11: | ||
{{ : | {{ : | ||
+ | |||
### Example | ### Example | ||
+ | |||
+ | In this example we will run simple [MATLAB](https:// | ||
+ | |||
+ | |||
#### Example MATLAB code (matlab.m) | #### Example MATLAB code (matlab.m) | ||
``` | ``` | ||
Line 20: | Line 25: | ||
``` | ``` | ||
#### Example script (submit.sbatch) | #### Example script (submit.sbatch) | ||
+ | |||
+ | Here we have specified the [batch script](https:// | ||
+ | |||
``` | ``` | ||
#!/bin/bash | #!/bin/bash | ||
+ | #SBATCH --ntasks 1 # Number of task | ||
+ | #SBATCH --time 5 # Runtime in minutes. | ||
+ | #SBATCH --mem=2000 # | ||
+ | #SBATCH --partition serial # Partition to submit | ||
module load matlab/ | module load matlab/ | ||
Line 35: | Line 46: | ||
sbatch submit.sbatch | sbatch submit.sbatch | ||
``` | ``` | ||
- | **[sbatch](https:// | + | **[sbatch](https:// |
- | ``` | ||
- | less slurm-jobid.out | ||
- | ``` | ||
### Slurm job queue | ### Slurm job queue | ||
- | User can monitor the progress | + | User can monitor the state of the job with the **[squeue](https:// |
``` | ``` | ||
squeue -j < | squeue -j < | ||
+ | ``` | ||
+ | |||
+ | ### Output of the job is available in local output file. | ||
+ | |||
+ | ``` | ||
+ | less slurm-< | ||
``` | ``` | ||