Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to update jobs to allow me to receive an email after the job finish running (slurm)

I have submitted several jobs on a computing cluster, but did not set the --mail-user. Can I update the specification now? Hope to receive emails after the jobs finish running. Thanks a lot!

like image 456
Yin-Jia Zhang Avatar asked Sep 20 '25 12:09

Yin-Jia Zhang


2 Answers

I am not sure Slurm allows that. What you can do is submit a dummy job dependent on the already-submitted job (with jobid <your-job-id>), like this:

sbatch --mail-user=<your-email-address> --mail-type=START --dependency=afterany:<your-job-id> --wrap "echo OK"

so that this job will start only when the one you wanted to modify ends, and it will send an email then.

like image 84
damienfrancois Avatar answered Sep 23 '25 04:09

damienfrancois


MailUser and MailType fields can be updated. The default MailUser is the submitting user, so it may only be necessary to update the MailType.

scontrol update jobid=<jobid> MailUser=<[email protected]>

scontrol update jobid=<jobid> MailType=<END,FAIL,...>

like image 36
skytaker Avatar answered Sep 23 '25 04:09

skytaker