I am an expert user of a cluster with a Sun Grid Engine Scheduler and need to use a cluster with a SLURM Scheduler. Can someone help me get started by translating the following simple examples from SGE to SLURM?
What Jobs are currently running? qstat
What Jobs am I currently running? qstat -u username
Launch an interactive session on one node with 16 cores: qrsh -pe omp 16
Launch a batch job one node with 16 cores: qsub -pe omp 16 script.sh
ANSWER:
Here are equivalents to the commands you listed.
What Jobs are currently running? squeue -a
What Jobs am I currently running? squeue -u <username>
Launch an interactive session on one node in the default queue, with 16 cores and exclusive use of the node: salloc -N 1 -n 16 -p defq --time=1:00:00 --exclusive
Launch a batch job: sbatch <scriptname>.slurm
Example batch file with directives that reserve one node in the default queue, with 16 cores and exclusive use of the node: #!/bin/bash #SBATCH -N 1 #SBATCH -n 16 #SBATCH --time=1:00:00 #SBATCH --exclusive <<shell commands that set up and run the job>>