Skip to content

Latest commit

 

History

History
53 lines (42 loc) · 1.18 KB

README.md

File metadata and controls

53 lines (42 loc) · 1.18 KB

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