|
| 1 | +name: msmpi |
| 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 | + mpi4py-git: |
| 19 | + description: 'mpi4py git' |
| 20 | + default: mpi4py/mpi4py |
| 21 | + required: false |
| 22 | + type: string |
| 23 | + mpi4py-ref: |
| 24 | + description: 'mpi4py ref' |
| 25 | + default: '' |
| 26 | + required: false |
| 27 | + type: string |
| 28 | + push: |
| 29 | + branches: |
| 30 | + - ci/all |
| 31 | + - ci/msmpi |
| 32 | + schedule: |
| 33 | + - cron: '0 0 * * 6' |
| 34 | + |
| 35 | +jobs: |
| 36 | + |
| 37 | + test: |
| 38 | + runs-on: ${{ matrix.os }} |
| 39 | + timeout-minutes: 60 |
| 40 | + strategy: |
| 41 | + fail-fast: false |
| 42 | + matrix: |
| 43 | + os: |
| 44 | + - windows-2022 |
| 45 | + |
| 46 | + steps: |
| 47 | + |
| 48 | + - name: Configure hostname |
| 49 | + run: echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > /dev/null |
| 50 | + if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }} |
| 51 | + |
| 52 | + - name: Install MPI |
| 53 | + uses: mpi4py/setup-mpi@v1 |
| 54 | + with: |
| 55 | + mpi: msmpi |
| 56 | + |
| 57 | + - name: Tweak MPI |
| 58 | + run: | |
| 59 | + # Tweak MPI |
| 60 | + echo "MSMPI_PROGRESS_SPIN_LIMIT=16" >> $GITHUB_ENV |
| 61 | + shell: bash |
| 62 | + |
| 63 | + - name: Show MPI |
| 64 | + run: echo "$MSMPI_BIN" |
| 65 | + shell: bash |
| 66 | + |
| 67 | + - name: Show MPICC |
| 68 | + run: | |
| 69 | + echo "MSMPI_INC=$MSMPI_INC" |
| 70 | + echo "MSMPI_LIB64=$MSMPI_LIB64" |
| 71 | + shell: bash |
| 72 | + |
| 73 | + - name: Use Python |
| 74 | + uses: actions/setup-python@v5 |
| 75 | + with: |
| 76 | + python-version: 3 |
| 77 | + architecture: x64 |
| 78 | + |
| 79 | + - name: Install Python packages (build) |
| 80 | + run: python -m pip install --upgrade |
| 81 | + setuptools pip wheel |
| 82 | + |
| 83 | + - name: Install Python packages (test) |
| 84 | + run: python -m pip install --upgrade |
| 85 | + numpy cffi pyyaml |
| 86 | + |
| 87 | + - name: Checkout mpi4py |
| 88 | + uses: actions/checkout@v4 |
| 89 | + with: |
| 90 | + repository: ${{ inputs.mpi4py-git || 'mpi4py/mpi4py' }} |
| 91 | + ref: ${{ inputs.mpi4py-ref }} |
| 92 | + |
| 93 | + - name: Install mpi4py |
| 94 | + run: python -m pip install . |
| 95 | + env: |
| 96 | + CFLAGS: "-O0" |
| 97 | + |
| 98 | + - name: Test mpi4py (singleton) |
| 99 | + run: python test/main.py -v |
| 100 | + if: ${{ true }} |
| 101 | + - name: Test mpi4py (np=1) |
| 102 | + run: mpiexec -n 1 python test/main.py -v |
| 103 | + - name: Test mpi4py (np=2) |
| 104 | + run: mpiexec -n 2 python test/main.py -v -f |
| 105 | + timeout-minutes: 10 |
| 106 | + - name: Test mpi4py (np=3) |
| 107 | + run: mpiexec -n 3 python test/main.py -v -f |
| 108 | + timeout-minutes: 10 |
| 109 | + - name: Test mpi4py (np=4) |
| 110 | + run: mpiexec -n 4 python test/main.py -v -f |
| 111 | + timeout-minutes: 10 |
| 112 | + - name: Test mpi4py (np=5) |
| 113 | + run: mpiexec -n 5 python test/main.py -v -f |
| 114 | + if: ${{ true }} |
| 115 | + timeout-minutes: 10 |
| 116 | + |
| 117 | + - name: Test mpi4py.futures (singleton) |
| 118 | + run: python demo/futures/test_futures.py -v |
| 119 | + if: ${{ true }} |
| 120 | + - name: Test mpi4py.futures (np=1) |
| 121 | + run: mpiexec -n 1 python demo/futures/test_futures.py -v |
| 122 | + - name: Test mpi4py.futures (np=2) |
| 123 | + run: mpiexec -n 2 python demo/futures/test_futures.py -v |
| 124 | + - name: Test mpi4py.futures (np=3) |
| 125 | + run: mpiexec -n 3 python demo/futures/test_futures.py -v |
| 126 | + |
| 127 | + - name: Test mpi4py.futures (np=1) |
| 128 | + run: mpiexec -n 1 python -m mpi4py.futures demo/futures/test_futures.py -v |
| 129 | + - name: Test mpi4py.futures (np=2) |
| 130 | + run: mpiexec -n 2 python -m mpi4py.futures demo/futures/test_futures.py -v |
| 131 | + - name: Test mpi4py.futures (np=3) |
| 132 | + run: mpiexec -n 3 python -m mpi4py.futures demo/futures/test_futures.py -v |
| 133 | + |
| 134 | + - name: Test mpi4py.run |
| 135 | + run: python demo/test-run/test_run.py -v |
| 136 | + if: ${{ false }} |
| 137 | + - name: Test init-fini |
| 138 | + run: bash demo/init-fini/run.sh |
| 139 | + if: ${{ false }} |
| 140 | + - name: Test check-mpiexec |
| 141 | + run: bash demo/check-mpiexec/run.sh |
| 142 | + if: ${{ false }} |
0 commit comments