Skip to content

github-action: add a MPI4PY sanity check #2

github-action: add a MPI4PY sanity check

github-action: add a MPI4PY sanity check #2

Workflow file for this run

name: GitHub Action CI
on: [pull_request]
env:
MPI4PY_VERSION: 3.1.5
jobs:
mpi4py:

Check failure on line 8 in .github/workflows/ompi_mpi4py.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ompi_mpi4py.yaml

Invalid workflow file

You have an error in your yaml syntax on line 8
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y --no-install-recommends wget lsb-core software-properties-common curl python3-pip
pip3 install cython
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build Open MPI
run: |
./autogen.pl
./configure --prefix=${GITHUB_WORKSPACE}/install --disable-oshmem --disable-mpi-fortran
make -j install
- name: Checkout mpi4py
uses: actions/checkout@v4
with:
repository: "mpi4py/mpi4py"
path: mpi4py.git
- name: Build MPI4py
run: |
echo "PYTHONPATH=${GITHUB_WORKSPACE}/mpi4py/" >> ${GITHUB_ENV}
export PATH=${GITHUB_WORKSPACE}/install/bin:$PATH
cd mpi4py
python3 setup.py build --mpicc="mpicc -shared"
python3 setup.py install --user
- name: Run MPI4py
run: |
export PATH=${GITHUB_WORKSPACE}/install/bin:$PATH
cd mpi4py/test
mpirun --map-by :OVERSUBSCRIBE -np 3 python3 ./main.py -v -f