Example SLURM Scripts - JoshLoecker/MAPT GitHub Wiki
More defined SLURM scripts
This section is to be a base for example SLURM scripts. The basis for a SLURM script is as follows
#SBATCH
defines parameters to be used with SLURM. For additional options, see this guide
#!/bin/bash
#SBATCH --job-name="JOB_NAME"
#SBATCH -p PARTITION
#SBATCH -N NODES
#SBATCH -n THREADS_PER_NODE
#SBATCH -t hh:mm:ss
#SBATCH -o "OUTPUT_FILE"
#SBATCH -e "ERROR_FILE"
#SBATCH --open-mode "append"
#SBATCH --mail-user=USER_EMAIL
#SBATCH --mail-type=START,END,FAIL
# Your code here
SLURM Commands
The following commands can be used on SciNet to view various kinds of information (Online Source)
Command | Description |
---|---|
sacct | Accounting data for all jobs and job steps in the Slurm job accounting log or Slurm database |
sacctmgr | Used to view and modify Slurm account information. |
salloc | Obtain a Slurm job allocation (a set of nodes), execute a command, and then release the allocation when the command is finished. |
sattach | Attach to a Slurm job step. |
sbatch | Submit a batch script to Slurm. |
sbcast | Transmit a file to the nodes allocated to a Slurm job. |
scancel | Used to signal jobs or job steps that are under the control of Slurm. |
scontrol | Used view and modify Slurm configuration and state. |
sdiag | Scheduling diagnostic tool. |
sinfo | View information about Slurm nodes and partitions. |
slurm | Slurm system overview. |
sprio | view the factors that comprise a job's scheduling priority |
sh5util | merge utility for acct_gather_profile plugin. |
squeue | view information about jobs located in the Slurm scheduling queue. |
sreport | Generate reports from the slurm accounting data. |
srun | Run parallel jobs |
sshare | Tool for listing the shares of associations to a cluster. |
sstat | Display various status information of a running job/step. |
strigger | Used set, get or clear Slurm trigger information. |
sview | graphical user interface to view and modif. Slurm state. |