|
16 | 16 | type: string
|
17 | 17 |
|
18 | 18 | jobs:
|
19 |
| - build: |
| 19 | + test: |
20 | 20 | runs-on: ubuntu-latest
|
21 | 21 | timeout-minutes: 30
|
| 22 | + env: |
| 23 | + MPI4PY_TEST_SPAWN: true |
22 | 24 | steps:
|
23 | 25 | - name: Configure hostname
|
24 | 26 | run: echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > /dev/null
|
@@ -105,43 +107,51 @@ jobs:
|
105 | 107 | repository: ${{ inputs.repository || 'mpi4py/mpi4py' }}
|
106 | 108 | ref: ${{ inputs.ref }}
|
107 | 109 |
|
108 |
| - - name: Build mpi4py wheel |
109 |
| - run: python -m pip wheel . |
| 110 | + - name: Install mpi4py |
| 111 | + run: python -m pip install . |
110 | 112 | env:
|
111 | 113 | CFLAGS: "-O0"
|
112 | 114 |
|
113 |
| - - name: Save the artifacts for other jobs |
114 |
| - uses: actions/upload-artifact@v4 |
115 |
| - with: |
116 |
| - path: | |
117 |
| - /opt/openmpi |
118 |
| - ~/.openmpi |
119 |
| - ~/.prte |
120 |
| - test |
121 |
| - demo |
122 |
| - mpi4py-*.whl |
123 |
| - retention-days: 2 |
124 |
| - name: build-artifacts |
125 |
| - |
126 |
| - #============================================== |
127 |
| - |
128 |
| - run_defaults: |
129 |
| - # This whole set of tests run with mpi4py's defaults. As of March |
130 |
| - # 2024, this means disabling the spawn and dynamic tests. We want |
131 |
| - # this job of tests to pass. |
132 |
| - needs: [ build ] |
133 |
| - uses: ./.github/workflows/ompi_mpi4py_tests.yaml |
134 |
| - |
135 |
| - #============================================== |
136 |
| - |
137 |
| - run_spawn: |
138 |
| - # This whole set of tests runs explicitly with setting "enable the |
139 |
| - # spawn tests". As of March 2024, we know that Open MPI is |
140 |
| - # failing these tests. |
141 |
| - needs: [ build ] |
142 |
| - # Only run if the label "mpi4py" is set on this PR. |
143 |
| - if: ${{ contains(github.event.pull_request.labels.*.name, 'mpi4py-all') }} |
144 |
| - uses: ./.github/workflows/ompi_mpi4py_tests.yaml |
145 |
| - with: |
146 |
| - # Enable the spawn tests |
147 |
| - env_name: MPI4PY_TEST_SPAWN |
| 115 | + - name: Test mpi4py (singleton) |
| 116 | + run: python test/main.py -v |
| 117 | + if: ${{ true }} |
| 118 | + timeout-minutes: 10 |
| 119 | + - name: Test mpi4py (np=1) |
| 120 | + run: mpiexec -n 1 python test/main.py -v |
| 121 | + if: ${{ true }} |
| 122 | + timeout-minutes: 10 |
| 123 | + - name: Test mpi4py (np=2) |
| 124 | + run: mpiexec -n 2 python test/main.py -v -f |
| 125 | + if: ${{ true }} |
| 126 | + timeout-minutes: 10 |
| 127 | + - name: Test mpi4py (np=3) |
| 128 | + run: mpiexec -n 3 python test/main.py -v -f |
| 129 | + if: ${{ true }} |
| 130 | + timeout-minutes: 10 |
| 131 | + - name: Test mpi4py (np=4) |
| 132 | + run: mpiexec -n 4 python test/main.py -v -f |
| 133 | + if: ${{ true }} |
| 134 | + timeout-minutes: 10 |
| 135 | + - name: Test mpi4py (np=5) |
| 136 | + run: mpiexec -n 5 python test/main.py -v -f |
| 137 | + if: ${{ true }} |
| 138 | + timeout-minutes: 10 |
| 139 | + |
| 140 | + - name: Test mpi4py.run |
| 141 | + run: python demo/test-run/test_run.py -v |
| 142 | + if: ${{ true }} |
| 143 | + timeout-minutes: 10 |
| 144 | + |
| 145 | + - name: Relocate Open MPI installation |
| 146 | + run: mv /opt/openmpi /opt/ompi |
| 147 | + - name: Update PATH and set OPAL_PREFIX and LD_LIBRARY_PATH |
| 148 | + run: | |
| 149 | + sed -i '\|/opt/openmpi/bin|d' $GITHUB_PATH |
| 150 | + echo OPAL_PREFIX=/opt/ompi >> $GITHUB_ENV |
| 151 | + echo LD_LIBRARY_PATH=/opt/ompi/lib >> $GITHUB_ENV |
| 152 | +
|
| 153 | + - name: Test mpi4py (singleton) |
| 154 | + run: python test/main.py -v |
| 155 | + if: ${{ true }} |
| 156 | + timeout-minutes: 10 |
| 157 | + |
0 commit comments