Skip to content

Implement checkpoint/restart for RBC #397

Implement checkpoint/restart for RBC

Implement checkpoint/restart for RBC #397

Workflow file for this run

name: Main application
on:
push:
branches:
- main
paths:
- Code/**
- dependencies/**
pull_request:
schedule:
# Run every Monday 0700 UTC
- cron: '0 7 * * 1'
workflow_dispatch:
# Run on demand
inputs:
run_long_tests:
required: true
default: 'true'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: RelWithDebInfo
deps_install_prefix: ${{github.workspace}}/deps-install
hemelb_install_prefix: ${{github.workspace}}/install
# VMs have 2 cores, double as compilation often IO bound
CMAKE_BUILD_PARALLEL_LEVEL: 4
jobs:
basic-checks:
name: Basic code quality checks
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Check copyright statements
run: python Scripts/checkCopyright.py
- name: Check C++ include guards
run: python Scripts/check_once_guards.py
fluid_only_build:
name: Build in fluid-only mode
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: [gnu-11, gnu-12, gnu-13]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-compilers
with:
compiler: ${{ matrix.compiler }}
- uses: ./.github/actions/install-hemelb-deps
with:
name: fluidonly
- name: Code make build dir
run: mkdir -p ${{github.workspace}}/build
- name: Code configure
run: >-
cmake
-S ${{github.workspace}}/Code
-B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DCMAKE_INSTALL_PREFIX:STRING=${{env.hemelb_install_prefix}}
-DHEMELB_DEPENDENCIES_INSTALL_PREFIX:STRING=${{env.deps_install_prefix}}
-DHEMELB_BUILD_RBC:BOOL=OFF
-DMPIEXEC_MAX_NUMPROCS:STRING=4
- name: Build and install HemeLB, adding install dir to PATH
working-directory: ${{github.workspace}}/build
run: |
cmake --build .
cmake --install .
echo "${hemelb_install_prefix}/bin" >> $GITHUB_PATH
- name: Run main unit tests
working-directory: ${{github.workspace}}/build
run: tests/hemelb-tests
- name: Store build tree on error
if: failure()
uses: actions/upload-artifact@v3
with:
name: fluid-only-failed-build-tree
path: build
- name: Get hemelb-tests repo
uses: ./.github/actions/get-tests-repo
with:
path: hemelb-tests
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Install python tools (required by diff test)
working-directory: python-tools
run: pip install .
- name: Run the simple regression test
working-directory: hemelb-tests/diffTest
env:
MPIRUN_FLAGS: --oversubscribe
NUMPROCS: 2
OFFSET_CHECK: light
run: ./diffTest.sh
- name: Store results on error
if: failure()
uses: actions/upload-artifact@v3
with:
name: fluid-only-failed-diffTest
path: hemelb-tests/diffTest/results
- name: Run the checkpoint test
working-directory: hemelb-tests/fluid-checkpoint
env:
MPIRUN_FLAGS: --oversubscribe
run: ./run.sh
- name: Store results on error
if: failure()
uses: actions/upload-artifact@v3
with:
name: fluid-only-failed-checkpointTest
path: hemelb-tests/fluid-checkpoint/results
rbc_build:
name: Build in RBC mode
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler: [gnu-11, gnu-12, gnu-13]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-compilers
with:
compiler: ${{ matrix.compiler }}
- uses: ./.github/actions/install-hemelb-deps
with:
name: rbc
extra_apt: libhdf5-mpi-dev
extra_cmake: '-DHEMELB_BUILD_RBC:BOOL=ON'
- name: Code make build dir
run: mkdir -p ${{github.workspace}}/build
- name: Code configure
run: >-
cmake
-S ${{github.workspace}}/Code
-B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DHEMELB_DEPENDENCIES_INSTALL_PREFIX:STRING=${{env.deps_install_prefix}}
-DHEMELB_BUILD_RBC:BOOL=ON
-DMPIEXEC_MAX_NUMPROCS:STRING=4
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build .
- name: Run main unit tests
working-directory: ${{github.workspace}}/build
run: tests/hemelb-tests
- name: Run parallel RBC tests
working-directory: ${{github.workspace}}/build
run: mpirun --oversubscribe -np 4 tests/mpi_redblood_tests
- name: Run longer integration tests on schedule or request
if: github.event == 'scheduled' || (github.event == 'workflow_dispatch' && inputs.run_long_tests == 'true')
working-directory: ${{github.workspace}}/build
run: tests/hemelb-tests [long]
- name: Store build tree on error
if: failure()
uses: actions/upload-artifact@v3
with:
name: rbc-failed-build-tree
path: build