Skip to content

AMRInterpolator: Correct the name of the dx member variable #295

AMRInterpolator: Correct the name of the dx member variable

AMRInterpolator: Correct the name of the dx member variable #295

Workflow file for this run

name: Unit Tests
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-24.04
strategy:
matrix:
comp: ['gnu', 'llvm']
mpi: ['FALSE', 'TRUE']
debug: ['FALSE', 'TRUE']
omp: ['FALSE', 'TRUE']
comp-version: [12, 13, 14, 16, 17, 18]
exclude:
# see available compiler versions here: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
- comp-version: 12
comp: 'llvm'
- comp-version: 13
comp: 'llvm'
- comp-version: 14
comp: 'llvm'
- comp-version: 16
comp: 'gnu'
- comp-version: 17
comp: 'gnu'
- comp-version: 18
comp: 'gnu'
name: ${{ matrix.comp }} ${{ matrix.comp-version }}, DEBUG = ${{ matrix.debug }}, USE_MPI = ${{ matrix.mpi }}, USE_OMP = ${{ matrix.omp }}
env:
AMREX_HOME: ${{ github.workspace }}/amrex
OMP_NUM_THREADS: 1
TESTS_DIR: ${{ github.workspace }}/GRTeclyn/Tests
BUILD_CONFIG: >
COMP=${{ matrix.comp }}
DEBUG=${{ matrix.debug}}
USE_MPI=${{ matrix.mpi }}
USE_OMP=${{ matrix.omp }}
USE_HDF5=TRUE
steps:
- name: Checkout AMReX
uses: actions/checkout@v4
with:
repository: AMReX-Codes/amrex
path: amrex
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
with:
path: GRTeclyn
submodules: true
- name: Update package manager database
id: update-database
continue-on-error: true
run: sudo apt-get update
# This is quite slow so only do this if the previous command fails
- 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 dependencies
run: |
PACKAGES="hdf5-tools"
if [[ "${{ matrix.mpi }}" == "TRUE" ]]; then
PACKAGES="${PACKAGES} libopenmpi-dev libhdf5-openmpi-dev"
else
PACKAGES="${PACKAGES} libhdf5-dev"
fi
if [[ "${{ matrix.comp }}" == "llvm" && "${{ matrix.omp }}" == "TRUE" ]]; then
PACKAGES="${PACKAGES} libomp-${{ matrix.comp-version }}-dev"
fi
if [[ "${{ matrix.comp }}" == "gnu" ]]; then
PACKAGES="${PACKAGES} cpp-${{ matrix.comp-version }}"
fi
if [[ "$PACKAGES" != "" ]]; then
sudo apt-get -y --no-install-recommends install $PACKAGES
fi
- name: Set Compilers
id: set-compilers
run: |
if [[ "${{ matrix.comp }}" == "gnu" ]]; then
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.comp-version }} 1000
# workaround for https://answers.launchpad.net/ubuntu/+question/816000
sudo update-alternatives --remove-all cpp
sudo rm -rf /etc/alternatives/cpp
sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-${{ matrix.comp-version }} 1000
g++ --version
cpp --version
echo "ompi_cxx=g++" >> $GITHUB_OUTPUT
echo "build_args=${BUILD_CONFIG}" >> $GITHUB_OUTPUT
elif [[ "${{ matrix.comp }}" == "llvm" ]]; then
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{ matrix.comp-version }} 1000
clang++ --version
echo "ompi_cxx=clang++" >> $GITHUB_OUTPUT
# Use the LLD linker with LLVM
echo "build_args=${BUILD_CONFIG} LDFLAGS=-fuse-ld=lld" >> $GITHUB_OUTPUT
fi
- name: Build Tests
working-directory: ${{ env.TESTS_DIR }}
run: |
if [[ "${{ matrix.mpi }}" == "TRUE" ]]; then
export HDF5_HOME=/usr/lib/x86_64-linux-gnu/hdf5/openmpi
else
export HDF5_HOME=/usr/lib/x86_64-linux-gnu/hdf5/serial
fi
export OMPI_CXX=${{ steps.set-compilers.outputs.ompi_cxx }}
make -j 4 ${{ steps.set-compilers.outputs.build_args }}
- name: Run tests
working-directory: ${{ env.TESTS_DIR }}
run: make run ${{ env.BUILD_CONFIG }}