Skip to content

Commit e36775e

Browse files
committed
Support disabling Single Node Health Checks using --task-prolog switch - b/421983794
1 parent 46a4932 commit e36775e

1 file changed

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

0 commit comments

Comments
 (0)