Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ift:computing_cluster:slurm [2022/09/28 22:22]
kcach
ift:computing_cluster:slurm [2023/04/02 20:22] (current)
kcach
Line 1: Line 1:
 ====== Slurm ====== ====== Slurm ======
 SLURM is the workload manger and job scheduler for tron.ift.uni.wroc.pl SLURM is the workload manger and job scheduler for tron.ift.uni.wroc.pl
 +
 +===== Basic usage =====
 +|sinfo -alN|show nodes information|
 +|squeue|Show job queue|
 +|squeue -u <​username>​|List all current jobs for a user|
 +|squeue -u <​username>​ -t RUNNING|List all running jobs for a user|
 +|squeue -u <​username>​ -t PENDING|List all pending jobs for a user|
 +|scancel <​jobid>​|To cancel one job|
 +|scancel -u <​username>​|To cancel all the jobs for a user|
 +|scancel -t PENDING -u <​username>​|To cancel all the pending jobs for a user|
 +|scancel --name myJobName|To cancel one or more jobs by name|
  
 ===== Slurm batch ===== ===== Slurm batch =====
-The following parameters can be used as command line parameters with sbatch and srun or in jobscript, see also Job script example below+The following parameters can be used as command line parameters with *sbatchand *srunor in jobscript, see also Job script example below 
 **Basic settings** **Basic settings**
 |**Parameter**|**Function**| |**Parameter**|**Function**|
Line 42: Line 54:
  
 ==== Job script example ==== ==== Job script example ====
 +<​note>​Before usage, please adjust parameters</​note>​
 <code bash> <code bash>
 #!/bin/bash -l #!/bin/bash -l
 # Give your job a name, so you can recognize it in the queue overview # Give your job a name, so you can recognize it in the queue overview
 #SBATCH --job-name=example #SBATCH --job-name=example
 +
 +#SBATCH -o slurm-%j.output # %j - will return SLURM_JOB_ID
 +#SBATCH -e slurm-%j.error
  
 # Define, how many nodes you need. Here, we ask for 1 node. # Define, how many nodes you need. Here, we ask for 1 node.
Line 79: Line 95:
 # Finish the script # Finish the script
 exit 0 exit 0
 +</​code>​
 +
 +Put script to job queue with
 +<​code>​
 +sbatch ~/​sampleScript.sh
 </​code>​ </​code>​
  
ift/computing_cluster/slurm.1664396536.txt.gz · Last modified: 2022/09/28 22:22 by kcach
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0