|
1 | 1 | name: mpi4py |
2 | 2 |
|
3 | | -on: [pull_request] |
| 3 | +on: [ pull_request ] |
4 | 4 |
|
5 | 5 | jobs: |
6 | | - mpi4py: |
| 6 | + build: |
7 | 7 | runs-on: ubuntu-latest |
8 | | - timeout-minutes: 60 |
9 | | - |
| 8 | + timeout-minutes: 30 |
10 | 9 | steps: |
11 | | - |
12 | 10 | - name: Configure hostname |
13 | 11 | run: echo 127.0.0.1 `hostname` | sudo tee -a /etc/hosts > /dev/null |
14 | 12 | if: ${{ runner.os == 'Linux' || runner.os == 'macOS' }} |
|
28 | 26 | run: ./autogen.pl |
29 | 27 | working-directory: mpi-build |
30 | 28 |
|
| 29 | + # Install into a separate directory (/opt/openmpi) so that we can |
| 30 | + # bundle up that tree into an artifact to share with other jobs in |
| 31 | + # this github action. Specifically don't use /usr/local, because |
| 32 | + # there's a bunch of other stuff already installed in /usr/local, |
| 33 | + # and we don't need to include that in our artifact. |
31 | 34 | - name: Configure Open MPI |
32 | 35 | run: ./configure |
33 | 36 | --disable-dependency-tracking |
|
36 | 39 | --disable-sphinx |
37 | 40 | --disable-mpi-fortran |
38 | 41 | --disable-oshmem |
39 | | - LDFLAGS=-Wl,-rpath,/usr/local/lib |
| 42 | + --prefix=/opt/openmpi |
| 43 | + LDFLAGS=-Wl,-rpath,/opt/openmpi/lib |
40 | 44 | working-directory: mpi-build |
41 | 45 |
|
42 | 46 | - name: Build MPI |
|
47 | 51 | run: sudo make install |
48 | 52 | working-directory: mpi-build |
49 | 53 |
|
| 54 | + - name: Add Open MPI to PATH |
| 55 | + run: echo /opt/openmpi/bin >> $GITHUB_PATH |
| 56 | + |
50 | 57 | - name: Tweak MPI |
51 | 58 | run: | |
52 | 59 | # Tweak MPI |
@@ -84,37 +91,62 @@ jobs: |
84 | 91 | with: |
85 | 92 | repository: "mpi4py/mpi4py" |
86 | 93 |
|
87 | | - - name: Install mpi4py |
88 | | - run: python -m pip install . |
| 94 | + - name: Build mpi4py wheel |
| 95 | + run: python -m pip wheel . |
89 | 96 | env: |
90 | 97 | CFLAGS: "-O0" |
91 | 98 |
|
92 | | - - name: Test mpi4py (singleton) |
93 | | - run: python test/main.py -v |
94 | | - if: ${{ true }} |
95 | | - timeout-minutes: 10 |
96 | | - - name: Test mpi4py (np=1) |
97 | | - run: mpiexec -n 1 python test/main.py -v |
98 | | - if: ${{ true }} |
99 | | - timeout-minutes: 10 |
100 | | - - name: Test mpi4py (np=2) |
101 | | - run: mpiexec -n 2 python test/main.py -v -f |
102 | | - if: ${{ true }} |
103 | | - timeout-minutes: 10 |
104 | | - - name: Test mpi4py (np=3) |
105 | | - run: mpiexec -n 3 python test/main.py -v -f |
106 | | - if: ${{ true }} |
107 | | - timeout-minutes: 10 |
108 | | - - name: Test mpi4py (np=4) |
109 | | - run: mpiexec -n 4 python test/main.py -v -f |
110 | | - if: ${{ true }} |
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.run |
118 | | - run: python demo/test-run/test_run.py -v |
119 | | - if: ${{ true }} |
120 | | - timeout-minutes: 10 |
| 99 | + - name: Save the artifacts for other jobs |
| 100 | + uses: actions/upload-artifact@v4 |
| 101 | + with: |
| 102 | + path: | |
| 103 | + /opt/openmpi |
| 104 | + ~/.openmpi |
| 105 | + ~/.prte |
| 106 | + test |
| 107 | + demo |
| 108 | + mpi4py-*.whl |
| 109 | + retention-days: 2 |
| 110 | + name: build-artifacts |
| 111 | + |
| 112 | + #============================================== |
| 113 | + |
| 114 | + run_defaults: |
| 115 | + # This whole set of tests run with mpi4py's defaults. As of March |
| 116 | + # 2024, this means disabling the spawn and dynamic tests. We want |
| 117 | + # this job of tests to pass. |
| 118 | + needs: [ build ] |
| 119 | + uses: ./.github/workflows/ompi_mpi4py_tests.yaml |
| 120 | + with: |
| 121 | + # This parameter is required, so send a meaningless |
| 122 | + # environment variable name that will not affect the tests at |
| 123 | + # all (i.e., the tests will be run with default values). |
| 124 | + env_name: MAKE_TODAY_AN_OMPI_DAY |
| 125 | + |
| 126 | + #============================================== |
| 127 | + |
| 128 | + run_spawn: |
| 129 | + # This whole set of tests runs explicitly with setting "enable the |
| 130 | + # spawn tests". As of March 2024, we know that Open MPI is |
| 131 | + # failing these tests. |
| 132 | + needs: [ build ] |
| 133 | + # Only run if the label "mpi4py" is set on this PR. |
| 134 | + if: ${{ contains(github.event.pull_request.labels.*.name, 'mpi4py-all') }} |
| 135 | + uses: ./.github/workflows/ompi_mpi4py_tests.yaml |
| 136 | + with: |
| 137 | + # Enable the spawn tests |
| 138 | + env_name: MPI4PY_TEST_SPAWN |
| 139 | + |
| 140 | + #============================================== |
| 141 | + |
| 142 | + run_dynamic: |
| 143 | + # This whole set of tests runs explicitly with setting "enable the |
| 144 | + # spawn tests". As of March 2024, we know that Open MPI is |
| 145 | + # failing these tests. |
| 146 | + needs: [ build ] |
| 147 | + # Only run if the label "mpi4py" is set on this PR. |
| 148 | + if: ${{ contains(github.event.pull_request.labels.*.name, 'mpi4py-all') }} |
| 149 | + uses: ./.github/workflows/ompi_mpi4py_tests.yaml |
| 150 | + with: |
| 151 | + # Enable the dynamic process tests |
| 152 | + env_name: MPI4PY_TEST_DYNPROC |
0 commit comments