|
| 1 | +name: SAI GPU Full Validation |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + mp_version: |
| 7 | + description: "cuSolverMp/cuBLASMp runtime: project (0.9.x) or system (NVHPC 0.7.x)" |
| 8 | + required: true |
| 9 | + default: project |
| 10 | + type: choice |
| 11 | + options: |
| 12 | + - project |
| 13 | + - system |
| 14 | + run_cusolvermp: |
| 15 | + description: "Run the O3 RT-TDDFT cuSolverMp smoke case" |
| 16 | + required: true |
| 17 | + default: true |
| 18 | + type: boolean |
| 19 | + |
| 20 | +permissions: |
| 21 | + contents: read |
| 22 | + |
| 23 | +concurrency: |
| 24 | + group: sai-gpu-full |
| 25 | + cancel-in-progress: false |
| 26 | + |
| 27 | +jobs: |
| 28 | + gpu-full: |
| 29 | + name: SAI GPU full suite (${{ inputs.mp_version }}) |
| 30 | + runs-on: [self-hosted, linux, x64, sai-slurm, v100, cusolvermp] |
| 31 | + timeout-minutes: 75 |
| 32 | + environment: sai-gpu |
| 33 | + steps: |
| 34 | + - name: Checkout |
| 35 | + uses: actions/checkout@v4 |
| 36 | + |
| 37 | + - name: Stage checkout on shared SAI filesystem |
| 38 | + run: | |
| 39 | + set -euo pipefail |
| 40 | + export CI_SRC=/home/sai-partner/saiuser01/agent/abacus_beta6_build/ci-checkouts/${GITHUB_RUN_ID} |
| 41 | + rm -rf "$CI_SRC" |
| 42 | + mkdir -p "$CI_SRC" |
| 43 | + rsync -a --delete --exclude .git/ "$GITHUB_WORKSPACE/" "$CI_SRC/" |
| 44 | + echo "CI_SRC=$CI_SRC" >> "$GITHUB_ENV" |
| 45 | +
|
| 46 | + - name: Submit Slurm GPU validation |
| 47 | + env: |
| 48 | + MP_VERSION: ${{ inputs.mp_version }} |
| 49 | + RUN_CUSOLVERMP: ${{ inputs.run_cusolvermp }} |
| 50 | + run: | |
| 51 | + set -euo pipefail |
| 52 | + script="$RUNNER_TEMP/sai-gpu-${GITHUB_RUN_ID}.sbatch" |
| 53 | + log="$CI_SRC/sai-gpu-${GITHUB_RUN_ID}.log" |
| 54 | + cat > "$script" <<'SBATCH' |
| 55 | + #!/usr/bin/env bash |
| 56 | + #SBATCH --job-name=abacus-sai-ci |
| 57 | + #SBATCH --partition=16V100 |
| 58 | + #SBATCH --qos=huge-gpu |
| 59 | + #SBATCH --nodes=1 |
| 60 | + #SBATCH --ntasks=4 |
| 61 | + #SBATCH --gpus-per-node=4 |
| 62 | + #SBATCH --time=01:00:00 |
| 63 | + #SBATCH --output=__CI_SRC__/sai-gpu-%j.out |
| 64 | +
|
| 65 | + set -euo pipefail |
| 66 | + : "${CI_SRC:?}" |
| 67 | + : "${ABACUS:?}" |
| 68 | + : "${MP_VERSION:?}" |
| 69 | + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-} |
| 70 | + export LD_PRELOAD=${LD_PRELOAD:-} |
| 71 | + source /etc/profile.d/lmod.sh |
| 72 | + module purge |
| 73 | + module load nvhpc/26.3-gnu-cuda12-tuned |
| 74 | + module load openmpi/5.0.10-nvhpc26.3-gnu-cuda12-auto |
| 75 | + module load fftw/3.3.10 libxc/7.0.0-auto saiblas/2603-gnu-auto |
| 76 | + module load elpa/2026.02.001-2603-gnu cuda/12.9.1 |
| 77 | + module unload nccl |
| 78 | + source /opt/sai_config/mps_mapping.d/16V100.bash |
| 79 | + export NCCL_IB_DISABLE=1 |
| 80 | + export OMP_NUM_THREADS=1 |
| 81 | + export OMPI_MCA_rmaps_base_mapping_policy="$MAP_OPT" |
| 82 | +
|
| 83 | + MPI=/opt/devtools/openmpi/openmpi-5.0.10-nvhpc263-gnu-cuda12-avx2 |
| 84 | + NV=/opt/devtools/nvidia/hpc_sdk/Linux_x86_64/26.3 |
| 85 | + CUDA=/opt/devtools/nvidia/cuda-12.9.1 |
| 86 | + MATH="$NV/math_libs/12.9" |
| 87 | + NCCL="$NV/comm_libs/12.9/nccl-2.29" |
| 88 | + if [[ "$MP_VERSION" == project ]]; then |
| 89 | + CUSOLVERMP=/home/sai-partner/saiuser01/agent/abacus_beta6_build/deps-mp-0.9/nvidia/cu12 |
| 90 | + CUBLASMP=/home/sai-partner/saiuser01/agent/abacus_beta6_build/deps-mp-0.9/nvidia/cublasmp/cu12 |
| 91 | + else |
| 92 | + CUSOLVERMP="$MATH/targets/x86_64-linux" |
| 93 | + CUBLASMP="$MATH/targets/x86_64-linux" |
| 94 | + fi |
| 95 | + export LD_LIBRARY_PATH="$MPI/lib:$CUDA/lib64:$CUSOLVERMP/lib:$CUBLASMP/lib:$MATH/lib64:$MATH/targets/x86_64-linux/lib:$NCCL/lib:/home/sai-partner/saiuser01/agent/abacus_beta6_build/install-full-sm70-avx2-mp09/lib:/home/sai-partner/saiuser01/agent/abacus_beta6_build/deps-full/lib:/home/sai-partner/saiuser01/agent/abacus_beta6_build/deps-full/lib64:/home/sai-partner/saiuser01/agent/abacus_beta6_build/deps-deepmd-pt-only/lib:/opt/devtools/elpa/elpa-2026.02.001-2603-gnu/nvidia/lib:/opt/devtools/libxc/libxc-7.0.0-avx2/lib:/opt/devtools/saiblas/2603-gnu-avx2/lib:/opt/devtools/fftw/fftw-3.3.10/lib:/opt/apps/conda_env/deepmd-kit-3.1.2/lib:/opt/apps/abacus/abacus-develop-3.9.0.26_nvhpc263gnu/toolchain/install/NEP_CPU-main/lib:${LD_LIBRARY_PATH:-}" |
| 96 | +
|
| 97 | + run_suite() { |
| 98 | + local suite="$1" |
| 99 | + (cd "$CI_SRC/tests/$suite" && bash ../integrate/Autotest.sh \ |
| 100 | + -a "$ABACUS" -n 4 -o 1 -f CASES_GPU.txt) |
| 101 | + } |
| 102 | +
|
| 103 | + for suite in 11_PW_GPU 12_NAO_Gamma_GPU 13_NAO_multik_GPU 15_rtTDDFT_GPU 16_SDFT_GPU; do |
| 104 | + run_suite "$suite" |
| 105 | + done |
| 106 | +
|
| 107 | + if [[ "${RUN_CUSOLVERMP:-false}" == true ]]; then |
| 108 | + tmp=$(mktemp -d /tmp/abacus-sai-cusolvermp.XXXXXX) |
| 109 | + trap 'rm -rf "$tmp"' EXIT |
| 110 | + cp -a "$CI_SRC/tests/15_rtTDDFT_GPU" "$tmp/" |
| 111 | + ln -s "$CI_SRC/tests/integrate" "$tmp/integrate" |
| 112 | + ln -s "$CI_SRC/tests/PP_ORB" "$tmp/PP_ORB" |
| 113 | + sed -i 's/^ks_solver[[:space:]]\+cusolver[[:space:]]*$/ks_solver cusolvermp/' \ |
| 114 | + "$tmp/15_rtTDDFT_GPU/11_NO_O3_TDDFT_GPU/INPUT" |
| 115 | + (cd "$tmp/15_rtTDDFT_GPU" && timeout --signal=TERM --kill-after=30s 10m \ |
| 116 | + bash ../integrate/Autotest.sh -a "$ABACUS" -n 4 -o 1 \ |
| 117 | + -f CASES_GPU.txt -r '^11_NO_O3_TDDFT_GPU$') |
| 118 | + fi |
| 119 | + echo "SAI_GPU_VALIDATION_PASSED mp_version=$MP_VERSION" |
| 120 | + SBATCH |
| 121 | + sed -i "s|__CI_SRC__|$CI_SRC|g" "$script" |
| 122 | + export CI_SRC ABACUS=/home/sai-partner/saiuser01/agent/abacus_beta6_build/install-full-sm70-avx2-mp09/bin/abacus MP_VERSION RUN_CUSOLVERMP |
| 123 | + sbatch --wait --parsable --export=ALL "$script" | tee "$log" |
| 124 | + cat "$CI_SRC"/sai-gpu-*.out >> "$log" |
| 125 | + grep -q 'SAI_GPU_VALIDATION_PASSED' "$log" |
| 126 | +
|
| 127 | + - name: Upload SAI logs |
| 128 | + if: always() |
| 129 | + uses: actions/upload-artifact@v4 |
| 130 | + with: |
| 131 | + name: sai-gpu-full-${{ github.run_id }} |
| 132 | + path: | |
| 133 | + ${{ env.CI_SRC }}/**/log.txt |
| 134 | + ${{ env.CI_SRC }}/**/result.out |
| 135 | + ${{ env.CI_SRC }}/sai-gpu-${{ github.run_id }}.log |
| 136 | + if-no-files-found: warn |
| 137 | + |
| 138 | + - name: Cleanup shared checkout |
| 139 | + if: always() |
| 140 | + run: rm -rf "$CI_SRC" |
0 commit comments