-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7be9dc0
commit 4e0ec7d
Showing
2 changed files
with
91 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: tandem-build | ||
|
||
on: | ||
push: | ||
|
||
env: | ||
PETSC_CACHE_FOLDER: ${{ github.workspace }}/.petsc | ||
ARCHITECTURE: arch-linux-c-opt | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
compiler: | ||
- cc: gcc-13 | ||
cxx: g++-13 | ||
- cc: clang-18 | ||
cxx: clang++-18 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Dependencies and Compilers | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
gcc-13 g++-13 \ | ||
cmake \ | ||
openmpi-bin libopenmpi-dev \ | ||
libmetis-dev libparmetis-dev \ | ||
libeigen3-dev python3-numpy \ | ||
libopenblas0 libopenblas-dev \ | ||
liblua5.3-0 liblua5.3-dev \ | ||
libomp-dev libgomp1 | ||
# libxsmm | ||
git clone --depth 1 --branch 1.17 https://github.com/libxsmm/libxsmm.git gitbuild && \ | ||
mkdir -p gitbuild && cd gitbuild && \ | ||
make generator -j $(nproc) && sudo cp bin/libxsmm_gemm_generator /usr/bin && \ | ||
cd .. && rm -rf gitbuild | ||
- name: Get Ubuntu and PETSc Version | ||
id: get_version | ||
run: | | ||
UBUNTU_VERSION=$(lsb_release -r | awk '{print $2}') | ||
echo "UBUNTU_VERSION=$UBUNTU_VERSION" >> $GITHUB_ENV | ||
petsc_version=$(curl -s https://pypi.org/pypi/petsc/json | jq -r '.info.version') | ||
echo "PETSC_VERSION=$petsc_version" >> $GITHUB_ENV | ||
- name: Cache PETSc Installation | ||
id: cache-petsc | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.PETSC_CACHE_FOLDER }} | ||
key: ubuntu-${{ env.UBUNTU_VERSION }}-petsc-${{ env.PETSC_VERSION }}-${{ matrix.compiler.cc }}-${{ env.ARCHITECTURE }} | ||
restore-keys: ubuntu-${{ env.UBUNTU_VERSION }}-petsc-${{ env.PETSC_VERSION }}-${{ matrix.compiler.cc }}-${{ env.ARCHITECTURE }} | ||
|
||
- name: Install PETSc | ||
if: steps.cache-petsc.outputs.cache-hit != 'true' | ||
run: | | ||
set -euo pipefail | ||
install_dir=${{ env.PETSC_CACHE_FOLDER }} | ||
version=${{ env.PETSC_VERSION }} | ||
mkdir -p ${install_dir} | ||
wget https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${version}.tar.gz | ||
tar -xvf petsc-${version}.tar.gz | ||
cd petsc-${version} | ||
./configure --with-fortran-bindings=0 --with-debugging=0 \ | ||
--with-memalign=32 --with-64-bit-indices \ | ||
--with-cc=${{ matrix.compiler.cc }} --with-cxx=${{ matrix.compiler.cxx }} --with-fc=0 --prefix=${install_dir} \ | ||
--COPTFLAGS="-g -O3" --CXXOPTFLAGS="-g -O3" --with-mpi-dir=/usr/lib/x86_64-linux-gnu/openmpi | ||
make PETSC_DIR=`pwd` PETSC_ARCH=${{ env.ARCHITECTURE }} -j$(nproc) | ||
make PETSC_DIR=`pwd` PETSC_ARCH=${{ env.ARCHITECTURE }} install | ||
cd .. | ||
- name: Build and Test Tandem | ||
run: | | ||
set -euo pipefail | ||
mkdir build && cd build | ||
cmake .. \ | ||
-DCMAKE_PREFIX_PATH=${{ env.PETSC_CACHE_FOLDER }} \ | ||
-DDOMAIN_DIMENSION=3 \ | ||
-DPOLYNOMIAL_DEGREE=2 \ | ||
-DCMAKE_C_COMPILER=${{ matrix.compiler.cc }} \ | ||
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cxx }} | ||
make -j$(nproc) | ||
make test |
This file was deleted.
Oops, something went wrong.