From 82354997d70e6870fa80fb2b89bd96b74ae458e4 Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 13 Feb 2024 16:21:43 -0500 Subject: [PATCH] add mpi testing to github actions (#85) adds mpi to the matrix of build options --- .github/workflows/cmake.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8ed3d04ce..51055e631 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -11,12 +11,17 @@ jobs: strategy: matrix: compiler: [g++, clang++] + mpi: [on, off] kokkos: [on, off] mempool: [on, off] exclude: - kokkos: off mempool: on + env: + CXX: ${{matrix.compiler}} + MPICH_CXX: ${{matrix.compiler}} + steps: - uses: actions/checkout@v4 with: @@ -28,6 +33,17 @@ jobs: repository: kokkos/kokkos path: kokkos + - name: install mpich + if: ${{ matrix.mpi == 'on' }} + run: | + sudo apt update + sudo apt install mpich + + - name: set mpi compiler wrapper + if: ${{ matrix.mpi == 'on' }} + run: | + echo "CXX=mpicxx" >> $GITHUB_ENV + - name: Configure Kokkos if: ${{ matrix.kokkos == 'on' }} shell: bash @@ -47,9 +63,9 @@ jobs: working-directory: ${{github.workspace}}/omega_h run: cmake . -Bbuild - -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} + -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_VERBOSE_MAKEFILE=on - -DOmega_h_USE_MPI=off + -DOmega_h_USE_MPI=${{ matrix.mpi }} -DOmega_h_USE_Kokkos=${{ matrix.kokkos }} -DKokkos_PREFIX=$GITHUB_WORKSPACE/kokkos/build/install -DBUILD_TESTING=ON @@ -68,4 +84,4 @@ jobs: - name: Print if: always() - run: cat ${{github.workspace}}/omega_h/build/Testing/Temporary/LastTest.log \ No newline at end of file + run: cat ${{github.workspace}}/omega_h/build/Testing/Temporary/LastTest.log