Thank you for the answer. I wasn't aware of that file. I'll look into it! Best, Jaekyeom
On Wed, Aug 5, 2020 at 3:27 AM Renfro, Michael <[email protected]> wrote: > Untested, but you should be able to use a job_submit.lua file to detect if > the job was started with srun or sbatch: > > - Check with (job_desc.script == nil or job_desc.script == '') > - Adjust job_desc.time_limit accordingly > > Here, I just gave people a shell function "hpcshell", which automatically > drops them in a time-limited partition. Easier for them, fewer idle > resources for everyone: > > hpcshell () > { > srun --partition=interactive $@ --pty $SHELL -i > } > ------------------------------ > *From:* slurm-users <[email protected]> on behalf of > Jaekyeom Kim <[email protected]> > *Sent:* Tuesday, August 4, 2020 5:35 AM > *To:* [email protected] <[email protected]> > *Subject:* [slurm-users] Correct way to give srun and sbatch different > MaxTime values? > > > *External Email Warning* > > *This email originated from outside the university. Please use caution > when opening attachments, clicking links, or responding to requests.* > ------------------------------ > Hi, > > I'd like to prevent my Slurm users from taking up resources with dummy > shell process jobs left unaware/intentionally. > To that end, I simply want to put a tougher maximum time limit for srun > only. > One possible way might be to wrap the srun binary. > But could someone tell me if there is any proper way to do it, please? > > Best, > Jaekyeom > >
