I'm a newbie to slurm and I'm trying to configure my bash script to, in the case that a job fails, email the corresponding standard output file when notifying me. I've managed to configure email notifications, but how can I make the body of the email contain standard output?
#!/bin/bash
#SBATCH -n 2 # two cores
#SBATCH --mem=3G
#SBATCH --time=48:00:00 # total run time limit (HH:MM:SS)
#SBATCH --mail-user=rylansch
#SBATCH --mail-type=FAIL
export PYTHONPATH=.
python -u model_train.py # -u flushes output buffer immediately
I don't see answers How to configure the content of slurm notification emails? or How to let SBATCH send stdout via email?