Ticket 10164 - Jobs are not listed in same order as -j parameter-list
Summary: Jobs are not listed in same order as -j parameter-list
Status: RESOLVED FIXED
Alias: None
Product: Slurm
Classification: Unclassified
Component: User Commands (show other tickets)
Version: 20.02.5
Hardware: Linux Linux
: 4 - Minor Issue
Assignee: Director of Support
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2020-11-05 14:12 MST by Carl Ponder
Modified: 2020-11-07 08:00 MST (History)
1 user (show)

See Also:
Site: NVIDIA (PSLA)
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed: No fix needed.
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments

Note You need to log in before you can comment on or make changes to this ticket.
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.