Add debug use cases #102
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| jobs: | |
| # Build jobs - create libraries once for each SST version and share as artifacts | |
| build: | |
| runs-on: ${{ matrix.architecture.runner }} | |
| strategy: | |
| matrix: &test-matrix | |
| sst_version: | |
| - { tag: "15.1.2", image: "ghcr.io/hpc-ai-adv-dev/sst-core:15.1.2" } | |
| - { tag: "master", image: "ghcr.io/hpc-ai-adv-dev/sst-core:master-latest" } | |
| component: ["gameoflife", "pingpong", "phold"] | |
| architecture: | |
| - { name: "x86_64", runner: "ubuntu-latest" } | |
| - { name: "arm64", runner: "ubuntu-24.04-arm" } | |
| container: | |
| image: ${{ matrix.sst_version.image }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build ${{ matrix.component }} library | |
| run: | | |
| cd ${{ matrix.component }} | |
| make | |
| - name: Upload ${{ matrix.component }} library | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.component }}-lib-${{ matrix.sst_version.tag }}-${{ matrix.architecture.name }} | |
| path: ${{ matrix.component }}/lib*.so | |
| retention-days: 1 | |
| # Test jobs - use pre-built libraries | |
| test: | |
| runs-on: ${{ matrix.architecture.runner }} | |
| needs: build | |
| strategy: | |
| matrix: *test-matrix | |
| container: | |
| image: ${{ matrix.sst_version.image }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download ${{ matrix.component }} library | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ matrix.component }}-lib-${{ matrix.sst_version.tag }}-${{ matrix.architecture.name }} | |
| path: ${{ matrix.component }}/ | |
| - name: Run ${{ matrix.component }} test | |
| run: | | |
| cd ${{ matrix.component }} | |
| case "${{ matrix.component }}" in | |
| "gameoflife") | |
| echo "=== Registering gameoflife component ===" | |
| sst-register gol gol_LIBDIR=$(pwd) | |
| echo "=== Running gameoflife simulation ===" | |
| sst gol.py -- --verbose --seed 42 | tee gol_sim.out | |
| echo "=== Comparing output with expected results ===" | |
| diff ../.github/workflows/gol.good ./gol_sim.out | |
| ;; | |
| "pingpong") | |
| echo "=== Registering pingpong component ===" | |
| sst-register pingpong pingpong_LIBDIR=$(pwd) | |
| echo "=== Running pingpong simulation ===" | |
| sst pingpong.py -- --corners --verbose | tee pingpong_sim.out | |
| echo "=== Comparing output with expected results ===" | |
| if [ "${{ matrix.sst_version.tag }}" = "15.1.2" ]; then | |
| diff ../.github/workflows/pingpong_interleaved.good ./pingpong_sim.out | |
| else | |
| diff ../.github/workflows/pingpong_ordered.good ./pingpong_sim.out | |
| fi | |
| ;; | |
| "phold") | |
| echo "=== Registering phold component ===" | |
| sst-register phold phold_LIBDIR=$(pwd) | |
| echo "=== Running phold simulation ===" | |
| sst phold_dist.py -- --verbose 1 2>&1 | tee phold_sim.out | |
| echo "=== Comparing output with expected results ===" | |
| diff ../.github/workflows/phold.good ./phold_sim.out | |
| ;; | |
| esac | |
| # Checkpoint testing jobs - run with checkpoint enabled | |
| checkpoint: | |
| runs-on: ${{ matrix.architecture.runner }} | |
| needs: build | |
| strategy: | |
| matrix: *test-matrix | |
| container: | |
| image: ${{ matrix.sst_version.image }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download ${{ matrix.component }} library | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ matrix.component }}-lib-${{ matrix.sst_version.tag }}-${{ matrix.architecture.name }} | |
| path: ${{ matrix.component }}/ | |
| - name: Run ${{ matrix.component }} with checkpoint enabled | |
| run: | | |
| cd ${{ matrix.component }} | |
| case "${{ matrix.component }}" in | |
| "gameoflife") | |
| echo "=== Registering gameoflife component ===" | |
| sst-register gol gol_LIBDIR=$(pwd) | |
| echo "=== Running gameoflife simulation with checkpointing ===" | |
| sst --checkpoint-sim-period=1.5s gol.py -- --verbose --seed 42 2>&1 | grep -v "Real CPU time" | tee gol_checkpoint.out | |
| echo "=== Comparing checkpoint output with expected results ===" | |
| diff ../.github/workflows/gol_checkpoint.good ./gol_checkpoint.out | |
| ;; | |
| "pingpong") | |
| echo "=== Registering pingpong component ===" | |
| sst-register pingpong pingpong_LIBDIR=$(pwd) | |
| echo "=== Running pingpong simulation with checkpointing ===" | |
| sst --checkpoint-sim-period=50ps pingpong.py -- --corners --verbose 2>&1 | grep -v "Real CPU time" | tee pingpong_checkpoint.out | |
| echo "=== Comparing checkpoint output with expected results ===" | |
| if [ "${{ matrix.sst_version.tag }}" = "15.1.2" ]; then | |
| diff ../.github/workflows/pingpong_checkpoint_interleaved.good ./pingpong_checkpoint.out | |
| else | |
| diff ../.github/workflows/pingpong_checkpoint_ordered.good ./pingpong_checkpoint.out | |
| fi | |
| ;; | |
| "phold") | |
| echo "=== Registering phold component ===" | |
| sst-register phold phold_LIBDIR=$(pwd) | |
| echo "=== Running phold simulation with checkpointing ===" | |
| sst --checkpoint-sim-period=250ns phold_dist.py -- --verbose 1 2>&1 | grep -v "Real CPU time" | tee phold_checkpoint.out | |
| echo "=== Comparing checkpoint output with expected results ===" | |
| diff ../.github/workflows/phold_checkpoint.good ./phold_checkpoint.out | |
| ;; | |
| esac | |
| echo "=== Verifying checkpoint files were created ===" | |
| ls -la checkpoint_*/ || echo "No checkpoint directory found" | |
| - name: Upload checkpoint artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.component }}-checkpoint-${{ matrix.sst_version.tag }}-${{ matrix.architecture.name }} | |
| path: ${{ matrix.component }}/checkpoint/ | |
| retention-days: 1 | |
| # Checkpoint restore testing jobs - restore from checkpoint | |
| restore: | |
| runs-on: ${{ matrix.architecture.runner }} | |
| needs: checkpoint | |
| strategy: | |
| matrix: *test-matrix | |
| container: | |
| image: ${{ matrix.sst_version.image }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download ${{ matrix.component }} library | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ matrix.component }}-lib-${{ matrix.sst_version.tag }}-${{ matrix.architecture.name }} | |
| path: ${{ matrix.component }}/ | |
| - name: Download checkpoint artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ matrix.component }}-checkpoint-${{ matrix.sst_version.tag }}-${{ matrix.architecture.name }} | |
| path: ${{ matrix.component }}/checkpoint/ | |
| - name: Restore ${{ matrix.component }} from checkpoint | |
| run: | | |
| cd ${{ matrix.component }} | |
| case "${{ matrix.component }}" in | |
| "gameoflife") | |
| echo "=== Registering gameoflife component ===" | |
| sst-register gol gol_LIBDIR=$(pwd) | |
| CHECKPOINT_FILE=$(find checkpoint -name "*.sstcpt" | sort | head -1) | |
| echo "=== Restoring gameoflife from checkpoint: $CHECKPOINT_FILE ===" | |
| sst --load-checkpoint "$CHECKPOINT_FILE" 2>&1 | tee gol_restore.out | |
| echo "=== Comparing restore output with expected results ===" | |
| diff ../.github/workflows/gol_restore.good ./gol_restore.out | |
| ;; | |
| "pingpong") | |
| echo "=== Registering pingpong component ===" | |
| sst-register pingpong pingpong_LIBDIR=$(pwd) | |
| CHECKPOINT_FILE=$(find checkpoint -name "*.sstcpt" | sort | head -1) | |
| echo "=== Restoring pingpong from checkpoint: $CHECKPOINT_FILE ===" | |
| sst --load-checkpoint "$CHECKPOINT_FILE" 2>&1 | tee pingpong_restore.out | |
| echo "=== Comparing restore output with expected results ===" | |
| if [ "${{ matrix.sst_version.tag }}" = "15.1.2" ]; then | |
| diff ../.github/workflows/pingpong_restore_interleaved.good ./pingpong_restore.out | |
| else | |
| diff ../.github/workflows/pingpong_restore_ordered.good ./pingpong_restore.out | |
| fi | |
| ;; | |
| "phold") | |
| echo "=== Registering phold component ===" | |
| sst-register phold phold_LIBDIR=$(pwd) | |
| CHECKPOINT_FILE=$(find checkpoint -name "*.sstcpt" | sort | head -1) | |
| echo "=== Restoring phold from checkpoint: $CHECKPOINT_FILE ===" | |
| sst --load-checkpoint "$CHECKPOINT_FILE" 2>&1 | tee phold_restore.out | |
| echo "=== Comparing restore output with expected results ===" | |
| diff ../.github/workflows/phold_restore.good ./phold_restore.out | |
| ;; | |
| esac | |
| echo "=== Verifying simulation completed successfully ===" | |
| grep -q "Simulation is complete" *_restore.out |