Skip to content

Commit

Permalink
chore: Add SLURM_EMAIL check and notification to slurm_train.sl
Browse files Browse the repository at this point in the history
The `slurm_train.sl` script has been updated to include a check for the `SLURM_EMAIL` environment variable. If the variable is not set, a message is displayed prompting the user to set it before running the script. Additionally, email notification options have been added to the script using the `SBATCH --mail-user` and `SBATCH --mail-type` directives. This change improves the usability of the script by ensuring that the user is notified of job completion or failure via email.
  • Loading branch information
ll7 committed Sep 25, 2024
1 parent c79bb3f commit 13049cd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion SLURM/slurm_train.sl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,17 @@
#SBATCH --cpus-per-task=64
# Request GPU Ressources (model:number)
#SBATCH --gpus=a100:1


# Check if SLURM_EMAIL is set
if [ -z "$SLURM_EMAIL" ]; then
echo "SLURM_EMAIL is not set. Please set it before running the script."
else
# Add email notification
#SBATCH --mail-user=$SLURM_EMAIL
#SBATCH --mail-type=END,FAIL
echo "SLURM_EMAIL is set to $SLURM_EMAIL"
fi

# Clear all interactively loaded modules
module purge

Expand Down

0 comments on commit 13049cd

Please sign in to comment.