From 2a3de568ac399e5d9462264d82dbe8d558b09430 Mon Sep 17 00:00:00 2001
From: Bo-Chun Louis Chen <louistw@uab.edu>
Date: Fri, 7 Apr 2023 15:43:08 -0500
Subject: [PATCH] Send email notify when slurm job BEGIN

---
 submit.yml.erb | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/submit.yml.erb b/submit.yml.erb
index 8183e62..dd2114b 100644
--- a/submit.yml.erb
+++ b/submit.yml.erb
@@ -1,3 +1,9 @@
+<%-
+  email = ENV['USER']
+  if !email.include? '@'
+    email = email + '@uab.edu'
+  end
+-%>
 ---
 batch_connect:
   template: "vnc"
@@ -14,3 +20,7 @@ script:
 <%- if bc_partition.include? "pascalnodes" -%>
     - "--gres=gpu:1"
 <%- end -%>
+<%- if bc_email_on_started == "1" -%>
+    - "--mail-type=BEGIN"
+    - "--mail-user=<%= email %>"
+<%- end -%>
-- 
GitLab