Skip to content

mpi4py/setup-mpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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