Dual-Node 16-GPU Training Pipeline Validation: A Step-by-Step 400-Step Checklist

    This article provides an order-of-execution checklist for validating a dual-node, 16-GPU training pipeline. After reading it, your team can use a single checklist to complete environment pre-checks, 400-step assertions, error troubleshooting, and acceptance records.

    1. Define the Pass Criteria First

    The 400-step validation only checks whether the pipeline can run stably end to end. It does not evaluate convergence or peak performance. The run is considered successful only when all six conditions below are met.

    1. All 16 accelerators are visible, and both nodes run consistent versions.
      • Collection: Run nvidia-smi -L | wc -l on each node. The sum of the two results should be 16.
      • Criteria: The total GPU count is 16, and the version matrix shows no discrepancies—or any discrepancies have a documented justification.
    2. Distributed initialization completes within 300 seconds.
      • Collection: Record the timestamps when the framework prints “initialization started” and “initialization complete,” then take the difference.
      • Criteria: The difference is no more than 300 seconds, and the log contains no timeout messages.
    3. Training runs continuously from step 1 to step 400.
      • Collection: Use pgrep -f train.py to confirm the process is alive, and run the step-continuity check in Section 3.
      • Criteria: No missing step numbers, the process exits normally, and the exit code is 0.
    4. Loss stays finite throughout the run.
      • Collection: grep -Eiw "nan|inf" train.log
      • Criteria: No output.
    5. A checkpoint is saved once and passes a resume verification.
      • Collection: Save a checkpoint at step 200, stop training at step 250, then resume from the step-200 checkpoint.
      • Criteria: The checkpoint files are complete, the first training log line after resumption is step 201, and training runs to step 400.
    6. Logs and monitoring metrics are queryable by step number.
      • Collection: In the monitoring system, filter loss and throughput for steps 1 through 400 by step number.
      • Criteria: Results cover all 400 steps with no full-range gaps.

    If any condition fails, diagnose the root cause first, then rerun the full 400 steps from step 1 after the fix.

    The numeric thresholds in this article—300 seconds, 70% bus bandwidth utilization, and 50 ms clock skew—are suggested starting points only. Calibrate them against historical baselines from an environment of the same specification, and record the calibration results in the acceptance documentation.

    2. Pre-checks: Align Versions and Verify the Environment

    For multi-node setups, version mismatches and inconsistent environment variables are the most common root causes. Before starting validation, fill in the following table for both nodes. Commands use an NVIDIA environment as an example; for Ascend environments, substitute the corresponding vendor tools.

    Item Node A Node B Verification command
    Kernel version uname -r
    Accelerator driver version nvidia-smi --query-gpu=driver_version --format=csv,noheader
    Runtime version python -c "import torch; print(torch.version.cuda)"
    Collective communication library version python -c "import torch; print(torch.cuda.nccl.version())"
    Training framework version python -c "import torch; print(torch.__version__)"
    Container image identifier docker inspect --format '{{.Id}}' <container>
    Model config file hash sha256sum config.yaml
    Business NIC name and IP ip -br addr show <NIC name>

    Verify from the bottom of the stack upward: driver, runtime, communication library, framework, image, and configuration. When lower layers are inconsistent, errors reported by upper layers are often misleading. If you find a discrepancy, align the lower-layer versions first, then rerun the pre-checks.

    Beyond versions, compare environment variables between the two nodes. Run the following command on each node and diff the outputs:

    1. env | grep -E '^(LD_LIBRARY_PATH|PYTHONPATH|NCCL_)' | sort > env_$(hostname).txt

    The values on both nodes should match. If they differ, document the reason.

    Initial checks for connectivity, GPU count, and bandwidth:

    1. # Run on Node A to confirm Node B is reachable
    2. ping -c 3 <Node B business IP>
    3. # Confirm local GPU count
    4. nvidia-smi -L
    5. # Initial bandwidth check; nccl-tests must be compiled in advance
    6. mpirun -np 16 -H <Node A business IP>:8,<Node B business IP>:8 ./build/all_reduce_perf -b 8 -e 1G -f 2 -g 1

    Bandwidth criteria: Take the busbw value at a message size of 1G and compare it against the theoretical bandwidth. Determine theoretical bandwidth based on the actual link type; for Ethernet, check the NIC speed with ethtool <NIC name> | grep Speed. The check passes if busbw reaches 70% of theoretical bandwidth.

    Clock skew collection: Run chronyc tracking on both nodes and record the System time value. Take the two readings as close to the same moment as possible, and use the difference between them as an approximation of inter-node skew. The check passes if skew is within 50 ms.

    Once pre-checks pass, set export NCCL_DEBUG=INFO and proceed to Section 3.

    3. Phased Assertions Over 400 Steps

    Split training into the five phases below. Run the corresponding assertion before ending each phase, and only proceed to the next phase after everything passes.

    Phase Steps Assertion On failure
    1 1–10 All 16 processes started, initialization logs complete, no NCCL WARN Go to Section 4 and troubleshoot the communication library first
    2 11–199 Steps are continuous, loss is finite, no long stalls in per-step time Check data and learning rate configs; rerun with a smaller batch size if needed
    3 200 Checkpoint saved successfully, files complete Check storage space and write permissions
    4 201–250 After stopping at step 250, resume from step 200; the first log line is step 201 Verify the checkpoint path and resume arguments
    5 251–400 Training completes, process exits normally, monitoring is queryable by step Analyze the hang; see Section 4

    The following commands cover Phase 2 and Phase 5 checks. Log formats vary, so adjust the regex patterns to match your framework’s actual output.

    1. # Step continuity: passes if there is no output
    2. grep -oE "step[=: ]+[0-9]+" train.log | grep -oE "[0-9]+$" | \
    3. awk 'NR>1 && $1!=prev+1 {print "missing: " prev " -> " $1} {prev=$1}'
    4. # Loss finiteness: passes if there is no output
    5. grep -Eiw "nan|inf" train.log | head -n 5
    6. # Hang detection: seconds since the log was last written; investigate if over 300 seconds
    7. echo $(( $(date +%s) - $(stat -c %Y train.log) ))

    Phase 3 checkpoint verification:

    1. ls -l <ckpt_dir>/step_200/
    2. sha256sum <ckpt_dir>/step_200/* > ckpt_200.sha256

    Phase 4 resume verification: Start from the step-200 checkpoint using the framework’s resume arguments, then confirm the first training log line reports step 201. If the data sampler was not restored with the checkpoint, the loss at step 201 will not match the original log. In that case, change the pass criterion to “training continues after resumption and loss remains finite,” and note the reason in your records. If you want to compare loss before and after resumption, have the team set the allowed relative error against a baseline; 1% is a suggested starting point.

    4. Troubleshooting Common Errors, in Order

    Troubleshoot from the bottom of the stack upward. When a lower layer reports errors, errors from upper layers cannot be trusted—fix the lower layer first.

    Layer 1: Driver

    • Symptom: nvidia-smi errors, or a GPU drops offline.
    • Command: dmesg -T | grep -iE "xid|nvrm" | tail -n 20
    • Diagnosis: Xid errors indicate a driver or hardware problem.
    • Fix: Stop training first and follow the vendor’s guidance. Do not continue a 400-step run while the driver is abnormal.

    Layer 2: Runtime

    • Symptom: CUDA driver version is insufficient, or a runtime version mismatch.
    • Command: Compare the CUDA version in the nvidia-smi header with torch.version.cuda.
    • Diagnosis: Errors occur when the runtime version exceeds what the driver supports.
    • Fix: Align the driver and runtime versions, or switch to an image matched to the driver.

    Layer 3: Communication library

    • Symptom: NCCL WARN in the logs, or an unhandled system error.
    • Command: Launch once with NCCL_DEBUG=INFO NCCL_DEBUG_SUBSYS=INIT,NET, then run grep "NCCL WARN" train.log.
    • Diagnosis: Check whether the NIC and transport selected in the logs match your design.
    • Fix: Set NCCL_SOCKET_IFNAME=<NIC name>, and confirm both nodes run the same communication library version.

    Layer 4: Framework

    • Symptom: Initialization timeout, or import errors.
    • Command: python -c "import torch.distributed as dist; print(dist.is_nccl_available())"
    • Diagnosis: A False output or import failure means the framework and communication library are not configured correctly.
    • Fix: Return to Section 2 and align the version matrix.

    Layer 5: Network

    • Symptom: Connection timeouts, or the master node’s port is unreachable.
    • Command: ss -lntp | grep <port> and nc -zv <Node B business IP> <port>
    • Diagnosis: If the port is unreachable, check the firewall, routes, and the master node address.
    • Fix: Open the port and make the master node address consistent across all configurations.

    Hangs

    • Symptom: Step numbers stop advancing, but processes remain alive.
    • Command: py-spy dump --pid <pid>, while watching GPU utilization in nvidia-smi.
    • Diagnosis: Multiple processes stuck on the same collective communication call usually mean one process has inconsistent data or configuration.
    • Fix: Identify the inconsistent rank, correct it, and rerun from step 1.

    5. Acceptance and Regression Records

    Check the six pass conditions one by one and record the results in the table below.

    # Pass condition Result Evidence location
    1 16 GPUs visible, versions consistent Pass / Fail
    2 Initialization within 300 seconds Pass / Fail
    3 Continuous run to step 400 Pass / Fail
    4 Loss finite throughout Pass / Fail
    5 Checkpoint saved and resumed Pass / Fail
    6 Monitoring queryable by step Pass / Fail

    Write a regression record for every validation run, using this format:

    1. Validation ID:
    2. Date and time window:
    3. Environment summary: (version matrix, image identifier, config hash)
    4. Command and output summary:
    5. Failed steps and log paths:
    6. Fixes applied:
    7. Rerun results:
    8. Conclusion: Pass / Fail

    When validation fails, save the logs, configuration snapshots, and monitoring time window first—do not delete the original logs. After fixing the issue, rerun the full 400 steps from step 1 and generate a new record for the rerun. Before sharing records externally, sanitize IP addresses, hostnames, and file paths.