[slurm-users] Filter slurm e-mail notification

Aaron Jackson aaron at aaronsplace.co.uk
Wed Nov 27 20:27:27 UTC 2019

> Hi,
> I guess you could use a lua script to filter out flags you don't
> want. I haven't tried it with mail flags, but I'm using a script like
> the one referenced to enforce accounts/time limits, etc.
> https://funinit.wordpress.com/2018/06/07/how-to-use-job_submit_lua-with-slurm/
> Cheers,
> Florian

I decided to have a play with this, out of curiosity.

The mail types are defined in slurm.h. The ninth bit is set to send mail
for array tasks. Lua (before 5.3) has nasty support for bitwise
operations. Since there are no mail types defined higher than this (at
this time) it should be possible just to check if it mail_type is
greater than 255, and if so, subtract 256.

However, the Lua Slurm API mail_type property seems to be
immutable. Adding support should be relatively simple, unless I'm
missing something. May just be simpler to write a plugin in C.


More information about the slurm-users mailing list