HPC High Performance Computing: 6. SGE to SLURM correspondence

SGE to SLURM

User Commands
SGE
SLURM
Job submission
qsub [script_file]
sbatch [script_file]
Job deletion
qdel [job_id]
scancel [job_id]
Job status (by job)
qstat -u \* [-j job_id]
squeue [job_id]
Job status (by user)
qstat [-u user_name]
squeue -u [user_name]
Job hold
qhold [job_id]
scontrol hold [job_id]
Job release
qrls [job_id]
scontrol release [job_id]
Queue list
qconf -sql
squeue
Node list  
qhost
sinfo -N OR scontrol show nodes
Cluster status
qhost -q
sinfo
GUI
qmon
sview
     
Environment
   
Job ID
$JOB_ID
$SLURM_JOBID
Submit Directory
$SGE_O_WORKDIR
$SLURM_SUBMIT_DIR
Submit Host
$SGE_O_HOST
$SLURM_SUBMIT_HOST
Node List
$PE_HOSTFILE
$SLURM_JOB_NODELIST
Job Array Index
$SGE_TASK_ID
$SLURM_ARRAY_TASK_ID
     
Job Specification
   
Script directive
#$
#SBATCH
Queue
-q [queue]
-p [queue]
Node Count
N/A
-N [min[-max]]
CPU Count
-pe [PE] [count]
-n [count]
Wall Clock Limit
-l h_rt=[seconds]
-t [min] OR -t [days-hh:mm:ss]
Standard Output FIle
-o [file_name]
-o [file_name]
Standard Error File
-e [file_name]
e [file_name]
Combine stdout/err
-j yes
(use -o without -e)
Copy Environment
-V
--export=[ALL | NONE | variables]
Event Notification
-m abe
--mail-type=[events]
Email Address
-M [address]
--mail-user=[address]
Job Name
-N [name]
--job-name=[name]
Job Restart
-r [yes|no]
--requeue OR --no-requeue (NOTE: configurable default)
Working Directory
-wd [directory]
--workdir=[dir_name]
Resource Sharing
-l exclusive
--exclusive OR--shared
Memory Size
-l mem_free=[memory][K|M|G]
--mem=[mem][M|G|T] OR --mem-per-cpu= [mem][M|G|T
Account to charge
-A [account]
--account=[account]
Tasks Per Node
(Fixed allocation_rule in PE)
--tasks-per-node=[count]
CPUs Per Task
 
--cpus-per-task=[count]
Job Dependency
-hold_jid [job_id | job_name]
--depend=[state:job_id]
Job Project
-P [name]
--wckey=[name]
Job host preference
-q [queue]@[node] OR -q [queue]@@[hostgroup]
--nodelist=[nodes] AND/OR --exclude= [nodes]
Quality Of Service
 
--qos=[name]
Job Arrays
-t [array_spec]
--array=[array_spec] (Slurm version 2.6+)
Generic Resources
-l [resource]=[value]
--gres=[resource_spec]
Licenses
-l [license]=[count]
--licenses=[license_spec]
Begin Time
a [YYMMDDhhmm]
--licenses=[license_spec]