Skip to content

Add github action to detect mpi_comm_world usage #2

Add github action to detect mpi_comm_world usage

Add github action to detect mpi_comm_world usage #2

name: Check MPI_COMM_WORLD
on:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0 # this line fetches the complete history
- name: Search for MPI_COMM_WORLD in changed files
run: |
git diff --name-only origin/${{ github.event.pull_request.base.ref }} | grep -E "\.(cpp|hpp)$" | xargs grep -n "MPI_COMM_WORLD"