Skip to content

Implement standard MPI ABI #373

Implement standard MPI ABI

Implement standard MPI ABI #373

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
BUILD_TYPE: Debug
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04]
# OpenMPI is too far away from MPI 4
# mpi: [MPICH, OpenMPI]
mpi: [MPICH]
shared: [shared-off, shared-on]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Install ${{matrix.mpi}}
run: |
case "${{matrix.mpi}}" in
MPICH)
sudo apt-get update
sudo apt-get install libmpich-dev
;;
OpenMPI)
;;
esac
- name: Restore dependencies
id: cache
uses: actions/cache/restore@v3
with:
path: /usr/local
key: ${{runner.os}}-${{matrix.mpi}}-dependencies
- name: Build ${{matrix.mpi}}
if: steps.cache.outputs.cache-hit != 'true'
run: |
case "${{matrix.mpi}}" in
MPICH)
;;
OpenMPI)
./.github/workflows/install-openmpi.sh
;;
esac
- name: Save dependencies
uses: actions/cache/save@v3
with:
path: /usr/local
key: ${{steps.cache.cache-primary-key}}
- name: Configure MPIwrapper
working-directory: ${{github.workspace}}/mpiwrapper
run: |
cmake \
-B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_INSTALL_PREFIX=$HOME/mpiwrapper-${{matrix.mpi}}
- name: Build MPIwrapper
working-directory: ${{github.workspace}}/mpiwrapper
run: cmake --build build
# - name: Test
# working-directory: ${{github.workspace}}/build
# run: ctest -C ${{env.BUILD_TYPE}}
- name: Install MPIwrapper
working-directory: ${{github.workspace}}/mpiwrapper
run: cmake --install build
- name: Configure MPItrampoline
working-directory: ${{github.workspace}}/mpitrampoline
run: |
shared=$(echo ${{matrix.shared}} | sed -e 's/shared-//')
cmake \
-B build \
-DBUILD_SHARED_LIBS=${shared} \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$HOME/mpitrampoline
- name: Build MPItrampoline
working-directory: ${{github.workspace}}/mpitrampoline
run: cmake --build build
# - name: Test
# working-directory: ${{github.workspace}}/build,
# run: ctest -C ${{env.BUILD_TYPE}}
- name: Install MPItrampoline
working-directory: ${{github.workspace}}/mpitrampoline
run: cmake --install build
- name: Test C
working-directory: ${{github.workspace}}/test
run: |
$HOME/mpitrampoline/bin/mpicc -c hello-world.c
$HOME/mpitrampoline/bin/mpicc -o hello-world hello-world.o
export MPITRAMPOLINE_LIB=$HOME/mpiwrapper-${{matrix.mpi}}/lib/libmpiwrapper.so
./hello-world
mpiexec -n 4 ./hello-world
- name: Test Fortran
working-directory: ${{github.workspace}}/test
run: |
$HOME/mpitrampoline/bin/mpifc -c hello-world-fortran.f90
$HOME/mpitrampoline/bin/mpifc -o hello-world-fortran hello-world-fortran.o
export MPITRAMPOLINE_LIB=$HOME/mpiwrapper-${{matrix.mpi}}/lib/libmpiwrapper.so
./hello-world-fortran
mpiexec -n 4 ./hello-world-fortran