Test package with different mpi compilers #168
This file contains hidden or 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: Test package with different mpi compilers | |
| 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: ${{ matrix.container }} | |
| 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 | |
| PIP_NO_BINARY: h5py | |
| strategy: | |
| matrix: | |
| adios2: ["v2.10.2", "v2.11.0"] # "default", Removed as HDF5 2.0 in dev env is broken with adios2<2.11 | |
| container: | |
| - ghcr.io/fenics/test-env:current-openmpi | |
| - ghcr.io/fenics/test-env:current-mpich | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Update pip | |
| run: python3 -m pip install --upgrade pip | |
| - name: Install build requirements | |
| run: python3 -m pip install -r build-requirements.txt | |
| - name: Install DOLFINx | |
| uses: jorgensd/actions/install-dolfinx@v0.4 | |
| 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@v8 | |
| with: | |
| name: legacy_ompi | |
| path: ./legacy | |
| - name: Download legacy data | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: legacy_checkpoint_ompi | |
| path: ./legacy_checkpoint | |
| - name: Install package | |
| run: | | |
| HDF5_MPI=ON HDF5_PKGCONFIG_NAME="hdf5" python3 -m pip install h5py --no-build-isolation --no-binary=h5py | |
| python3 -m pip install .[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/ |