Repository navigation
mpi: Patch bug where sparse interpolations with footprints spanning multiple ranks would result in incomplete sums being calculated with MPI #1426
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
| # Runner information: | |
| # CPU: Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz (24 cores) | |
| name: Examples-mpi | |
| permissions: | |
| contents: read | |
| env: | |
| OUTPUT_PATH: ${{ github.workspace }} | |
| ENVHOME: "/home/devito/environments" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| # Trigger the workflow on push or pull request, but only for the main branch | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| name: Examples with mpi | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| mpi: ['openmpi', 'intelmpi'] | |
| include: | |
| - mpi: openmpi | |
| mpiarg: "-n 2 --oversubscribe" | |
| - mpi: intelmpi | |
| mpiarg: "-n 4" | |
| env: | |
| DEVITO_MPI: "1" | |
| DEVITO_LANGUAGE: "openmp" | |
| OMP_NUM_THREADS: "2" | |
| DEVITO_ARCH: "gcc" | |
| CC: "gcc" | |
| CXX: "g++" | |
| steps: | |
| - name: Checkout devito | |
| uses: actions/checkout@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v7 | |
| with: | |
| python-version: 3.11 | |
| - name: Setup MPI | |
| uses: mpi4py/setup-mpi@v1 | |
| with: | |
| mpi: ${{ matrix.mpi }} | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip | |
| pip install -e ".[extras,mpi,tests]" | |
| python3 scripts/clear_devito_cache.py | |
| - name: Test mpi notebooks | |
| run : | | |
| ./scripts/create_ipyparallel_mpi_profile.sh | |
| ipcluster start --profile=mpi --engines=mpi -n 4 --daemonize | |
| # A few seconds to ensure workers are ready | |
| sleep 10 | |
| pytest -vvv --nbval examples/mpi | |
| ipcluster stop --profile=mpi | |
| - name: Test seismic examples | |
| run: | | |
| mpirun ${{ matrix.mpiarg }} \ | |
| pytest -v \ | |
| examples/seismic/tti/tti_example.py \ | |
| examples/seismic/elastic/elastic_example.py \ | |
| examples/seismic/viscoacoustic/viscoacoustic_example.py \ | |
| examples/seismic/viscoelastic/viscoelastic_example.py | |
| - name: Test fwi examples with mpi | |
| run: | | |
| mpirun ${{ matrix.mpiarg }} python examples/seismic/inversion/fwi.py |