Skip to content

E-mail notifications

The SLURM batch system allows you to receive an e-mail notifications for various stages of your jobs execution life cycle. This feature is mostly helpful for notifying the user upon job completion and for displaying the resource utilization information.

Notification specific job parameters

Option Description
--mail-user=email_address E-mail address where the notication should be send.
--mail-type=end Type of notification to be send. In this example, upon completion.

Please read man sbatch for more options.

E-mail notification example

In this example we are are running a two node job, which should utilize all 128 cores. The notification relevant keywords are displayed in bold.

demovic@login02 e-mail > cat run.sh
demovic@login02 e-mail > cat run.sh 
#!/bin/bash
#SBATCH -J "e-mail test"
#SBATCH --partition=short
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=64
#SBATCH -o %J.out 
#SBATCH -e %J.err
#SBATCH --mail-user=lukas.demovic@savba.sk
#SBATCH --mail-type=end
#SBATCH --exclusive

module purge
module load intel/2022a
ulimit -s unlimited
export OMP_NUM_THREADS=1

mpirun /home/demovic/benchmark/hpl-2.3/bin/xhpl

demovic@login02 e-mail > sbatch run.sh 
sbatch: slurm_job_submit: Job's time limit was set to partition limit of 1440 minutes.
Submitted batch job 41034

When the job was completed, the following mail was send to the specified address:

Sender: no-reply@devana.nscc.sk
Subject: devana Slurm Job_id=41034 Name=e-mail test Ended, Run time 00:28:37, COMPLETED, ExitCode 0

Job ID: 41034
Cluster: devana
User/Group: demovic/demovic
State: COMPLETED (exit code 0)
Nodes: 2
Cores per node: 64
CPU Utilized: 2-12:15:39
CPU Efficiency: 98.71% of 2-13:02:56 core-walltime
Job Wall-clock time: 00:28:37
Memory Utilized: 512.92 GB (estimated maximum)
Memory Efficiency: 102.58% of 500.00 GB (3.91 GB/core)
Created by: Filip Holka