Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
bcumming committed Dec 21, 2022
2 parents 3a47b5e + fbd4118 commit 0b69476
Show file tree
Hide file tree
Showing 670 changed files with 184,906 additions and 34,367 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Benchmarks

on:
pull_request:
branches: [ master ]

jobs:
build:
name: "Benchmarks"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
env:
CC: gcc-11
CXX: g++-11
steps:
- name: Get build dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build ccache
- name: Set up cmake
uses: jwlawson/[email protected]
with:
cmake-version: 3.22.x
- name: Clone w/ submodules
uses: actions/checkout@v3
with:
submodules: recursive
# figure out vector extensions for ccache key
- name: Check vector extensions
run: |
HAS_AVX512F=$([[ $(lscpu | grep "avx512f" | wc -l) -eq 1 ]] && echo "_avx512f" || echo "")
HAS_AVX2=$([[ $(lscpu | grep "avx2" | wc -l) -eq 1 ]] && echo "_avx2" || echo "")
HAS_FMA=$([[ $(lscpu | grep "fma" | wc -l) -eq 1 ]] && echo "_fma" || echo "")
HAS_AVX=$([[ $(lscpu | grep "avx" | wc -l) -eq 1 ]] && echo "_avx" || echo "")
VECTOR_EXTENSIONS=${HAS_AVX512F}${HAS_AVX2}${HAS_FMA}${HAS_AVX}
echo "VECTOR_EXTENSIONS=$VECTOR_EXTENSIONS" >> $GITHUB_ENV
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: benchmarks-${{ env.CXX }}-${{ env.VECTOR_EXTENSIONS }}
- name: Build arbor
run: |
mkdir build
cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DARB_WITH_MPI=OFF -DARB_USE_BUNDLED_LIBS=ON
ninja -j4 ubenches
cd -
- name: Run benchmarks
run: |
build/bin/accumulate_functor_values
build/bin/default_construct
build/bin/event_setup
build/bin/event_binning
build/bin/fvm_discretize
build/bin/mech_vec
build/bin/task_system
2 changes: 1 addition & 1 deletion .github/workflows/check-submodules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone w/ submodules
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ciwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
get_timestamp:
name: Prep VERSION
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- name: Get Arbor
Expand All @@ -35,7 +35,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-20.04, macos-latest]

steps:
- name: Get Arbor
Expand All @@ -62,7 +62,7 @@ jobs:
build_sdist:
name: Build sdist
needs: get_timestamp
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- name: Get packages
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:

upload_test_pypi:
name: upload to test pypi
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
needs: [build_binary_wheels, build_sdist]
steps:
- uses: actions/download-artifact@v3
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Sanitize
name: Lint

on:
pull_request:
Expand All @@ -20,14 +20,14 @@ jobs:
python -m pip install --upgrade pip
pip install flake8
- name: Clone w/ submodules
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive
- name: Python Formatting
uses: psf/black@stable
with:
options: --check
src: scripts/build-catalogue.in .
options: --check --extend-exclude '/(ext|doc/scripts/.*_theme|doc/scripts/inputs.py)'
src: .
- name: Python analysis
run: |
flake8 scripts/build-catalogue.in .
flake8 .
32 changes: 25 additions & 7 deletions .github/workflows/sanitize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,53 @@ on:
jobs:
build:
name: "Sanitize"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
name: ["Sanitize"]
sanitizer: ["address", "undefined", "thread"]
simd: ["ON", "OFF"]
env:
CC: clang-10
CXX: clang++-10
CC: clang-14
CXX: clang++-14
ASAN_OPTIONS: detect_leaks=1
steps:
- name: Get build dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build ccache
- name: Set up cmake
uses: jwlawson/actions-setup-cmake@v1.7
uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: 3.19.x
- name: Clone w/ submodules
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: recursive
- name: Update pip
run: python -m pip install --upgrade pip
# figure out vector extensions for ccache key
- name: Check vector extensions
run: |
HAS_AVX512F=$([[ $(lscpu | grep "avx512f" | wc -l) -eq 1 ]] && echo "_avx512f" || echo "")
HAS_AVX2=$([[ $(lscpu | grep "avx2" | wc -l) -eq 1 ]] && echo "_avx2" || echo "")
HAS_FMA=$([[ $(lscpu | grep "fma" | wc -l) -eq 1 ]] && echo "_fma" || echo "")
HAS_AVX=$([[ $(lscpu | grep "avx" | wc -l) -eq 1 ]] && echo "_avx" || echo "")
VECTOR_EXTENSIONS=${HAS_AVX512F}${HAS_AVX2}${HAS_FMA}${HAS_AVX}
echo "VECTOR_EXTENSIONS=$VECTOR_EXTENSIONS" >> $GITHUB_ENV
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: sanitize-${{ env.CXX }}-${{ matrix.sanitizer }}-${{ env.VECTOR_EXTENSIONS }}
- name: Build arbor
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
mkdir build
cd build
export SAN="-fsanitize=${{ matrix.sanitizer }} -fno-omit-frame-pointer"
cmake .. -DCMAKE_BUILD_TYPE=debug -DCMAKE_CXX_FLAGS="$SAN" -DCMAKE_C_FLAGS="$SAN" -DCMAKE_EXE_LINKER_FLAGS="$SAN" -DCMAKE_MODULE_LINKER_FLAGS="$SAN" -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DARB_VECTORIZE=${{ matrix.simd }} -DARB_WITH_MPI=OFF -DARB_USE_BUNDLED_LIBS=ON -DARB_WITH_PYTHON=ON -DPython3_EXECUTABLE=`which python`
make -j4 VERBOSE=1 tests examples pyarb
cmake .. -GNinja -DCMAKE_BUILD_TYPE=debug -DCMAKE_CXX_FLAGS="$SAN" -DCMAKE_C_FLAGS="$SAN" -DCMAKE_EXE_LINKER_FLAGS="$SAN" -DCMAKE_MODULE_LINKER_FLAGS="$SAN" -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DARB_VECTORIZE=${{ matrix.simd }} -DARB_WITH_MPI=OFF -DARB_USE_BUNDLED_LIBS=ON -DARB_WITH_PYTHON=ON -DPython3_EXECUTABLE=`which python`
ninja -j4 -v tests examples pyarb
cd -
- name: Run unit tests
run: |
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/spack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-22.04]
python-version: [3.8]
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: arbor

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Spack cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.spack-cache
key: arbor-cache-${{ github.run_id }}
restore-keys: arbor-cache-
key: arbor-cache-${{ matrix.os }}-${{ github.run_id }}
restore-keys: arbor-cache-${{ matrix.os }}-

- name: Build Arbor's Spack package against the develop branch
run: arbor/scripts/build_spack_package.sh arbor develop
Loading

0 comments on commit 0b69476

Please sign in to comment.