[slurm-users] Add prolog and epilog to sbatch's job

Hadrian Djohari hxd58 at case.edu
Mon Aug 6 07:17:59 MDT 2018


We put this exact function in epilogctld

On Mon, Jul 9, 2018 at 4:02 AM, Franck HOUSSEN <franck.houssen at eolen.com>
wrote:

> Hello,
>
> How to add an epilog to the job.log I got from running "sbatch -o job.log
> job.sh" ?
> I would like to run "scontrol show job $SLURM_JOB_ID" in the epilog (track
> job info).
>
> I tried to play with Epilog and TaskEpilog in slurm.conf: but seems not to
> work.
> Are these the correct ones ? Or did I misunderstood something along the
> way ?
>
> Franck
>
> Note: I got what I expected with srun and SrunEpilog. Would like to get
> the same with sbatch.
>
> >> more sbatch_epilog.sh
> #!/bin/bash
> #
> # Slurm epilog
>
> echo ""
> echo "==============SLURM===EPILOG=============="
> SLURM_JOB_INFO="$(/path/to/scontrol show job "$SLURM_JOB_ID")"
> echo "print scontrol show job $SLURM_JOB_ID"
> echo "print $SLURM_JOB_INFO"
> echo "=========================================="
>
>
>


-- 
Hadrian Djohari
Manager of Research Computing Services, [U]Tech
Case Western Reserve University
(W): 216-368-0395
(M): 216-798-7490
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20180806/017e747b/attachment.html>


More information about the slurm-users mailing list