You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo"-j JOB_SUBMISSION_SCRIPT: Name of job submission script. Defaults to 'jobsubmissionscript.sub'"
44
48
echo"-t SCRIPT_TYPE: Type of script to execute. Supported values: bash, python. Defaults to 'python'"
@@ -51,6 +55,7 @@ usage() {
51
55
echo"-p PARTITION: Name of partition to run on. Defaults to 'ai'"
52
56
echo -e "-T MAX_TIME: Max job time. After executing for this much time, the job is killed.\n\tSpecify in dd-hh:mm:ss format. Defaults to 6:00:00 (6 hrs)"
53
57
echo -e "-s SIG_INTERVAL: SIGUSR1 is sent to the user script these many seconds before MAX_TIME is reached. Supported values: [0, 65535]. Defaults to 60.\n[${yellow}WARNING${nc}] Handling of OS signal is left to the user\n"
58
+
echo"-m: Email notification flag. If set, sends email notification on job start, end, fail, and upon reaching 90% of specified job time limit"
54
59
exit 1;
55
60
}
56
61
@@ -67,7 +72,7 @@ SCRIPT_FILE=helloWorld.py
67
72
SIG_INTERVAL=60
68
73
69
74
# read args
70
-
whilegetopts"hj:t:d:f:e:g:c:q:p:T:s:" opts;do
75
+
whilegetopts"hj:t:d:f:e:g:c:q:p:T:s:m" opts;do
71
76
case"${opts}"in
72
77
h) usage;;
73
78
j) JOB_SUBMISSION_SCRIPT=$OPTARG;;
@@ -81,6 +86,7 @@ while getopts "hj:t:d:f:e:g:c:q:p:T:s:" opts; do
81
86
p) PARTITION=$OPTARG;;
82
87
T) MAX_TIME=$OPTARG;;
83
88
s) SIG_INTERVAL=$OPTARG;;
89
+
m) MAIL=true;;
84
90
*) usage;;
85
91
esac
86
92
done
@@ -109,6 +115,14 @@ if [[ $N_GPUS -gt 0 ]] && [[ $((${CLUSTER}"_gpu_"${PARTITION})) -eq 0 ]]; then
0 commit comments