Skip to content

Personalized Slurm Queries

CHPC has a set of three personalized slurm query scripts that users can use to get insight into the options they have for running batch jobs.  The three scripts are:

  • myallocation
  • mysinfo
  • mysqueue

Below there is a short description on the usage and the information provided by each of these. The environment provided by the CHPC supplied login scripts includes setting the PATH variable such that these scripts will be found when you issue the commands indicated below.

myallocation

The myallocation script can be run by the command

 myallocation

from any of the nodes of the cluster. Note that if you add a username after the myallocation, then the output will be for that user.

This script will produce a listing of all slurm account and partition pairs to which you have access for each of the clusters in the environment.  For the general environment this includes ash, lonepeak, kignspeak, and notchpeak; for the protected environment this will give the output fro redwood. This is the information you can use in the #SBATCH section of your batch script for the account and partition.

An example output is:

myallocation

 

mysinfo

The mysinfo script can be run by the command

 mysinfo

from any of the nodes of the cluster.  Note that if you add a username after the myallocation, then the output will be for that user.

In addition, there are  other options you can use:

-u pass a username as an argument (old, just pass the user as the command argument,  for example mysinfo someuser) 
-M pass a cluster as an argument for example mysinfo -M notchpeak
-c nocolor
-f display alternate sinfo format (adds S:C:T, Memory, and Tmp_disk.)
-A filter by a slurm account
-h show this helpful dialog 

This script will parse through the normal sinfo  command to provide only the information on the partitions to which you have access on the cluster which you are on, listed per partition. It also consolidates the shared and nonshared version of the partitions, as these partitions have the same node list.

An example output is:

mysinfo

mysqueue

The mysqueue script can be run by the command

 mysqueue

from any of the nodes of the cluster.

Note that if you add a username after the myallocation, then the output will be for that user.

In addition, there are  other options you can use:

-u pass a user as an argument (old, just pass the user as the command argument like so: mysqueue someUser) 
-M pass a cluster as an argument like so: mysqueue -M someCluster
-A filter by a slurm account like so: mysqueue -A someAccount
-c nocolor
-f Alternate formatting flag. Adds extra info.
-h show this helpful dialog 

This script will parse through the normal squeue  command to provide only the information on the jobs in the queues  to which you have access on the cluster you are on, listed per partition.

A portion of an example output is:

mysqueue

 

Last Updated: 8/21/24