Skip to content

Commit 1f1bd92

Browse files
authored
Merge pull request GoogleCloudPlatform#4238 from nadig-google/develop
Support disabling Single Node Health Checks using --task-prolog switc…
2 parents c1badb7 + 1848901 commit 1f1bd92

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

  • community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/tools

community/modules/scheduler/schedmd-slurm-gcp-v6-controller/modules/slurm_files/scripts/tools/gpu-test

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,24 @@ if ! type -P nv-hostengine 1>/dev/null; then
3737
exit 0
3838
fi
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
4159
GPU_MODEL=$(nvidia-smi --query-gpu=name --format=csv,noheader)
4260
if ! [[ "$GPU_MODEL" =~ [BH][1-2]00 ]]; then

0 commit comments

Comments
 (0)