Skip to content
Snippets Groups Projects
Commit 6b2372e9 authored by Roman Sliva's avatar Roman Sliva
Browse files

Update slurm-job-submission-and-execution.md

parent 6af006d3
No related branches found
No related tags found
No related merge requests found
Pipeline #33238 passed with warnings
......@@ -125,19 +125,33 @@ $ sbatch script.sh
File script content:
```shell
#!/usr/bin/bash
#SBATCH -J MyJobName
#SBATCH -A PROJECT-ID
#SBATCH -p qcpu
#SBATCH -N 4
#SBATCH --job-name MyJobName
#SBATCH --account PROJECT-ID
#SBATCH --partition qcpu
#SBATCH --nodes 4
#SBATCH --ntasks-per-node 36
#SBATCH -t 12:00:00
#SBATCH --time 12:00:00
ml OpenMPI/4.1.4-GCC-11.3.0
srun hostname | sort | uniq -c
```
Script will:
* use MyJobName as job name
* use project PROJECT-ID for job access and accounting
* use partition/queue qcpu
* use four nodes
* use 36 tasks per node
* set job time limit to 12 hours
Example output of the job:
```shell
36 cn17.barbora.it4i.cz
36 cn18.barbora.it4i.cz
36 cn19.barbora.it4i.cz
36 cn20.barbora.it4i.cz
```
## Job Environment Variables
......@@ -161,7 +175,7 @@ $ set | grep ^SLURM
| SLURM_JOB_PARTITION | name of the partition | qcpu |
| SLURM_SUBMIT_DIR | submit directory | /scratch/project/open-xx-yy/work |
See relevant [Slurm srun documentation][3] for details.
See relevant [Slurm documentation][3] for details.
Get job nodelist:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment