pulling in HIP support, and extended OpenMP offload support #87
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: Airfoil | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
release: | |
types: | |
- created | |
jobs: | |
validate-airfoil: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
language: [ { name: 'c', ext: 'cpp' } ] # TODO: Add support for { name: 'fortran', ext: 'F90' } | |
optimisation: [ 'seq', 'genseq', 'vec', 'openmp' ] # TODO: Add support for 'cuda' | |
mesh: [ 'plain' ] # TODO: Add support for 'hdf5' | |
defaults: | |
run: | |
working-directory: apps/${{ matrix.language.name }}/airfoil/airfoil_${{ matrix.mesh }}/dp | |
env: | |
OP2_COMPILER: gnu | |
# NV_ARCH: Pascal | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ github.token }} | |
# - name: Install gfortran # TODO: Cache this step | |
# if: ${{ matrix.language.name == 'fortran' }} | |
# run: apt update && apt install -y gfortran | |
# - name: Install CUDA Toolkit # TODO: Cache this step | |
# uses: Jimver/[email protected] | |
# if: ${{ matrix.optimisation == 'cuda' }} | |
# id: install-cuda-toolkit | |
# with: | |
# cuda: '11.2.2' | |
# method: 'network' | |
# sub-packages: '[ "cudart", "nvcc" ]' | |
# - name: Link CUDA runtime | |
# if: ${{ matrix.optimisation == 'cuda' }} | |
# run: sudo ln -s "${{steps.install-cuda-toolkit.outputs.CUDA_PATH}}"/lib64/libcudart.so /usr/lib/libcudart.so | |
- name: Make build config | |
working-directory: op2 | |
run: make config | |
- name: Build OP2 backend | |
working-directory: op2 | |
run: make -j seq openmp # TODO: Only build targets required for active the matrix config | |
- name: Build airfoil | |
run: make airfoil_${{ matrix.optimisation }} | |
- name: Get airfoil mesh data # TODO: Replace with a smaller mesh | |
if: ${{ matrix.mesh == 'plain' }} | |
run: wget https://op-dsl.github.io/docs/OP2/new_grid.dat | |
- name: Run airfoil | |
run: ./airfoil_${{ matrix.optimisation }} > ~/output.txt | |
- name: Validate airfoil output | |
run: grep -q "This test is considered PASSED" ~/output.txt || exit 1 | |
# Fail the job with a non-zero exit if the airfoil validation fails | |
- name: Archive airfoil output | |
uses: actions/upload-artifact@v2 | |
with: | |
name: airfoil-${{ matrix.language.name }}-${{ matrix.optimisation }}-${{ matrix.mesh }}-output | |
path: ~/output.txt | |
# analyse-airfoil: | |
# runs-on: ubuntu-latest | |
# needs: validate-airfoil | |
# steps: | |
# TODO: Fetch app output artifact from validate job, extract runtime metric, compare runtime metric with historical artifacts |