CI extended #310
This file contains 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 extended | |
on: | |
# run every day at 06:00 UTC | |
schedule: | |
- cron: '0 6 * * *' | |
# when triggered manually | |
workflow_dispatch: | |
# when auto merge is enabled (hack to make sure it's run before merging) | |
pull_request: | |
types: [auto_merge_enabled] | |
# Cancel "duplicated" workflows triggered by pushes to internal | |
# branches with associated PRs. | |
concurrency: | |
group: ${{ github.ref }}-${{ github.head_ref }}-CI-extended | |
cancel-in-progress: true | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
CMAKE_BUILD_PARALLEL_LEVEL: 5 # num threads for build | |
MACHINE_CFG: cmake/machinecfg/CI.cmake | |
OMPI_MCA_mpi_common_cuda_event_max: 1000 | |
jobs: | |
perf-and-regression: | |
strategy: | |
matrix: | |
device: ['cuda', 'host'] | |
parallel: ['serial', 'mpi'] | |
runs-on: [self-hosted, A100] | |
container: | |
image: ghcr.io/parthenon-hpc-lab/cuda11.6-mpi-hdf5-ascent | |
# map to local user id on CI machine to allow writing to build cache | |
options: --user 1001 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Setup cache for gold standard | |
uses: actions/cache@v3 | |
with: | |
path: tst/regression/gold_standard/ | |
key: gold-standard | |
- name: Configure | |
run: | | |
cmake -B build \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DMACHINE_VARIANT=${{ matrix.device }}-${{ matrix.parallel }} | |
- name: Build | |
run: cmake --build build | |
# run performance "unit" tests (none use MPI) | |
- name: Performance tests | |
if: ${{ matrix.parallel == 'serial' }} | |
run: | | |
cd build | |
# Pick GPU with most available memory | |
export CUDA_VISIBLE_DEVICES=$(nvidia-smi --query-gpu=memory.free,index --format=csv,nounits,noheader | sort -nr | head -1 | awk '{ print $NF }') | |
ctest -L performance -LE perf-reg | |
# run regression tests | |
- name: Regression tests | |
run: | | |
cd build | |
# Pick GPU with most available memory | |
export CUDA_VISIBLE_DEVICES=$(nvidia-smi --query-gpu=memory.free,index --format=csv,nounits,noheader | sort -nr | head -1 | awk '{ print $NF }') | |
ctest -L regression -L ${{ matrix.parallel }} -LE perf-reg --timeout 3600 | |
# Test Ascent integration (only most complex setup with MPI and on device) | |
- name: Ascent tests | |
if: ${{ matrix.parallel == 'mpi' && matrix.device == 'cuda' }} | |
run: | | |
cmake -B build-ascent \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DMACHINE_VARIANT=${{ matrix.device }}-${{ matrix.parallel }} \ | |
-DPARTHENON_ENABLE_ASCENT=ON \ | |
-DAscent_DIR=/usr/local/ascent-develop/lib/cmake/ascent | |
cmake --build build-ascent | |
cd example/advection/ | |
# Pick GPU with most available memory | |
export CUDA_VISIBLE_DEVICES=$(nvidia-smi --query-gpu=memory.free,index --format=csv,nounits,noheader | sort -nr | head -1 | awk '{ print $NF }') | |
mpirun -np 2 ../../build-ascent/example/advection/advection-example \ | |
-i parthinput.advection \ | |
parthenon/output4/dt=0.05 \ | |
parthenon/time/tlim=0.1 | |
# check if file exists | |
test -f ascent_render_57.png | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: log-and-convergence-${{ matrix.device }}-${{ matrix.parallel }} | |
path: | | |
build/CMakeFiles/CMakeOutput.log | |
build/tst/regression/outputs/advection_convergence*/advection-errors.dat | |
build/tst/regression/outputs/advection_convergence*/advection-errors.png | |
example/advection/ascent_render_57.png | |
retention-days: 3 | |