Hello everyone,
I’m trying to understand how the Active Jobs app in Open OnDemand works with Slurm on our cluster.
From inspecting the code in the OodCore Slurm adapter (specifically here:
https://github.com/OSC/ood_core/blob/5e24c28d1a2d5801335fc2a00e51f31fe2e122e2/lib/ood_core/job/adapters/slurm.rb#L456-L474), it appears that Active Jobs internally calls the Slurm squeue command (with various formatting options) to retrieve the current list of jobs:
def get_jobs(id: "", owner: nil, attrs: nil)
fields = squeue_fields(attrs)
args = squeue_args(id: id, owner: owner, options: fields.values)
…
call("squeue", *args)
end
So it seems like Active Jobs simply parses the output of squeue and displays that as the active job list.
My question is:
-
Is it correct that the Active Jobs app always uses
squeueon Slurm to get jobs?- As far as I can tell from the code, it doesn’t query any job history or job accounting data.
-
Is there any way to have Active Jobs entries stay visible for a period of time after they finish?
-
For example, could it be configured so a job still shows in the Active Jobs UI for a few hours (or up to a day) after completion, so users can see recently finished jobs?
-
Or is that strictly outside the scope of the current Active Jobs implementation?
-
Any suggestions or examples of how other sites handle this would be much appreciated.
Thank you!