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

Franck HOUSSEN franck.houssen at eolen.com
Mon Jul 9 02:02:43 MDT 2018


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 "=========================================="


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20180709/94d32bb8/attachment.html>


More information about the slurm-users mailing list