|
| 1 | +name: abi |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + mpi4py-git: |
| 7 | + description: 'mpi4py git' |
| 8 | + default: mpi4py/mpi4py |
| 9 | + required: false |
| 10 | + type: string |
| 11 | + mpi4py-ref: |
| 12 | + description: 'mpi4py ref' |
| 13 | + default: '' |
| 14 | + required: false |
| 15 | + type: string |
| 16 | + workflow_dispatch: |
| 17 | + inputs: |
| 18 | + mpi-git: |
| 19 | + description: 'MPI git' |
| 20 | + default: pmodels/mpich |
| 21 | + required: false |
| 22 | + type: string |
| 23 | + mpi-ref: |
| 24 | + description: 'MPI ref' |
| 25 | + default: '' |
| 26 | + required: false |
| 27 | + type: string |
| 28 | + mpi4py-git: |
| 29 | + description: 'mpi4py git' |
| 30 | + default: mpi4py/mpi4py |
| 31 | + required: false |
| 32 | + type: string |
| 33 | + mpi4py-ref: |
| 34 | + description: 'mpi4py ref' |
| 35 | + default: '' |
| 36 | + required: false |
| 37 | + type: string |
| 38 | + push: |
| 39 | + branches: |
| 40 | + - ci/all |
| 41 | + - ci/abi |
| 42 | + schedule: |
| 43 | + - cron: '0 0 * * *' |
| 44 | + |
| 45 | +jobs: |
| 46 | + |
| 47 | + build: |
| 48 | + runs-on: ubuntu-22.04 |
| 49 | + |
| 50 | + steps: |
| 51 | + |
| 52 | + - name: Checkout MPI stubs |
| 53 | + uses: actions/checkout@v4 |
| 54 | + with: |
| 55 | + repository: mpiwg-abi/header_and_stub_library |
| 56 | + ref: main |
| 57 | + path: mpi-stubs |
| 58 | + |
| 59 | + - name: Build MPI stubs |
| 60 | + run: make |
| 61 | + working-directory: mpi-stubs |
| 62 | + |
| 63 | + - name: Add MPI stubs to PATH |
| 64 | + run: | |
| 65 | + mpi_stubs=${{ github.workspace }}/mpi-stubs |
| 66 | + echo $mpi_stubs/bin >> $GITHUB_PATH |
| 67 | +
|
| 68 | + - name: Use Python |
| 69 | + uses: actions/setup-python@v5 |
| 70 | + with: |
| 71 | + python-version: 3 |
| 72 | + architecture: x64 |
| 73 | + |
| 74 | + - name: Checkout mpi4py |
| 75 | + uses: actions/checkout@v4 |
| 76 | + with: |
| 77 | + repository: ${{ inputs.mpi4py-git || 'mpi4py/mpi4py' }} |
| 78 | + ref: ${{ inputs.mpi4py-ref }} |
| 79 | + path: mpi4py |
| 80 | + |
| 81 | + - name: Build mpi4py wheel |
| 82 | + run: python -m pip wheel ./mpi4py |
| 83 | + env: |
| 84 | + CPPFLAGS: "-DMPI_ABI=1" |
| 85 | + CFLAGS: "-O0" |
| 86 | + |
| 87 | + - name: Upload mpi4py wheel |
| 88 | + uses: actions/upload-artifact@v4 |
| 89 | + with: |
| 90 | + name: mpi4py-wheel |
| 91 | + path: mpi4py-*.whl |
| 92 | + |
| 93 | + |
| 94 | + mpich: |
| 95 | + needs: build |
| 96 | + runs-on: ubuntu-22.04 |
| 97 | + timeout-minutes: 60 |
| 98 | + |
| 99 | + steps: |
| 100 | + |
| 101 | + - name: Configure hostname |
| 102 | + run: echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > /dev/null |
| 103 | + if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }} |
| 104 | + |
| 105 | + - name: Install depencencies |
| 106 | + run: sudo apt-get install -y -q |
| 107 | + libhwloc-dev |
| 108 | + libfabric-dev |
| 109 | + libibverbs-dev |
| 110 | + libpsm-infinipath1-dev |
| 111 | + libpsm2-dev |
| 112 | + librdmacm-dev |
| 113 | + |
| 114 | + - name: Checkout MPI |
| 115 | + uses: actions/checkout@v4 |
| 116 | + with: |
| 117 | + repository: ${{ inputs.mpi-git || 'pmodels/mpich' }} |
| 118 | + ref: ${{ inputs.mpi-ref }} |
| 119 | + path: mpi-build |
| 120 | + submodules: recursive |
| 121 | + |
| 122 | + - name: Bootstrap MPI |
| 123 | + run: ./autogen.sh |
| 124 | + working-directory: mpi-build |
| 125 | + |
| 126 | + - name: Configure MPI |
| 127 | + run: ./configure |
| 128 | + --with-pm=hydra |
| 129 | + --with-device=ch4:ofi |
| 130 | + --disable-dependency-tracking |
| 131 | + --disable-maintainer-mode |
| 132 | + --disable-doc |
| 133 | + --enable-g=all |
| 134 | + --enable-fast=none |
| 135 | + --enable-mpi-abi |
| 136 | + working-directory: mpi-build |
| 137 | + |
| 138 | + - name: Build MPI |
| 139 | + run: make -j $(nproc) |
| 140 | + working-directory: mpi-build |
| 141 | + |
| 142 | + - name: Install MPI |
| 143 | + run: sudo make install |
| 144 | + working-directory: mpi-build |
| 145 | + |
| 146 | + - name: Run ldconfig |
| 147 | + run: sudo ldconfig |
| 148 | + working-directory: mpi-build |
| 149 | + |
| 150 | + - name: Tweak MPI |
| 151 | + run: | |
| 152 | + # Tweak MPI |
| 153 | + echo "RDMAV_FORK_SAFE=1" >> $GITHUB_ENV |
| 154 | +
|
| 155 | + - name: Show MPI |
| 156 | + run: mpichversion |
| 157 | + |
| 158 | + - name: Use Python |
| 159 | + uses: actions/setup-python@v5 |
| 160 | + with: |
| 161 | + python-version: 3 |
| 162 | + architecture: x64 |
| 163 | + |
| 164 | + - name: Checkout mpi4py |
| 165 | + uses: actions/checkout@v4 |
| 166 | + with: |
| 167 | + repository: ${{ inputs.mpi4py-git || 'mpi4py/mpi4py' }} |
| 168 | + ref: ${{ inputs.mpi4py-ref }} |
| 169 | + |
| 170 | + - name: Download mpi4py wheel |
| 171 | + uses: actions/download-artifact@v4 |
| 172 | + with: |
| 173 | + name: mpi4py-wheel |
| 174 | + path: dist |
| 175 | + |
| 176 | + - name: Install mpi4py wheel |
| 177 | + run: python -m pip install mpi4py |
| 178 | + --no-index --find-links=dist |
| 179 | + |
| 180 | + - name: Test mpi4py (singleton) |
| 181 | + run: python test/main.py -v |
| 182 | + if: ${{ true }} |
| 183 | + - name: Test mpi4py (np=1) |
| 184 | + run: mpiexec -n 1 python test/main.py -v |
| 185 | + - name: Test mpi4py (np=2) |
| 186 | + run: mpiexec -n 2 python test/main.py -v -f |
| 187 | + timeout-minutes: 10 |
| 188 | + - name: Test mpi4py (np=3) |
| 189 | + run: mpiexec -n 3 python test/main.py -v -f |
| 190 | + timeout-minutes: 10 |
| 191 | + - name: Test mpi4py (np=4) |
| 192 | + run: mpiexec -n 4 python test/main.py -v -f |
| 193 | + timeout-minutes: 10 |
| 194 | + - name: Test mpi4py (np=5) |
| 195 | + run: mpiexec -n 5 python test/main.py -v -f |
| 196 | + if: ${{ false }} |
| 197 | + timeout-minutes: 10 |
| 198 | + |
| 199 | + - name: Test mpi4py.futures (singleton) |
| 200 | + run: python demo/futures/test_futures.py -v |
| 201 | + if: ${{ true }} |
| 202 | + - name: Test mpi4py.futures (np=1) |
| 203 | + run: mpiexec -n 1 python demo/futures/test_futures.py -v |
| 204 | + - name: Test mpi4py.futures (np=2) |
| 205 | + run: mpiexec -n 2 python demo/futures/test_futures.py -v |
| 206 | + - name: Test mpi4py.futures (np=3) |
| 207 | + run: mpiexec -n 3 python demo/futures/test_futures.py -v |
| 208 | + |
| 209 | + - name: Test mpi4py.futures (np=1) |
| 210 | + run: mpiexec -n 1 python -m mpi4py.futures demo/futures/test_futures.py -v |
| 211 | + - name: Test mpi4py.futures (np=2) |
| 212 | + run: mpiexec -n 2 python -m mpi4py.futures demo/futures/test_futures.py -v |
| 213 | + - name: Test mpi4py.futures (np=3) |
| 214 | + run: mpiexec -n 3 python -m mpi4py.futures demo/futures/test_futures.py -v |
| 215 | + |
| 216 | + - name: Test mpi4py.run |
| 217 | + run: python demo/test-run/test_run.py -v |
| 218 | + - name: Test init-fini |
| 219 | + run: bash demo/init-fini/run.sh |
| 220 | + - name: Test check-mpiexec |
| 221 | + run: bash demo/check-mpiexec/run.sh |
0 commit comments