Baker D.J. <> writes:

> Could someone in the slurm community please advise me on outputting
> data (job stats) at the end of a job. I'm currently using the Epilog
> (slurm.epilog.clean) to print out a report at the end of each slurm
> job.

We currently use a setup where users are instructed to have "source
/cluster/bin/jobsetup" in the beginning of their jobscript.  That
"jobsetup" defines a trap function for the "EXIT" signal, which calls
sstat and sacct and prints out the result (and other stuff, like the
list of loaded modules).  That way, whenever the job script exits, the
stats will be output into the slurm-NNN.out file.

A bit cludgy that users need to source the jobsetup file, but it works.

> I am, by the way, grep'ing  the output of the scontrol (for submit
> time, etc) and the sacct (for memory usage, etc) commands to generate
> my report.  Does this approach make sense or are there better
> alternatives.

sacct can also give you the submit time, start time, end time and
elapsed time.

Bjørn-Helge Mevik, dr. scient,
Department for Research Computing, University of Oslo

Reply via email to