Skip to content

Merge branch 'refs/heads/Ver.2.0_alpha' into Ver.2.0_w_PVR #35

Merge branch 'refs/heads/Ver.2.0_alpha' into Ver.2.0_w_PVR

Merge branch 'refs/heads/Ver.2.0_alpha' into Ver.2.0_w_PVR #35

name: tests on Ubuntu and MacOS
on: [push, pull_request]
concurrency:
group: ${{ github.actor }}-${{ github.ref }}
cancel-in-progress: true
env:
# Avoid a warning
# OMPI_MCA_btl_base_warn_component_unused: 0
# Prevent slowdown when oversubscribing (e.g. 4 ranks of 2 cores)
# OMPI_MCA_mpi_yield_when_idle: 1
# OMPI_MCA_rmaps_base_oversubscribe: 1
# Allow run as root
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
# Fix OpenMPI issue in Docker : https://github.com/open-mpi/ompi/issues/4948
# OMPI_MCA_btl_vader_single_copy_mechanism: none
jobs:
Run-on-Ubuntu:
name: test-compile on Ubuntu
runs-on: [ubuntu-20.04]
steps:
- uses: actions/checkout@v2
- name: build
run: |
sudo apt install pkg-config git gfortran libopenmpi-dev \
zlib1g zlib1g-dev libblas-dev libfftw3-dev libhdf5-openmpi-dev
./configure \
--enable-fftw3 \
--with-hdf5 \
--with-blas \
--with-zlib \
MPIRUN="mpirun --oversubscribe"
make
make test
Run-on-Mac:
name: test-compile on Mac
runs-on: [macos-latest]
steps:
- uses: actions/checkout@v2
- name: build
run: |
brew info gfortran
brew info open-mpi
brew install gfortran
a=`which gfortran-11`; \
b=`dirname $a`; \
c=$b/gfortran; \
ln -s $a $c
brew install open-mpi fftw hdf5-mpi
mpicc -v
mpif90 -v
./configure \
--enable-fftw3 \
--with-hdf5 \
--with-blas \
--with-zlib \
MPIRUN="mpirun --oversubscribe"
make
make test