Skip to content

Commit

Permalink
Merge branch 'AMReX-Codes:development' into STL-with-CGAL-EY
Browse files Browse the repository at this point in the history
  • Loading branch information
ejyoo921 authored Apr 4, 2024
2 parents f403e00 + 771c439 commit 311dd78
Show file tree
Hide file tree
Showing 524 changed files with 16,605 additions and 6,732 deletions.
6 changes: 6 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 All @@ -48,3 +51,6 @@ Checks: >
# Files not ending with nolint.H will be filtered in.
HeaderFilterRegex: '([^n].....|[^o]....|[^l]...|[^i]..|[^n].|[^t])\.H$'

# Only available in clang-tidy >= 17
HeaderFileExtensions: ['', "H", 'h', 'hh', 'hpp', 'hxx']
1 change: 1 addition & 0 deletions .codespell-ignore-words
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ parms
pres
ptd
recuse
shft
siz
structed
te
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ jobs:
name: Castro
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get Latest Release Tag
run: |
CASTRO_TAG=$(wget https://github.com/AMReX-Astro/Castro/releases/latest 2>&1 | grep Location: | awk '{print $2}' | awk -F/ '{print $NF}')
echo "CASTRO_TAG=$CASTRO_TAG" >> $GITHUB_ENV
MICROPHYSICS_TAG=$(wget https://github.com/AMReX-Astro/Microphysics/releases/latest 2>&1 | grep Location: | awk '{print $2}' | awk -F/ '{print $NF}')
echo "MICROPHYSICS_TAG=$MICROPHYSICS_TAG" >> $GITHUB_ENV
- name: Download Castro
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: 'AMReX-Astro/Castro'
ref: ${{env.CASTRO_TAG}}
path: 'Castro'
- name: Download Microphysics
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: 'AMReX-Astro/Microphysics'
ref: ${{env.MICROPHYSICS_TAG}}
Expand All @@ -35,7 +35,7 @@ jobs:
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
Expand All @@ -52,7 +52,7 @@ jobs:
export AMREX_HOME=${PWD}
export MICROPHYSICS_HOME=${PWD}/Microphysics
cd Castro/Exec/hydro_tests/Sedov/
make -j2 CCACHE=ccache USE_MPI=FALSE
make -j4 CCACHE=ccache USE_MPI=FALSE
ccache -s
du -hs ~/.cache/ccache
Expand All @@ -61,13 +61,13 @@ jobs:
name: WarpX
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Get Latest Release Tag
run: |
WARPX_TAG=$(wget https://github.com/ECP-WarpX/WarpX/releases/latest 2>&1 | grep Location: | awk '{print $2}' | awk -F/ '{print $NF}')
echo "WARPX_TAG=$WARPX_TAG" >> $GITHUB_ENV
- name: Download WarpX
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: 'ECP-WarpX/WarpX'
ref: ${{env.WARPX_TAG}}
Expand All @@ -77,7 +77,7 @@ jobs:
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
Expand All @@ -97,7 +97,7 @@ jobs:
-DWarpX_OPENPMD=OFF \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build WarpX/build -j 2
cmake --build WarpX/build -j 4
ccache -s
du -hs ~/.cache/ccache
Expand All @@ -111,7 +111,7 @@ jobs:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > pr_number.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pr_number
path: pr_number.txt
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ascent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@ jobs:
container:
image: alpinedav/ascent:0.9.2
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Configure
run: |
. /ascent_docker_setup_env.sh
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DAMReX_ENABLE_TESTS=ON \
-DAMReX_FORTRAN=OFF \
-DAMReX_ASCENT=ON
-DAMReX_ASCENT=ON \
-DAMReX_CONDUIT=ON
- name: Build
run: |
. /ascent_docker_setup_env.sh
cmake --build build -j 2
cmake --build build -j 4
127 changes: 127 additions & 0 deletions .github/workflows/bittree.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: bittree

on: [push, pull_request]

concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-bittree
cancel-in-progress: true

jobs:
bittree-2d:
name: Bittree 2D
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Check out Bittree
uses: actions/checkout@v4
with:
repository: Flash-X/Bittree
path: bittree
- name: Build Bittree
run: |
cd ${{ github.workspace }}/bittree
python setup.py library --dim 2 --prefix ${{ github.workspace }}/libbittree
cd build
make -j4
make install
- name: Build and Run Test
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=80M
export CCACHE_EXTRAFILES=${{ github.workspace }}/.clang-tidy
export CCACHE_LOGFILE=${{ github.workspace }}/ccache.log.txt
ccache -z
export AMREX_BITTREE_HOME=${{ github.workspace }}/libbittree
cd ${{ github.workspace }}/Tests/Amr/Advection_AmrCore/Exec
make -j4 USE_MPI=TRUE USE_BITTREE=TRUE DIM=2 TEST=TRUE \
CCACHE=ccache
mpiexec -n 2 ./main2d.gnu.TEST.MPI.ex inputs_bittree amr.plot_int=1000
${{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-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
du -hs ~/.cache/ccache
bittree-3d:
name: Bittree 3D
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies.sh
.github/workflows/dependencies/dependencies_clang-tidy-apt-llvm.sh 17
.github/workflows/dependencies/dependencies_ccache.sh
- name: Set Up Cache
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Check out Bittree
uses: actions/checkout@v4
with:
repository: Flash-X/Bittree
path: bittree
- name: Build Bittree
run: |
cd ${{ github.workspace }}/bittree
python setup.py library --dim 3 --prefix ${{ github.workspace }}/libbittree
cd build
make -j4
make install
- name: Build and Run Test
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=80M
export CCACHE_EXTRAFILES=${{ github.workspace }}/.clang-tidy
export CCACHE_LOGFILE=${{ github.workspace }}/ccache.log.txt
ccache -z
export AMREX_BITTREE_HOME=${{ github.workspace }}/libbittree
cd ${{ github.workspace }}/Tests/Amr/Advection_AmrCore/Exec
make -j4 USE_MPI=TRUE USE_BITTREE=TRUE DIM=3 TEST=TRUE BL_NO_FORT=TRUE\
CCACHE=ccache
mpiexec -n 2 ./main3d.gnu.TEST.MPI.ex inputs_bittree max_step=10
${{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-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
du -hs ~/.cache/ccache
save_pr_number:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Save PR number
env:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > pr_number.txt
- uses: actions/upload-artifact@v4
with:
name: pr_number
path: pr_number.txt
retention-days: 1
40 changes: 20 additions & 20 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
name: Clang@7.0 C++17 SP NOMPI Debug [lib]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang.sh 7
.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@v3
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
Expand Down Expand Up @@ -54,17 +54,17 @@ jobs:
-DCMAKE_CXX_COMPILER=$(which clang++-7) \
-DCMAKE_Fortran_COMPILER=$(which gfortran) \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
make -j 2
make -j 4
make install
make test_install
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j2 -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-12 \
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
export PATH=/tmp/my-amrex/bin:$PATH
which fcompare
which amrex_fcompare
ctest --output-on-failure
Expand All @@ -75,14 +75,14 @@ jobs:
name: Clang@14.0 C++17 SP Particles DP Mesh Debug [tests]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang.sh 14
.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@v3
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
Expand Down Expand Up @@ -114,11 +114,11 @@ jobs:
-DCMAKE_CXX_COMPILER=$(which clang++-14) \
-DCMAKE_Fortran_COMPILER=$(which gfortran) \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
make -j 2
make -j 4
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j2 -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-14 \
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ctest --output-on-failure
Expand All @@ -131,14 +131,14 @@ jobs:
name: Clang NOMPI Release [configure 2D]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Dependencies
run: |
.github/workflows/dependencies/dependencies_clang.sh 14
.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@v3
uses: actions/cache@v4
with:
path: ~/.cache/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
Expand All @@ -154,13 +154,13 @@ jobs:
ccache -z
./configure --dim 2 --with-fortran no --comp llvm --with-mpi no
make -j2 WARN_ALL=TRUE WARN_ERROR=TRUE XTRA_CXXFLAGS="-fno-operator-names" \
make -j4 WARN_ALL=TRUE WARN_ERROR=TRUE XTRA_CXXFLAGS="-fno-operator-names" \
CCACHE=ccache
make install
${{github.workspace}}/Tools/C_scripts/mmclt.py --input ${{github.workspace}}/ccache.log.txt
make -j2 -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-14 \
make -j4 -k -f clang-tidy-ccache-misses.mak \
CLANG_TIDY=clang-tidy-17 \
CLANG_TIDY_ARGS="--config-file=${{github.workspace}}/.clang-tidy --warnings-as-errors=*"
ccache -s
Expand All @@ -175,7 +175,7 @@ jobs:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > pr_number.txt
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: pr_number
path: pr_number.txt
Expand Down
Loading

0 comments on commit 311dd78

Please sign in to comment.