/setup-mpi

Set up your GitHub Actions workflow to use MPI

Primary LanguageShellMIT LicenseMIT

setup-mpi

Set up your GitHub Actions workflow to use MPI.

Usage

See action.yml

Basic:

steps:
  - uses: actions/checkout@v3
  - uses: mpi4py/setup-mpi@v1
  - run: mpicc helloworld.c -o helloworld
  - run: mpiexec -n 2 ./helloworld

Matrix Testing:

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        mpi: [ 'mpich', 'openmpi', 'intelmpi']
    name: ${{ matrix.mpi }} example
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Setup MPI
        uses: mpi4py/setup-mpi@v1
        with:
          mpi: ${{ matrix.mpi }}
      - run: mpicc helloworld.c -o helloworld
      - run: mpiexec -n 2 ./helloworld

Available MPI implementations