Namelist readable by to4.4.2_Fredrik_micro_testbed #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to compile DALES | |
name: DALES compilation CI | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: ["gnu", "intel"] | |
fftw: ["", "-DUSE_FFTW=T"] | |
hypre: ["", "-DUSE_HYPRE=T"] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Install common dependencies | |
run: | | |
# Enable sources for netcdff-dev | |
sudo sed -i '/^#\sdeb-src /s/^#//' "/etc/apt/sources.list" | |
sudo apt-get update | |
sudo apt-get install -y cmake libfftw3-dev libhypre-dev libnetcdf-dev | |
- name : Install Intel (oneapi) dependencies | |
if: matrix.toolchain == 'intel' | |
run: | | |
# use wget to fetch the Intel repository public key | |
cd /tmp | |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
# add to your apt sources keyring so that archives signed with this key will be trusted. | |
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
# remove the public key | |
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | |
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" | |
sudo apt install -y intel-oneapi-mpi-devel intel-oneapi-compiler-fortran | |
# localpc_ifort uses mpif90, which breaks, therefore we use CARTESIUS, | |
# which utilizes mpiifort which works | |
echo "SYST=CARTESIUS" >> $GITHUB_ENV | |
- name: Checkout NetCdf-Fortran for Intel | |
if: matrix.toolchain == 'intel' | |
uses: actions/checkout@v2 | |
with: | |
repository: Unidata/netcdf-fortran | |
ref: 4.4.4 | |
path: netcdf-fortran | |
- name: Compile netcdf-Fortran for Intel | |
if: matrix.toolchain == 'intel' | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
#make sure ifx is found | |
sudo ln -s `which ifx` /usr/bin/ifx | |
cd netcdf-fortran | |
NCDIR=/usr FC=/usr/bin/ifx ./configure | |
sudo make -j2 | |
sudo make install | |
- name: Install Gnu dependencies | |
if: matrix.toolchain == 'gnu' | |
run: | | |
sudo apt-get install -y libopenmpi-dev libnetcdff-dev | |
- name : Set up Build | |
run: | | |
if [[ -f /opt/intel/oneapi/setvars.sh ]]; then | |
source /opt/intel/oneapi/setvars.sh | |
fi | |
mkdir build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=DEBUG ${{ matrix.fftw }} ${{ matrix.hypre }} ../ | |
- name : Build | |
run: | | |
if [[ -f /opt/intel/oneapi/setvars.sh ]]; then | |
source /opt/intel/oneapi/setvars.sh | |
fi | |
cd build | |
make -j2 |