Ticket 10164

Summary: Jobs are not listed in same order as -j parameter-list
Product: Slurm Reporter: Carl Ponder <CPonder>
Component: User CommandsAssignee: Director of Support <support>
Status: RESOLVED FIXED QA Contact:
Severity: 4 - Minor Issue    
Priority: --- CC: cashley
Version: 20.02.5   
Hardware: Linux   
OS: Linux   
Site: NVIDIA (PSLA) Slinky Site: ---
Alineos Sites: --- Atos/Eviden Sites: ---
Confidential Site: --- Coreweave sites: ---
Cray Sites: --- DS9 clusters: ---
Google sites: --- HPCnow Sites: ---
HPE Sites: --- IBM Sites: ---
NOAA SIte: --- NoveTech Sites: ---
Nvidia HWinf-CS Sites: --- OCF Sites: ---
Recursion Pharma Sites: --- SFW Sites: ---
SNIC sites: --- Tzag Elita Sites: ---
Linux Distro: --- Machine Name:
CLE Version: Version Fixed: No fix needed.
Target Release: --- DevPrio: ---
Emory-Cloud Sites: ---

Description Carl Ponder 2020-11-05 14:12:19 MST
Running this command

      squeue -h -t PD -j 866957,866958,866961,866999 -O jobid:8 

lists the jobs in a different order than specified in the -j list:

      866999  
      866961  
      866957  
      866958
Comment 1 Carl Ponder 2020-11-05 14:13:26 MST
Note that adding the -S -J or -S +J qualifier re-arranges the order but doesn't always produce a sorted list.

This had been reported in a follow-up to the bug here:

      https://bugs.schedmd.com/show_bug.cgi?id=9569
Comment 2 Colby Ashley 2020-11-05 14:19:08 MST
I'll take a look into it, Thanks Carl!

~Colby
Comment 4 Colby Ashley 2020-11-06 15:36:50 MST
The -j option only specifies what jobs you want to see. Without -S it will sort by the default of squeue "P,t,-p" Partition,state,priority. This is working as intended.

With the -S J sorting that should be sorting by the Number of threads per core requested by the job. If you look under the -o section of the squeue man page it lists all of the options you can sort by. I assume you were wanting to sort by job id? Then -S i should give you what you are looking for.

squeue -j 1643,1633,1629,1639,1644,1625 -S i
JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON) 
1625     debug my.scrip    colby  R       0:48      2 colby[3-4] 
1629     debug my.scrip    colby PD       0:00      2 (Resources) 
1633     debug my.scrip    colby PD       0:00      2 (Priority) 
1639     debug my.scrip    colby PD       0:00      2 (Priority) 
1643     debug my.scrip    colby PD       0:00      2 (Priority) 
1644     debug my.scrip    colby PD       0:00      3 (Priority) 

~Colby
Comment 5 Carl Ponder 2020-11-07 08:00:39 MST
Ok got it.
But I do think they ought to be listed in the order specified.
I can always apply an explicit "-S P,t,-p" if that's what I want, but it takes more steps to un-sort the list to match a permutation of the JobID's.