From SGE to SLURM conversion

Commands in SoGE and their respective equivalents in SLURM

Common user commands:
User Commands SGE SLURM
Interactive login qlogin srun --pty bash
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 username] squeue -u [username]
Job hold qhold [job_id] scontrol hold [job_id]
Job release qrls [job_id] scontrol release [job_id]
Queue list qconf -sql squeue
List nodes qhost sinfo -N OR scontrol show nodes
Cluster status qhost -q sinfo
GUI qmon sview
Common environment commands:
Environmental SGE SLURM
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 directives
Job Specification SGE SLURM
queue/partition #$ -q [queue] #SBATCH -p [partition]
count of nodes N/A #SBATCH -N [min[-max]]
CPU count #$ -pe [PE] [count] #SBATCH -n [count]
Wall clock limit #$ -l h_rt=[seconds] #SBATCH -t [min] OR -t [days-hh:mm:ss]
Standard out file #$ -o [file_name] #SBATCH -o [file_name]
Standard error file #$ -e [file_name] #SBATCH -e [file_name]
Combine STDOUT & STDERR files #$ -j yes (use -o without -e)
Copy environment -V --export=[ALL / NONE / variables]
Job name -N [name] --job-name=[name]
Restart job -r [yes/no] --requeue OR --no-requeue (NOTE:configurable default)
Set 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]
Tasks per node (Fixed allocation_rule in PE) --tasks-per-node=[count]/--cpus-per-task=[count]