Ticket 14738 - per-user or per-group default partition
Summary: per-user or per-group default partition
Status: RESOLVED INFOGIVEN
Alias: None
Product: Slurm
Classification: Unclassified
Component: Scheduling (show other tickets)
Version: 21.08.6
Hardware: Linux Linux
: --- 4 - Minor Issue
Assignee: Marcin Stolarek
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2022-08-11 21:15 MDT by Jeff Haferman
Modified: 2022-08-18 01:22 MDT (History)
1 user (show)

See Also:
Site: NPS HPC
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:
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 Jeff Haferman 2022-08-11 21:15:55 MDT
Hi -
Does slurm support a default partition on a per-user and/or per-group basis?

For example, let's say I have
partition A
partition B

and user{1-3}, user{4-6}
And I want user{1-3} to have partition A as default, and user{4-6} to have partition B as default.

Furthermore, user{1-3} are in group A, and user{4-6} are in group B.

Is possible to do what I want? I see a similar question raised in
https://bugs.schedmd.com/show_bug.cgi?id=14081
and it was NOT possible at that time, but that was in 2014.
Comment 1 Marcin Stolarek 2022-08-12 02:32:59 MDT
The most natural way to set a per user defaults is to use cli_filter plugin[1]. In the case you described you may want to use a user_defaults plugin, which allows setting of a default parameters in ~/.slurm/defaults file, like
>cat ~/.slurm/defaults 
>partition=UserDefaultPartition

or if you want to make it administrator defined it may be more convenient to use cli_filter/lua that allows setting of options based on some logic in lua script. You can find an example script in our repository etc/cli_filter.lua.example[2]

>Is possible to do what I want? I see a similar question raised in
>https://bugs.schedmd.com/show_bug.cgi?id=14081
>and it was NOT possible at that time, but that was in 2014.
I'm not sure if the link is to the bug you thought about, since it's quite recent.

cheers,
Marcin

[1]https://slurm.schedmd.com/slurm.conf.html#OPT_CliFilterPlugins
[2]https://github.com/SchedMD/slurm/blob/master/etc/job_submit.lua.example
Comment 2 Jeff Haferman 2022-08-12 11:55:44 MDT
Thank you Marcin.

Creating a ~/.slurm/defaults on a per-user basis seems like an easy way to accomplish what I want. 

I need to study cli_filter/lua, that looks more complicated and may lead to problems if I make mistakes in the script.

Yes, sorry, https://bugs.schedmd.com/show_bug.cgi?id=14081 was a ticket that I recently opened, and it referenced https://bugs.schedmd.com/show_bug.cgi?id=1032#c1 which is the case from 2014.
Comment 3 Marcin Stolarek 2022-08-16 21:52:12 MDT
Jeff,

>I need to study cli_filter/lua, that looks more complicated and may lead to problems if I make mistakes in the script.
Yes - it's more complicated, but it's the most flexible version to set defaults and take actions prior and post job submission activities on the client side.

>and it referenced https://bugs.schedmd.com/show_bug.cgi?id=1032#c1 which is the case from 2014.
That's true, the only way to set something similar at the time was to preset environment variables. CliFilter was added in 19.05.

Is there anything else I can help you with?

cheers,
Marcin
Comment 4 Jeff Haferman 2022-08-17 11:09:36 MDT
Hi -
Thank you.
Nothing further needed, you may close this ticket.