Hi, 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.. Regards, Yair. On Wed, Apr 25, 2018 at 4:26 PM, sysadmin.caos <sysadmin.c...@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. >