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,26 @@ if ! type -P nv-hostengine 1>/dev/null; then
3737 exit 0
3838fi
3939
40+ # ##################################################
41+ # Disable running health checks
42+ # ##################################################
43+ # The following change was implemented for https://b.corp.google.com/issues/421985463 and
44+ # https://b.corp.google.com/issues/421983794
45+ # Check if the environment variable '$SLURM_JOB_EXTRA' is set and contains the
46+ # substring 'healthchecks_prolog=off'
47+ if [[ -n " $SLURM_JOB_EXTRA " ]]; then
48+ log_step " Environment variable SLURM_JOB_EXTRA is set. Checking if it contains healthchecks_prolog=off."
49+ # Check if the value of the variable matches the string "healthchecks_prolog=off"
50+ if [[ " $SLURM_JOB_EXTRA " == * " healthchecks_prolog=off" * ]]; then
51+ log_step " Environment variable SLURM_JOB_EXTRA matches substring healthchecks_prolog=off. Skipping health checks."
52+ exit 0
53+ else
54+ log_step " Environment variable SLURM_JOB_EXTRA does NOT match substring healthchecks_prolog=off. Attempting to run health checks."
55+ fi
56+ else
57+ log_step " Environment variable SLURM_JOB_EXTRA is NOT set. Attempting to run health checks."
58+ fi
59+
4060# Exit if GPU isn't H/B 100/200
4161GPU_MODEL=$( nvidia-smi --query-gpu=name --format=csv,noheader)
4262if ! [[ " $GPU_MODEL " =~ [BH][1-2]00 ]]; then
You can’t perform that action at this time.
0 commit comments