Skip to content

Merge pull request #15 from DavidJoy8/free-energy #2

Merge pull request #15 from DavidJoy8/free-energy

Merge pull request #15 from DavidJoy8/free-energy #2

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{github.event_name == 'pull_request'}}
jobs:
CI:
defaults:
run:
shell: bash
strategy:
matrix:
distro: ['ubuntu:latest']
cxx: ['g++', 'clang++']
backend: ['SERIAL', 'OPENMP']
cmake_build_type: ['Debug', 'Release']
kokkos_ver: ['4.1.00']
runs-on: ubuntu-20.04
container: ghcr.io/ecp-copa/ci-containers/${{ matrix.distro }}
steps:
- name: Checkout kokkos
uses: actions/checkout@v3
with:
repository: kokkos/kokkos
ref: ${{ matrix.kokkos_ver }}
path: kokkos
- name: Build kokkos
working-directory: kokkos
run: |
cmake -B build \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-D CMAKE_INSTALL_PREFIX=$HOME/kokkos \
-D Kokkos_ENABLE_${{ matrix.backend }}=ON \
-D Kokkos_ENABLE_HWLOC=ON
cmake --build build --parallel 2
cmake --install build
- name: Checkout heffte
uses: actions/checkout@v3
with:
repository: icl-utk-edu/heffte
ref: v2.3.0
path: heffte
- name: Build heffte
working-directory: heffte
run: |
cmake -B build \
-D BUILD_SHARED_LIBS=ON \
-D CMAKE_INSTALL_PREFIX=$HOME/heffte \
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-D Heffte_ENABLE_FFTW=ON
cmake --build build --parallel 2
cmake --install build
- name: Checkout Cabana
uses: actions/checkout@v3
with:
repository: ECP-CoPA/Cabana
ref: cd7075fd66bc346c8f28831cfb5b0ea650cf9892
path: cabana
- name: Build Cabana
working-directory: cabana
run: |
cabana_cmake_opts+=( -D CMAKE_DISABLE_FIND_PACKAGE_SILO=ON -D CMAKE_DISABLE_FIND_PACKAGE_HDF5=ON )
cmake -B build \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-D CMAKE_INSTALL_PREFIX=$HOME/Cabana \
-D CMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/heffte" \
${cabana_cmake_opts[@]}
cmake --build build --parallel 2
cmake --install build
- name: Checkout CabanaPF
uses: actions/checkout@v3
- name: Build CabanaPF
run: |
cmake -B build \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-D CMAKE_CXX_COMPILER=${{ matrix.cxx }} \
-D CMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror" \
-D CMAKE_INSTALL_PREFIX=$HOME/CabanaPF \
-D CMAKE_PREFIX_PATH="$HOME/Cabana" \
-D MPIEXEC_MAX_NUMPROCS=2 \
-D MPIEXEC_PREFLAGS="--oversubscribe"
cmake --build build --parallel 2
cmake --install build
- name: Test CabanaPF
run: |
CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target test
CUDA:
defaults:
run:
shell: bash
strategy:
matrix:
cxx: ['nvcc']
cmake_build_type: ['Release']
kokkos_ver: ['4.1.00']
runs-on: ubuntu-20.04
container: ghcr.io/ecp-copa/ci-containers/cuda:12.2.0
steps:
- name: Checkout kokkos
uses: actions/checkout@v3
with:
repository: kokkos/kokkos
ref: ${{ matrix.kokkos_ver }}
path: kokkos
- name: Build kokkos
working-directory: kokkos
run: |
cmake -B build \
-D CMAKE_INSTALL_PREFIX=$HOME/kokkos \
-D Kokkos_ENABLE_CUDA=ON \
-D Kokkos_ARCH_VOLTA72=ON \
-D Kokkos_ENABLE_CUDA_LAMBDA=ON \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
cmake --build build --parallel 2
cmake --install build
- name: Checkout heffte
uses: actions/checkout@v3
with:
repository: icl-utk-edu/heffte
ref: v2.3.0
path: heffte
- name: Build heffte
working-directory: heffte
run: |
cmake -B build \
-D BUILD_SHARED_LIBS=ON \
-D CMAKE_INSTALL_PREFIX=$HOME/heffte \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-D Heffte_ENABLE_FFTW=ON \
-D Heffte_ENABLE_CUDA=ON
cmake --build build --parallel 2
cmake --install build
- name: Checkout Cabana
uses: actions/checkout@v3
with:
repository: ECP-CoPA/Cabana
ref: cd7075fd66bc346c8f28831cfb5b0ea650cf9892
path: cabana
- name: Build Cabana
working-directory: cabana
run: |
cabana_cmake_opts+=( -D CMAKE_DISABLE_FIND_PACKAGE_SILO=ON -D CMAKE_DISABLE_FIND_PACKAGE_HDF5=ON )
cmake -B build \
-D CMAKE_INSTALL_PREFIX=$HOME/Cabana \
-D MPIEXEC_MAX_NUMPROCS=2 -D MPIEXEC_PREFLAGS="--oversubscribe" \
-D CMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/heffte" \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
${cabana_cmake_opts[@]}
cmake --build build --parallel 2 --verbose
cmake --install build
- name: Checkout CabanaPF
uses: actions/checkout@v3
- name: Build CabanaPF
run: |
cmake -B build \
-D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \
-D CMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror" \
-D CMAKE_INSTALL_PREFIX=$HOME/CabanaPF \
-D CMAKE_PREFIX_PATH="$HOME/Cabana" \
-D MPIEXEC_MAX_NUMPROCS=2 \
-D MPIEXEC_PREFLAGS="--oversubscribe"
cmake --build build --parallel 2
cmake --install build