Hi Jeff,

Here are a few ideas:

Define a plugin-specific configuration file and put whatever you want there. Several plugins have there own plugins that you could copy code from (e.g. _parse_switches in src/plugins/topology/topology_tree.c). This is a bit more work, but will be completely flexible.

Look at the slurm_ctl_conf_t structure defined slurm/slurm.h. You can use some variables there (z_16, z_32 and/or z_char). You will need to modify the code in a few places to load the values.

Use an environment variable.

Moe

P.S. If you have a database set up, preempting jobs based upon QOS (Quality of Service) is very flexible and will almost certainly do what you want after setting up the database.


Quoting [email protected]:

I'm in the middle of creating a new/modified preempt plugin for 2.2.7*
and am having trouble figuring out how to add and get a simple numeric
config parameter.   The closest things I see are in
src/api/config_info.c, but they seem to apply only to variables that
have been mapped from file to the config struct.  What I'd like to do,
ideally, is to have an optional parameter, PreemptUserOver that takes
an integer value.  I'm sure there's a way to do this without requiring
Slurm changes outside of my custom preempt plugin, but can't puzzle it
out.

Thanks in advance for any advice,
Jeff Katcher

*This is actually quite straightforward, thank you.




Reply via email to