misc #86
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 | |
on: | |
push: | |
branches: [ hdf5.opt2 ] | |
pull_request: | |
branches: | |
- master | |
concurrency: | |
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{github.event_name == 'pull_request'}} | |
jobs: | |
CI: | |
defaults: | |
run: | |
shell: bash | |
env: | |
CCACHE_DIR: "${{ github.workspace }}/.ccache" | |
CCACHE_MAXSIZE: "10G" | |
CCACHE_CPP2: "true" | |
ASAN_OPTIONS: "detect_leaks=0" | |
strategy: | |
matrix: | |
distro: ['ubuntu:latest'] | |
cxx: ['g++', 'clang++'] | |
backend: ['OPENMP', 'SERIAL'] | |
cmake_build_type: ['Debug', 'Release'] | |
kokkos_ver: ['3.7.02'] | |
bounds_check: ['OFF'] | |
arborx: ['OFF'] | |
heffte: ['OFF' ] | |
hypre: ['OFF'] | |
liball: ['OFF'] | |
silo: ['OFF'] | |
hdf5: ['OFF'] | |
sanitizer: ['ASAN'] | |
coverage: ['OFF'] | |
include: | |
- distro: 'ubuntu:latest' | |
cxx: 'g++' | |
backend: 'THREADS' | |
cmake_build_type: 'Debug' | |
kokkos_ver: '3.7.02' | |
arborx: 'OFF' | |
heffte: 'OFF' | |
hypre: 'OFF' | |
silo: 'OFF' | |
coverage: 'OFF' | |
- distro: 'ubuntu:latest' | |
cxx: 'g++' | |
backend: 'OPENMP' | |
cmake_build_type: 'Debug' | |
kokkos_ver: '3.7.02' | |
arborx: 'ArborX' | |
heffte: 'FFTW' | |
hypre: 'HYPRE' | |
liball: 'libALL' | |
silo: 'Silo' | |
hdf5: 'HDF5' | |
coverage: 'ON' | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 30 | |
container: | |
image: ghcr.io/ecp-copa/ci-containers/${{ matrix.distro }} | |
options: --security-opt seccomp=unconfined | |
# FIXME: remove failing distributions here when passing | |
continue-on-error: ${{ (matrix.distro == 'ubuntu:intel' && matrix.backend == 'SERIAL' && matrix.cmake_build_type == 'Release') || matrix.distro == 'opensuse:latest' }} | |
steps: | |
- name: Cache ccache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.CCACHE_DIR }} | |
key: ccache-${{ matrix.distro }}-${{github.run_id}} | |
restore-keys: ccache-${{ matrix.distro }} | |
- name: Zero ccache stats | |
run: | | |
ccache -z | |
- name: Checkout kokkos | |
uses: actions/checkout@v3 | |
with: | |
repository: kokkos/kokkos | |
ref: ${{ matrix.kokkos_ver }} | |
path: kokkos | |
- name: Build kokkos | |
env: | |
BOUNDS: ${{ matrix.bounds_check }} | |
working-directory: kokkos | |
run: | | |
[[ ${{ matrix.backend }} == "OPENMP" ]] && kokkos_cmake_opts+=( -DKokkos_ENABLE_OPENMP==ON ) | |
[[ ${{ matrix.backend }} == "THREADS" ]] && kokkos_cmake_opts+=( -DKokkos_ENABLE_THREADS==ON ) | |
[[ ${BOUNDS} == "BoundsCheck" ]] && kokkos_cmake_opts+=( -DKokkos_ENABLE_DEBUG_BOUNDS_CHECK=ON ) | |
cmake -B build \ | |
-DCMAKE_INSTALL_PREFIX=$HOME/kokkos \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DKokkos_ENABLE_HWLOC=ON \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \ | |
${kokkos_cmake_opts[@]} | |
cmake --build build --parallel 2 | |
cmake --install build | |
- name: Checkout arborx | |
if: ${{ matrix.arborx == 'ArborX' }} | |
uses: actions/checkout@v3 | |
with: | |
repository: arborx/ArborX | |
ref: v1.2 | |
path: arborx | |
- name: Build arborx | |
if: ${{ matrix.arborx == 'ArborX' }} | |
working-directory: arborx | |
run: | | |
cmake -B build \ | |
-DKokkos_ROOT=${HOME}/kokkos \ | |
-DCMAKE_INSTALL_PREFIX=$HOME/arborx \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} | |
cmake --build build --parallel 2 | |
cmake --install build | |
- name: Checkout heffte | |
if: ${{ matrix.heffte != 'OFF' }} | |
uses: actions/checkout@v3 | |
with: | |
repository: icl-utk-edu/heffte | |
ref: v2.3.0 | |
path: heffte | |
- name: Build heffte | |
if: ${{ matrix.heffte != 'OFF' }} | |
working-directory: heffte | |
run: | | |
[[ ${{ matrix.heffte }} == "FFTW" ]] && heffte_cmake_opts+=( -DHeffte_ENABLE_FFTW=ON ) | |
[[ ${{ matrix.heffte }} == "MKL" ]] && heffte_cmake_opts+=( -DHeffte_ENABLE_MKL=ON ) | |
cmake -B build \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DCMAKE_INSTALL_PREFIX=$HOME/heffte \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \ | |
-DMKL_ROOT=/opt/intel/oneapi/mkl/latest \ | |
${heffte_cmake_opts[@]} | |
cmake --build build --parallel 2 | |
cmake --install build | |
- name: Checkout hypre | |
if: ${{ matrix.hypre == 'HYPRE' }} | |
uses: actions/checkout@v3 | |
with: | |
repository: hypre-space/hypre | |
ref: v2.22.1 | |
path: hypre | |
- name: Build hypre | |
if: ${{ matrix.hypre == 'HYPRE' }} | |
working-directory: hypre/src | |
run: | | |
[[ ${{ matrix.backend }} == 'OPENMP' ]] && hypre_cmake_opts+=( -DHYPRE_WITH_OPENMP=ON ) | |
cmake -B build \ | |
-DHYPRE_INSTALL_PREFIX=$HOME/hypre \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \ | |
-DHYPRE_WITH_MPI=ON \ | |
${hypre_cmake_opts[@]} | |
cmake --build build --parallel 2 | |
cmake --install build | |
- name: Checkout HDF5 | |
if: ${{ matrix.hdf5 }} == "HDF5" && ${{ matrix.distro }} == "ubuntu:latest" && ${{ matrix.cxx }} == "g++" | |
uses: actions/checkout@v3 | |
with: | |
repository: HDFGroup/hdf5 | |
ref: hdf5-1_14_3 | |
path: hdf5-1_14_3 | |
- name: Build HDF5 | |
if: ${{ matrix.hdf5 }} == "HDF5" && ${{ matrix.distro }} == "ubuntu:latest" && ${{ matrix.cxx }} == "g++" | |
working-directory: hdf5-1_14_3 | |
run: | | |
export CC=mpicc | |
export FC=mpif90 | |
mkdir hdf5 | |
cd hdf5 | |
echo "HDF5_ROOT=$PWD" >> $GITHUB_ENV | |
cmake -C ../config/cmake/cacheinit.cmake -G "Unix Makefiles" \ | |
-DCMAKE_INSTALL_PREFIX=$HDF5_ROOT \ | |
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=OFF \ | |
-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=OFF \ | |
-DBUILD_TESTING:BOOL=OFF \ | |
-DENABLE_EXTENDED_TESTS:BOOL=OFF \ | |
-DHDF5_BUILD_EXAMPLES:BOOL=OFF \ | |
-DHDF5_BUILD_HL_LIB:BOOL=OFF \ | |
-DHDF5_BUILD_TOOLS=OFF \ | |
-DHDF5_ENABLE_PARALLEL=ON \ | |
-DHDF5_ENABLE_SUBFILING_VFD=ON\ | |
-DBUILD_SHARED_LIBS:BOOL=ON \ | |
.. | |
make -j 8 install | |
- name: Checkout ALL | |
if: ${{ matrix.liball == 'libALL' }} | |
run: | | |
git clone --depth 1 --branch v0.9.2 https://gitlab.jsc.fz-juelich.de/SLMS/loadbalancing ALL | |
- name: Build ALL | |
if: ${{ matrix.liball == 'libALL' }} | |
working-directory: ALL | |
run: | | |
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/ALL | |
cmake --build build --parallel 2 | |
cmake --install build | |
- name: Checkout Cabana | |
uses: actions/checkout@v3 | |
- name: Build Cabana | |
env: | |
SANITIZER: ${{ matrix.sanitizer }} | |
SILO: ${{ matrix.silo }} | |
HDF5: ${{ matrix.hdf5 }} | |
run: | | |
if [[ ${SILO} == 'Silo' ]]; then | |
cabana_cmake_opts+=( -DCabana_REQUIRE_SILO=ON ) | |
else | |
cabana_cmake_opts+=( -DCMAKE_DISABLE_FIND_PACKAGE_SILO=ON ) | |
fi | |
if [[ ${HDF5} == 'HDF5' ]]; then | |
cabana_cmake_opts+=( -DCabana_REQUIRE_HDF5=ON ) | |
else | |
cabana_cmake_opts+=( -DCMAKE_DISABLE_FIND_PACKAGE_HDF5=ON ) | |
fi | |
# FIXME: Add sanitizer for fedora/opensuse when fixed | |
if [[ ${SANITIZER} == 'MSAN' ]]; then | |
cabana_cmake_opts+=( -DWITH_MSAN=ON ) | |
elif [[ ${{ matrix.distro }} != *"fedora"* ]]; then | |
if [[ ${{ matrix.distro }} != *"opensuse"* && ${{ matrix.backend }} != OPENMP ]]; then | |
cabana_cmake_opts+=( -DWITH_ASAN=ON ) | |
fi | |
fi | |
#FIXME: Run valgrind for all builds once fixed/suppressed | |
[[ ${{ matrix.distro }} == *"ubuntu"* || ${{ matrix.backend }} == OPENMP || ${{ matrix.cmake_build_type }} == Release ]] && cabana_cmake_opts+=( -DVALGRIND_EXECUTABLE=False ) | |
cmake -B build \ | |
-DCMAKE_INSTALL_PREFIX=$HOME/Cabana \ | |
-DMPIEXEC_MAX_NUMPROCS=2 -DMPIEXEC_PREFLAGS="--oversubscribe" \ | |
-DCMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/arborx;$HOME/heffte;$HOME/hypre;$HOME/ALL" \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror $([[ ${{ matrix.cxx }} == icpx ]] && echo -DCMAKE_CXX_FLAGS_DEBUG="-g -O0")" \ | |
-DCabana_ENABLE_TESTING=ON \ | |
-DCabana_ENABLE_EXAMPLES=ON \ | |
-DCabana_ENABLE_PERFORMANCE_TESTING=ON \ | |
-DCabana_PERFORMANCE_EXPECTED_FLOPS=0 \ | |
-DCabana_ENABLE_COVERAGE_BUILD=${{ matrix.coverage }} \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \ | |
-DDOXYGEN_WARN_AS_ERROR=FAIL_ON_WARNINGS \ | |
${cabana_cmake_opts[@]} | |
cmake --build build --parallel 2 --verbose | |
CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target test | |
cmake --install build | |
- name: Test Cabana Export Target | |
working-directory: example/core_tutorial/01_hello_world | |
run: | | |
cmake -B build \ | |
-DCMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/arborx;$HOME/heffte;$HOME/hypre;$HOME/Cabana" \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} | |
cmake --build build | |
- name: Build Doxygen | |
if: ${{ matrix.doxygen == 'ON' }} | |
run: cmake --build build --target doxygen | |
- name: Show ccache stats | |
run: | | |
ccache -s | |
- name: Upload Report to codecov.io | |
if: ${{ matrix.coverage == 'ON' }} | |
uses: codecov/codecov-action@v1 | |
- name: Checkout gh-pages | |
if: ${{ matrix.doxygen == 'ON' }} | |
uses: actions/checkout@v3 | |
with: | |
ref: 'gh-pages' | |
path: 'html' | |
- name: update and commit to gh-pages branch | |
if: ${{ matrix.doxygen == 'ON' }} | |
working-directory: html | |
run: | | |
rm -rf doxygen | |
mv ../build/html doxygen | |
git config --global user.name "Automatic Deployment (GitHub Action)"; | |
git config --global user.email "[email protected]" | |
git add --all | |
git diff --quiet HEAD || git commit -m "Documentation Update" | |
if [[ "${GITHUB_REF}" == 'refs/heads/master' ]]; then | |
git push | |
else | |
git show | |
fi | |
HIP: | |
defaults: | |
run: | |
shell: bash | |
env: | |
# Needed because FindMPI relies heavily on the compiler wrappers, which aren't used with hipcc | |
MPI_LOCATION: /usr/lib/x86_64-linux-gnu/openmpi/ | |
strategy: | |
matrix: | |
cxx: ['hipcc'] | |
cmake_build_type: ['Debug'] | |
kokkos_ver: ['4.2.00'] | |
runs-on: ubuntu-20.04 | |
container: ghcr.io/ecp-copa/ci-containers/rocm:latest | |
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 \ | |
-DCMAKE_INSTALL_PREFIX=$HOME/kokkos \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \ | |
-DKokkos_ENABLE_HIP=ON \ | |
-DKokkos_ARCH_VEGA908=ON | |
cmake --build build --parallel 2 | |
cmake --install build | |
- name: Checkout arborx | |
uses: actions/checkout@v3 | |
with: | |
repository: arborx/ArborX | |
ref: v1.2 | |
path: arborx | |
- name: Build arborx | |
working-directory: arborx | |
run: | | |
# Build without rocthrust (not available in this container) | |
cmake -B build \ | |
-DARBORX_ENABLE_ROCTHRUST=OFF \ | |
-DKokkos_ROOT=${HOME}/kokkos \ | |
-DCMAKE_INSTALL_PREFIX=$HOME/arborx \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} | |
cmake --build build --parallel 2 | |
cmake --install build | |
- name: Checkout ALL | |
run: | | |
git clone --depth 1 --branch v0.9.2 https://gitlab.jsc.fz-juelich.de/SLMS/loadbalancing ALL | |
- name: Build ALL | |
working-directory: ALL | |
run: | | |
cmake -B build \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=$HOME/ALL \ | |
-DCMAKE_CXX_FLAGS="-I${MPI_LOCATION}/include" \ | |
-DCMAKE_EXE_LINKER_FLAGS="-L${MPI_LOCATION}/lib -lmpi" \ | |
-DCMAKE_SHARED_LINKER_FLAGS="-L${MPI_LOCATION}/lib -lmpi" | |
cmake --build build --parallel 2 | |
cmake --install build | |
- name: Checkout Cabana | |
uses: actions/checkout@v3 | |
- name: Build Cabana | |
run: | | |
cmake -B build \ | |
-DCMAKE_INSTALL_PREFIX=$HOME/Cabana \ | |
-DMPIEXEC_MAX_NUMPROCS=2 -DMPIEXEC_PREFLAGS="--oversubscribe" \ | |
-DCMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/arborx;$HOME/heffte;$HOME/ALL" \ | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | |
-DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror" \ | |
-DCabana_ENABLE_TESTING=ON \ | |
-DCabana_ENABLE_EXAMPLES=ON \ | |
-DCabana_ENABLE_PERFORMANCE_TESTING=ON \ | |
-DCabana_PERFORMANCE_EXPECTED_FLOPS=0 \ | |
-DCMAKE_CXX_FLAGS="-I${MPI_LOCATION}/include" \ | |
-DCMAKE_EXE_LINKER_FLAGS="-L${MPI_LOCATION}/lib -lmpi -lopen-pal" \ | |
-DCMAKE_SHARED_LINKER_FLAGS="-L${MPI_LOCATION}/lib -lmpi -lopen-pal" \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} \ | |
-DCMAKE_DISABLE_FIND_PACKAGE_HDF5=ON \ | |
-DGPU_TARGETS="gfx908" | |
cmake --build build --parallel 2 --verbose | |
cmake --install build | |
CUDA: | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
cxx: ['nvcc'] | |
cmake_build_type: ['Release'] | |
kokkos_ver: ['3.7.02'] | |
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 \ | |
-DCMAKE_INSTALL_PREFIX=$HOME/kokkos \ | |
-DKokkos_ENABLE_CUDA=ON \ | |
-DKokkos_ARCH_VOLTA72=ON \ | |
-DKokkos_ENABLE_CUDA_LAMBDA=ON \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} | |
cmake --build build --parallel 2 | |
cmake --install build | |
- name: Checkout arborx | |
uses: actions/checkout@v3 | |
with: | |
repository: arborx/ArborX | |
ref: v1.2 | |
path: arborx | |
- name: Build arborx | |
working-directory: arborx | |
run: | | |
cmake -B build \ | |
-DKokkos_ROOT=${HOME}/kokkos \ | |
-DCMAKE_INSTALL_PREFIX=$HOME/arborx \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} | |
cmake --build build --parallel 2 | |
cmake --install build | |
- name: Checkout Cabana | |
uses: actions/checkout@v3 | |
- name: Build Cabana | |
run: | | |
cmake -B build \ | |
-DCMAKE_INSTALL_PREFIX=$HOME/Cabana \ | |
-DMPIEXEC_MAX_NUMPROCS=2 -DMPIEXEC_PREFLAGS="--oversubscribe" \ | |
-DCMAKE_PREFIX_PATH="$HOME/kokkos;$HOME/arborx;$HOME/heffte;$HOME/ALL" \ | |
-DCMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror" \ | |
-DCabana_ENABLE_TESTING=ON \ | |
-DCabana_ENABLE_EXAMPLES=ON \ | |
-DCabana_ENABLE_PERFORMANCE_TESTING=ON \ | |
-DCabana_PERFORMANCE_EXPECTED_FLOPS=0 \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} | |
cmake --build build --parallel 2 --verbose | |
cmake --install build |