[slurm-users] Limit job_submit.lua script for only srun

Yair Yarom irush at cs.huji.ac.il
Thu Apr 26 00:54:18 MDT 2018


We are also limiting "interactive" jobs through a plugin. What I've
found is that in the job_descriptor the following holds:
for salloc: argc = 0, script = NULL
for srun: argc > 0, script = NULL
for sbatch: argc = 0, script != NULL

You can look at our plugin in
https://github.com/irush-cs/slurm-plugins for reference (though it's
in c).

I'll just add that users can overcome these limitation in various ways..


On Wed, Apr 25, 2018 at 4:26 PM, sysadmin.caos <sysadmin.caos at uab.cat> wrote:
> Hello,
> I have written my own job_submit.lua script for limiting "srun" executions
> to one processor, one task and one node. If I test it with "srun", all works
> fine. However, if now I try to run a sbatch job with "-N 12" or "-n 2",
> job_submit.lua is also checked and, then, my job is rejected because I'm
> requesting more than one task and more than one node. So, is it possible
> that lua script only active when user runs a "srun" and not a "sbatch"? I
> have been reading "typedef struct job_descriptor" at slurm/slurm.h file but
> there is no record that keeps command run by the user in the command line.
> Thanks.

More information about the slurm-users mailing list