Hi Paul,Thanks for the tip. Looking at the code it seems to compare each job’s priorityvariable through its job_ptr. I did some experiments where I log the priority variable in job_ptrfor successive jobs submitted from same user. However, I find them equal and so they don’t reflect the first-come-first-serve order of the jobs. Is there any other way through C APIs to gather the dynamic priority? If we can at least find the start and end of a scheduling iteration then it can help usas we can evaluate the relative order of scheduling ourselves, but this is more of a 2nd best solution or a workaround. -Bhaskar.
Sent from Yahoo Mail for iPad
On Tuesday, October 29, 2024, 7:43 PM, Paul Edmon via slurm-users slurm-users@lists.schedmd.com wrote:
If you are looking to use the C API for this then showq may be a good guide: https://github.com/fasrc/slurm_showq%C2%A0 The -o option orders the pending queue in priority order.
If you are looking at native slurm commands, sprio can print out the current priority breakdown of any job and filter by partition, then you can reorder based on that. squeue also can print out current priority. You might also look at the --priority option: https://slurm.schedmd.com/squeue.html#OPT_priority
-Paul Edmon-
On 10/29/24 9:33 AM, Bhaskar Chakraborty via slurm-users wrote:
Hello, Is there any DS in slurmctld which portrays the dynamic relative priority of pending jobs? We are trying to use slurm for developing a scheduling solution and 1 of the problems we face at the outset is how to determine the order of scheduling for pending jobs. One option is to find scheduling iteration window begin & close pointers & cache the job ids as seen in order & then make them the priority order at that point of time. ( This means for 500 pending jobs, say, if we can find which are the slurmctld calls which mark the beginning & end of a sched iteration then we can use the scheduling order of jobs as the relative priority order for that period of time, of course it may change depending on fairshare, user initiated priority modification etc. ) A concrete existing data structure showing the dynamic priority itself from slurmctld would be handy. Help appreciated. Thanks! Bhaskar.