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

Bjørn-Helge Mevik b.h.mevik at usit.uio.no
Mon Aug 6 04:47:49 MDT 2018


I don't remember exactly when it comes to TaskEpilog, but the Epilog
does not put its output into the job's --output or --error file(s).
Hopefully, SchedMD will add an easy way for prologs/epilogs to write to
the job's file someday.

In the mean time, we use a dirty hack for it.  Basically, our Epilog
script uses information from "scontrol show job" to get the name of the
--output file, and redirects output directly to it.  (If the file
doesn't yet exist, the epilog must create it, with correct ownerships
and permissions, and depending on your setup (e.g., rootsquash), you
have to su to the job user first.  I told you it was a dirty hack. :)

-- 
Regards,
Bjørn-Helge Mevik, dr. scient,
Department for Research Computing, University of Oslo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20180806/9b1b2f4a/attachment.sig>


More information about the slurm-users mailing list