Skip to content

Commit

Permalink
mpi4py: Run mpi4py tests with a relocated Open MPI installation
Browse files Browse the repository at this point in the history
  • Loading branch information
dalcinl committed May 6, 2024
1 parent 1163918 commit 1ca576e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/ompi_mpi4py.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,6 @@ jobs:
# this job of tests to pass.
needs: [ build ]
uses: ./.github/workflows/ompi_mpi4py_tests.yaml
with:
# This parameter is required, so send a meaningless
# environment variable name that will not affect the tests at
# all (i.e., the tests will be run with default values).
env_name: MAKE_TODAY_AN_OMPI_DAY

#==============================================

Expand Down
25 changes: 23 additions & 2 deletions .github/workflows/ompi_mpi4py_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ on:
workflow_call:
inputs:
env_name:
required: true
required: false
type: string

jobs:
mpi4py-tests:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
${{ inputs.env_name}}: 1
${{ inputs.env_name || 'MAKE_TODAY_AN_OMPI_DAY' }}: 1
steps:
- name: Use Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -67,3 +67,24 @@ jobs:
run: python demo/test-run/test_run.py -v
if: ${{ true }}
timeout-minutes: 10

#----------------------------------------------

- name: Relocate Open MPI installation
run: mv /opt/openmpi /opt/ompi
- name: Update PATH and set OPAL_PREFIX and LD_LIBRARY_PATH
run: |
sed -i '\|/opt/openmpi/bin|d' $GITHUB_PATH
echo OPAL_PREFIX=/opt/ompi >> $GITHUB_ENV
echo LD_LIBRARY_PATH=/opt/ompi/lib >> $GITHUB_ENV
- name: Test mpi4py (singleton)
run: python test/main.py -v
if: ${{ true }}
timeout-minutes: 10
- name: Test mpi4py (np=5)
run: /opt/ompi/bin/mpiexec -n 5 python test/main.py -v -f
if: ${{ true }}
timeout-minutes: 10

#----------------------------------------------

0 comments on commit 1ca576e

Please sign in to comment.