Skip to content

Commit

Permalink
Merge branch 'development' into use_openpmd-api
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Mar 28, 2024
2 parents 963dcac + dffdeac commit a129a8f
Show file tree
Hide file tree
Showing 294 changed files with 5,820 additions and 2,736 deletions.
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Checks: >
clang-diagnostic-*,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-do-while,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-init-variables,
Expand All @@ -24,6 +25,7 @@ Checks: >
google-global-names-in-headers,
misc-*,
-misc-const-correctness,
-misc-include-cleaner,
-misc-non-private-member-variables-in-classes,
-misc-no-recursion,
modernize-*,
Expand All @@ -34,6 +36,7 @@ Checks: >
performance-*,
portability-*,
readability-*,
-readability-avoid-unconditional-preprocessor-if,
-readability-else-after-return,
-readability-function-cognitive-complexity,
-readability-function-size,
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -eu -o pipefail

# `man apt.conf`:
# Number of retries to perform. If this is non-zero APT will retry
# failed files the given number of times.
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries

if [[ ! -f /etc/apt/trusted.gpg.d/apt.llvm.org.asc ]]; then
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
fi

source /etc/os-release # set UBUNTU_CODENAME

sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME} main"
sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-$1 main"

sudo apt-get update

sudo apt-get install -y --no-install-recommends \
clang-tidy-$1 libomp-$1-dev
53 changes: 27 additions & 26 deletions .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_gcc.sh 8
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
export PATH=/tmp/my-amrex/bin:$PATH
Expand All @@ -76,7 +76,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --test-dir build --output-on-failure
Expand All @@ -124,7 +124,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --test-dir build --output-on-failure
Expand All @@ -172,7 +172,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --test-dir build --output-on-failure
Expand All @@ -222,7 +222,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_gcc.sh 10
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -264,7 +264,7 @@ jobs:
# Let's not use clang-tidy for this test because it wants to use C++20.
# ${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
# make -j4 -k -f clang-tidy-ccache-misses.mak \
# CLANG_TIDY=clang-tidy-12 \
# CLANG_TIDY=clang-tidy-17 \
# CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --output-on-failure
Expand All @@ -281,7 +281,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_gcc.sh 8
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -305,6 +305,7 @@ jobs:
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DAMReX_FLATTEN_FOR=OFF \
-DAMReX_ASSERTIONS=ON \
-DAMReX_TESTING=ON \
-DAMReX_BOUND_CHECK=ON \
Expand All @@ -321,7 +322,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --output-on-failure
Expand All @@ -338,7 +339,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_gcc.sh 12
.github/workflows/dependencies/dependencies_clang-tidy.sh 14
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -385,7 +386,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-14 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --output-on-failure
Expand All @@ -402,7 +403,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -427,7 +428,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand All @@ -442,7 +443,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 15
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -467,7 +468,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-15 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand All @@ -482,7 +483,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -507,7 +508,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand All @@ -522,7 +523,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -547,7 +548,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand All @@ -562,7 +563,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand All @@ -586,7 +587,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand All @@ -601,7 +602,7 @@ jobs:
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy.sh 12
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
Expand Down Expand Up @@ -631,7 +632,7 @@ jobs:
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/sundials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
du -hs ~/.cache/ccache
sundials-cuda:
name: CUDA SUNDIALS@6.5.0
name: CUDA SUNDIALS@7.0.0
runs-on: ubuntu-22.04
env:
CCACHE_COMPRESS: 1
Expand Down Expand Up @@ -97,9 +97,9 @@ jobs:
export LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}
which nvcc || echo "nvcc not in PATH!"
wget -q https://github.com/LLNL/sundials/archive/refs/tags/v6.5.0.tar.gz
tar xfz v6.5.0.tar.gz
cd sundials-6.5.0
wget -q https://github.com/LLNL/sundials/archive/refs/tags/v7.0.0.tar.gz
tar xfz v7.0.0.tar.gz
cd sundials-7.0.0
mkdir instdir builddir
cd builddir
cmake .. \
Expand All @@ -126,7 +126,7 @@ jobs:
-DAMReX_GPU_BACKEND=CUDA \
-DAMReX_CUDA_ARCH=8.0 \
-DAMReX_SUNDIALS=ON \
-DSUNDIALS_ROOT=${PWD}/sundials-6.5.0/instdir \
-DSUNDIALS_ROOT=${PWD}/sundials-7.0.0/instdir \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache
cmake --build build -j 4
Expand Down
Loading

0 comments on commit a129a8f

Please sign in to comment.