Difference between revisions of "Slurm"
From Systems Group
Systemswiki (Talk | contribs) (Created page with "Slurm is an open-source job scheduler for Linux and Unix-like kernels. == SRUN == srun is used to submit jobs for execution in real time. Also used to create job steps. '''s...") |
Systemswiki (Talk | contribs) (→SRUN) |
||
Line 6: | Line 6: | ||
'''srun example''' | '''srun example''' | ||
− | srun --pty /bin/bash | + | srun --pty /bin/bash # shell on compute job |
+ | |||
+ | srun -p slurm-general-01 --account=slurmgeneral --pty /bin/bash # shell on compute job / specifying which partition and account (applicable if user is assigned multiple accounts) | ||
== SBATCH == | == SBATCH == |
Revision as of 17:59, 11 July 2022
Slurm is an open-source job scheduler for Linux and Unix-like kernels.
SRUN
srun is used to submit jobs for execution in real time. Also used to create job steps.
srun example
srun --pty /bin/bash # shell on compute job
srun -p slurm-general-01 --account=slurmgeneral --pty /bin/bash # shell on compute job / specifying which partition and account (applicable if user is assigned multiple accounts)
SBATCH
Sbatch is a command used to submit batch scripts to Slurm.
batch script example
#!/bin/bash -l # login shell (required for lmod) #SBATCH --job-name=testprogram # job name #SBATCH --ntasks=1 # request 1 CPU #SBATCH --mem=1gb # request 1gb of memory #SBATCH --output=testprogram.lob # output and error log date sleep 10 module use /mnt/lmod_modules/Linux/ module load miniconda3 someProgram.py date