After submitting batch jobs to Slurm, you will want to check the status of your jobs to see if they are pending, running, or completed. The Slurm command squeue
will provide this information. Specifically, for your own jobs, you can use the command:
squeue -u $USER
You will likely use this command frequently, so to save time typing you can create an alias command with a shorter name, such as myq
. To set this up, edit your ~/.bashrc
file located in your home directory on Discovery using one of the available text editors, such as nano
:
nano ~/.bashrc
Then add a line like the following:
alias myq="squeue -u $USER"
To use it immediately, source the file with the command source ~/.bashrc
. Additionally, this alias will now be available to you automatically every time you log in to Discovery.
The output of the command should look something like the following:
user@discovery:~$ myq
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON)
170611 main jl.job user R 2:07 1 d05-09
For more information on the squeue
command, including other options to use and output formats, see the Slurm documentation here.