User Tools

Site Tools


using-slurm

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
using-slurm [2019/02/01 12:32]
jean-baka [Using SLURM]
using-slurm [2020/10/08 13:06]
jean-baka [Batch jobs]
Line 12: Line 12:
 To see more information about the queue configuration, use ''sinfo -lNe''. To see more information about the queue configuration, use ''sinfo -lNe''.
  
-<code>[jbaka@compute03 ~]$ sinfo -lNe+<code>[jbaka@hpc ~]$ sinfo -lNe
 Fri Feb  1 15:27:44 2019 Fri Feb  1 15:27:44 2019
 NODELIST   NODES PARTITION       STATE CPUS    S:C:T MEMORY TMP_DISK WEIGHT AVAIL_FE REASON               NODELIST   NODES PARTITION       STATE CPUS    S:C:T MEMORY TMP_DISK WEIGHT AVAIL_FE REASON              
Line 28: Line 28:
 ===== Submitting jobs ===== ===== Submitting jobs =====
 ==== Interactive jobs ==== ==== Interactive jobs ====
-How to get an interactive session, ie when you want to interact with a program (like R, etc):+How to get an interactive session, i.e. when you want to interact with a program (like R, etc) for a limited amount of time, making the scheduler aware that you are requesting/using resources on the cluster:
 <code>[aorth@hpc: ~]$ interactive  <code>[aorth@hpc: ~]$ interactive 
 salloc: Granted job allocation 1080 salloc: Granted job allocation 1080
Line 41: Line 41:
  
 ==== Batch jobs ==== ==== Batch jobs ====
-Request 4 CPUs for a NCBI BLAST+ job in the ''batch'' partition.  Create a file //blast.sbatch//:+We are writing a SLURM script below. The parameters in its header request 4 CPUs for in the ''batch'' partition, and name our job "blastn"This name is only used internally by SLURM for reporting purposes. So let's go ahead and ceate a file //blast.sbatch//:
 <code>#!/usr/bin/env bash <code>#!/usr/bin/env bash
 #SBATCH -p batch #SBATCH -p batch
Line 53: Line 53:
 blastn -query ~/data/sequences/drosoph_14_sequences.seq -db nt -num_threads 4</code> blastn -query ~/data/sequences/drosoph_14_sequences.seq -db nt -num_threads 4</code>
  
-Submit the script with ''sbatch'':+We then submit the script with the ''sbatch'' command:
 <code>$ sbatch blast.sbatch  <code>$ sbatch blast.sbatch 
 Submitted batch job 1082</code> Submitted batch job 1082</code>
Line 64: Line 64:
 <code>#!/usr/bin/env bash <code>#!/usr/bin/env bash
 #SBATCH -p batch #SBATCH -p batch
-#SBATCH -n 4 
 #SBATCH -J blastn #SBATCH -J blastn
 +#SBATCH -n 4
  
 # load the blast module # load the blast module
Line 85: Line 85:
  
 ==== Check queue status ==== ==== Check queue status ====
-''squeue'' is the command to use to get more information about the different jobs that are running on the cluster, waiting in a queue for resources to become available, or halted for some reason:+''squeue'' is the command to use in order to get information about the different jobs that are running on the cluster, waiting in a queue for resources to become available, or halted for some reason:
 <code>[jbaka@compute03 ~]$ squeue <code>[jbaka@compute03 ~]$ squeue
              JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)              JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
using-slurm.txt · Last modified: 2020/10/08 13:06 by jean-baka