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 ...@@ -125,19 +125,33 @@ $ sbatch script.sh
File script content: File script content:
```shell ```shell
#!/usr/bin/bash #!/usr/bin/bash
#SBATCH -J MyJobName #SBATCH --job-name MyJobName
#SBATCH -A PROJECT-ID #SBATCH --account PROJECT-ID
#SBATCH -p qcpu #SBATCH --partition qcpu
#SBATCH -N 4 #SBATCH --nodes 4
#SBATCH --ntasks-per-node 36 #SBATCH --ntasks-per-node 36
#SBATCH -t 12:00:00 #SBATCH --time 12:00:00
ml OpenMPI/4.1.4-GCC-11.3.0 ml OpenMPI/4.1.4-GCC-11.3.0
srun hostname | sort | uniq -c 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 ## Job Environment Variables
...@@ -161,7 +175,7 @@ $ set | grep ^SLURM ...@@ -161,7 +175,7 @@ $ set | grep ^SLURM
| SLURM_JOB_PARTITION | name of the partition | qcpu | | SLURM_JOB_PARTITION | name of the partition | qcpu |
| SLURM_SUBMIT_DIR | submit directory | /scratch/project/open-xx-yy/work | | 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: Get job nodelist:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment