Skip to content

Improvements: Add GRDzhadzha as dependency #144

Improvements: Add GRDzhadzha as dependency

Improvements: Add GRDzhadzha as dependency #144

name: Intel (classic) Tests
on:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
jobs:
build-and-test:
runs-on: ubuntu-22.04
strategy:
max-parallel: 4
matrix:
mpi: ['FALSE', 'TRUE']
opt: ['FALSE', 'TRUE']
include:
- debug: 'TRUE'
opt: 'FALSE'
- debug: 'FALSE'
opt: 'TRUE'
name: MPI = ${{ matrix.mpi }}, OPT = ${{ matrix.opt }}
env:
CHOMBO_HOME: ${{ github.workspace }}/Chombo/lib
GRCHOMBO_SOURCE: ${{ github.workspace }}/GRChombo/Source
GRDZHADZHA_SOURCE: ${{ github.workspace }}/GRDzhadzha/Source
OMP_NUM_THREADS: 1
BUILD_ARGS: MPI=${{ matrix.mpi}} OPT=${{ matrix.opt }} DEBUG=${{ matrix.debug }}
steps:
- name: Checkout Chombo from GRTLCollaboration
uses: actions/checkout@master
with:
repository: GRTLCollaboration/Chombo
token: ${{ secrets.CI_SECRET || github.token }}
path: Chombo
- name: Checkout GRChombo from GRTLCollaboration
uses: actions/checkout@master
with:
repository: GRTLCollaboration/GRChombo
token: ${{ secrets.CI_SECRET || github.token }}
path: GRChombo
- name: Checkout GRDzhadzha from GRTLCollaboration
uses: actions/checkout@master
with:
repository: GRTLCollaboration/GRDzhadzha
token: ${{ secrets.CI_SECRET || github.token }}
path: GRDzhadzha
- name: Checkout GRBoondi
uses: actions/checkout@master
with:
repository: ShaunFell/GRBoondi
token: ${{ secrets.CI_SECRET || github.token }}
path: GRBoondi
- name: Update package manager database
id: update-database
continue-on-error: true
run: sudo apt-get update
- name: Update package repository mirrors if necessary
if: steps.update-database.outcome == 'failure'
run: |
sudo gem install apt-spy2
sudo apt-spy2 fix --commit --launchpad --country=US
sudo apt-get update
- name: Install Chombo dependencies
run: sudo apt-get -y --no-install-recommends install csh libgetopt-complete-perl
# Not specifying the compiler versions causes a bug, probably because of a version mismatch
# Heres a list of all the packages available to 'apt' from intel
# https://oneapi-src.github.io/oneapi-ci/#linux-web-installer
- name: Install Intel Compilers
run: |
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
| gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get -y install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic-2023.2.4 intel-oneapi-compiler-fortran-2023.2.4 intel-oneapi-mkl-2023.2.0 intel-oneapi-openmp-2023.2.4
working-directory: /tmp
- name: Install Intel MPI
if: matrix.mpi == 'TRUE'
run: |
sudo apt-get -y install intel-oneapi-mpi intel-oneapi-mpi-devel
# MUST reload intel environment variables to load in mpiicpc after 'Install Intel MPI'
- name: Build Chombo
run: |
source /opt/intel/oneapi/setvars.sh --force
cp $GITHUB_WORKSPACE/GRBoondi/InstallNotes/MakeDefsExamples/Make.defs.local.INTEL $CHOMBO_HOME/mk/Make.defs.local
make -j 4 AMRTimeDependent AMRTools BaseTools BoxTools $BUILD_ARGS
working-directory: ${{ env.CHOMBO_HOME }}
- name: Build GRChombo Tests
run: |
source /opt/intel/oneapi/setvars.sh --force
make test -j 4 $BUILD_ARGS
working-directory: ${{ github.workspace }}/GRChombo
- name: Run GRChombo Tests
run: |
source /opt/intel/oneapi/setvars.sh --force
make test run -j 2 $BUILD_ARGS
working-directory: ${{ github.workspace }}/GRChombo
- name: Build GRBoondi Tests
run: |
source /opt/intel/oneapi/setvars.sh --force
make test -j 4 $BUILD_ARGS
working-directory: ${{ github.workspace }}/GRBoondi
- name: Build GRBoondi Examples
run: |
source /opt/intel/oneapi/setvars.sh --force
make examples -j 4 $BUILD_ARGS
working-directory: ${{ github.workspace }}/GRBoondi
- name: Run GRBoondi Tests
run: |
source /opt/intel/oneapi/setvars.sh --force
export OMP_NUM_THREADS=4
make test run -j 1 $BUILD_ARGS TestDirs='Tests/SimpleDataReader_test/'
working-directory: ${{ github.workspace }}/GRBoondi