| 1 |
name: Test package with different mpi compilers |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- main |
| 7 |
pull_request: |
| 8 |
branches: |
| 9 |
- main |
| 10 |
|
| 11 |
workflow_call: |
| 12 |
workflow_dispatch: |
| 13 |
schedule: |
| 14 |
- cron: "0 8 * * *" |
| 15 |
|
| 16 |
jobs: |
| 17 |
create-datasets: |
| 18 |
uses: ./.github/workflows/create_legacy_data.yml |
| 19 |
with: |
| 20 |
artifact_name: "legacy_ompi" |
| 21 |
|
| 22 |
create-legacy-datasets: |
| 23 |
uses: ./.github/workflows/create_legacy_checkpoint.yml |
| 24 |
with: |
| 25 |
artifact_name: "legacy_checkpoint_ompi" |
| 26 |
|
| 27 |
test-code: |
| 28 |
runs-on: ubuntu-latest |
| 29 |
needs: [create-datasets, create-legacy-datasets] |
| 30 |
container: ${{ matrix.container }} |
| 31 |
env: |
| 32 |
DEB_PYTHON_INSTALL_LAYOUT: deb_system |
| 33 |
PETSC_ARCH: "linux-gnu-real64-32" |
| 34 |
OMPI_ALLOW_RUN_AS_ROOT: 1 |
| 35 |
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 |
| 36 |
PRTE_MCA_rmaps_default_mapping_policy: :oversubscribe |
| 37 |
working-directory: ./src |
| 38 |
|
| 39 |
strategy: |
| 40 |
matrix: |
| 41 |
adios2: ["default", "v2.10.2", "v2.11.0"] |
| 42 |
container: |
| 43 |
- ghcr.io/fenics/test-env:current-openmpi |
| 44 |
- ghcr.io/fenics/test-env:current-mpich |
| 45 |
steps: |
| 46 |
- uses: actions/checkout@v6 |
| 47 |
|
| 48 |
- name: Update pip |
| 49 |
run: python3 -m pip install --break-system-packages --upgrade pip setuptools |
| 50 |
|
| 51 |
- name: Install DOLFINx |
| 52 |
uses: jorgensd/actions/[email protected] |
| 53 |
with: |
| 54 |
adios2: ${{ matrix.adios2 }} |
| 55 |
petsc_arch: ${{ env.PETSC_ARCH }} |
| 56 |
dolfinx: main |
| 57 |
basix: main |
| 58 |
ufl: main |
| 59 |
ffcx: main |
| 60 |
working-directory: ${{ env.working-directory}} |
| 61 |
|
| 62 |
- name: Download legacy data |
| 63 |
uses: actions/download-artifact@v7 |
| 64 |
with: |
| 65 |
name: legacy_ompi |
| 66 |
path: ./legacy |
| 67 |
|
| 68 |
- name: Download legacy data |
| 69 |
uses: actions/download-artifact@v7 |
| 70 |
with: |
| 71 |
name: legacy_checkpoint_ompi |
| 72 |
path: ./legacy_checkpoint |
| 73 |
|
| 74 |
- name: Install package |
| 75 |
run: python3 -m pip install --break-system-packages .[test] |
| 76 |
|
| 77 |
- name: Run tests |
| 78 |
run: | |
| 79 |
coverage run --rcfile=.coveragerc -m mpi4py -m pytest -xvs ./tests/ |
| 80 |
|
| 81 |
- name: Run tests in parallel |
| 82 |
run: | |
| 83 |
mpirun -n 2 coverage run --rcfile=.coveragerc -m mpi4py -m pytest -xvs ./tests/ |