Skip to content

Test package with openmpi #797

Test package with openmpi

Test package with openmpi #797

name: Test package with openmpi
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call:
workflow_dispatch:
schedule:
- cron: "0 8 * * *"
jobs:
create-datasets:
uses: ./.github/workflows/create_legacy_data.yml
with:
artifact_name: "legacy_ompi"
create-legacy-datasets:
uses: ./.github/workflows/create_legacy_checkpoint.yml
with:
artifact_name: "legacy_checkpoint_ompi"
test-code:
runs-on: ubuntu-latest
needs: [create-datasets, create-legacy-datasets]
container: ghcr.io/fenics/test-env:current-openmpi
env:
DEB_PYTHON_INSTALL_LAYOUT: deb_system
PETSC_ARCH: "linux-gnu-real64-32"
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe
working-directory: ./src
strategy:
matrix:
adios2: ["default", "v2.10.2"]
steps:
- uses: actions/checkout@v4
- name: Update pip
run: python3 -m pip install --break-system-packages --upgrade pip setuptools
- name: Install DOLFINx
uses: jorgensd/actions/[email protected]
with:
adios2: ${{ matrix.adios2 }}
petsc_arch: ${{ env.PETSC_ARCH }}
dolfinx: main
basix: main
ufl: main
ffcx: main
working-directory: ${{ env.working-directory}}
- name: Download legacy data
uses: actions/download-artifact@v4
with:
name: legacy_ompi
path: ./legacy
- name: Download legacy data
uses: actions/download-artifact@v4
with:
name: legacy_checkpoint_ompi
path: ./legacy_checkpoint
- name: Install package
run: python3 -m pip install --break-system-packages .[test]
- name: Run tests
run: |
coverage run --rcfile=.coveragerc -m mpi4py -m pytest -xvs ./tests/
- name: Run tests in parallel
run: |
mpirun -n 2 coverage run --rcfile=.coveragerc -m mpi4py -m pytest -xvs ./tests/