[slurm-users] Correct way to give srun and sbatch different MaxTime values?

Jaekyeom Kim btapiz at gmail.com
Fri Aug 7 06:23:52 UTC 2020


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 <Renfro at tntech.edu> 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 <slurm-users-bounces at lists.schedmd.com> on behalf of
> Jaekyeom Kim <btapiz at gmail.com>
> *Sent:* Tuesday, August 4, 2020 5:35 AM
> *To:* slurm-users at schedmd.com <slurm-users at schedmd.com>
> *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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20200807/e11a41ed/attachment.htm>


More information about the slurm-users mailing list