File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,24 @@ if ! type -P nv-hostengine 1>/dev/null; then
3737 exit 0
3838fi
3939
40+ # ##################################################
41+ # Disable running health checks
42+ # ##################################################
43+ # Check if the environment variable '$SLURM_JOB_EXTRA' is set and contains the
44+ # substring 'healthchecks_prolog=off'
45+ if [[ -n " $SLURM_JOB_EXTRA " ]]; then
46+ log_step " Environment variable SLURM_JOB_EXTRA is set. Checking if it contains healthchecks_prolog=off."
47+ # Check if the value of the variable matches the string "healthchecks_prolog=off"
48+ if [[ " $SLURM_JOB_EXTRA " == * " healthchecks_prolog=off" * ]]; then
49+ log_step " Environment variable SLURM_JOB_EXTRA matches substring healthchecks_prolog=off. Skipping health checks."
50+ exit 0
51+ else
52+ log_step " Environment variable SLURM_JOB_EXTRA does NOT match substring healthchecks_prolog=off. Attempting to run health checks."
53+ fi
54+ else
55+ log_step " Environment variable SLURM_JOB_EXTRA is NOT set. Attempting to run health checks."
56+ fi
57+
4058# Exit if GPU isn't H/B 100/200
4159GPU_MODEL=$( nvidia-smi --query-gpu=name --format=csv,noheader)
4260if ! [[ " $GPU_MODEL " =~ [BH][1-2]00 ]]; then
You can’t perform that action at this time.
0 commit comments