Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6118fc2
Add clang-tidy test for LMeX
d-montgomery Aug 13, 2025
f4f77c1
Remove 'on push'
d-montgomery Aug 13, 2025
0b19494
switch to pull_request_target for now
d-montgomery Aug 13, 2025
0dce928
test in fork
d-montgomery Aug 14, 2025
d9fc205
Fix build dir
d-montgomery Aug 14, 2025
2d12a6c
Update clang-tidy
d-montgomery Aug 14, 2025
aab8c9e
Simplify pointing to PP PR
d-montgomery Aug 14, 2025
dd8b2dc
Add PeleC clang-tidy test
d-montgomery Aug 14, 2025
f2a6618
Start downstream tests after PelePhysics-CI
d-montgomery Aug 14, 2025
8f0a9c0
add cancel-in-progress to downstream tests
d-montgomery Aug 14, 2025
de5304d
Test concurrency
d-montgomery Aug 14, 2025
efc41b4
double check correct SHA for PP PR in LMeX and C
d-montgomery Aug 14, 2025
a7b2883
Try again
d-montgomery Aug 14, 2025
b501866
Add RegTests/FlameSheet from LMeX
d-montgomery Aug 15, 2025
559fa26
Fix invalid identifier for test
d-montgomery Aug 15, 2025
6c9391a
Make LMeX-clang-tidy need FlameSheet test
d-montgomery Aug 15, 2025
7dec6f0
Add PeleC-PMF test
d-montgomery Aug 15, 2025
d4b67b8
Merge branch 'development' into downstream-tests
d-montgomery Aug 15, 2025
b15782c
Remove extra line breaks
d-montgomery Aug 15, 2025
0a72f18
Fix clang-tidy error from #605
d-montgomery Aug 15, 2025
460448d
Formatting
d-montgomery Aug 15, 2025
7b0a0f5
Remove EB-ON for LMeX
d-montgomery Aug 18, 2025
530b682
Edit workflow_dispatch for development only
d-montgomery Aug 18, 2025
0d40289
Simplifications per Jon
d-montgomery Aug 18, 2025
7335ecc
Missed BUILD_DIR in run commands
d-montgomery Aug 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
315 changes: 315 additions & 0 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,315 @@
name: Downstream-CI

on:
workflow_dispatch:
push:
branches: [development]
pull_request:
branches: [development]

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

jobs:
PeleLMeX-FlameSheet:
name: PeleLMeX GNU MPI Run [FlameSheet]
runs-on: ubuntu-latest
env:
{CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code"}

steps:
- name: Checkout PelePhysics
uses: actions/checkout@v4
with:
path: pelephysics-pr
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Clone PeleLMeX
run: |
git clone --recursive --shallow-submodules --single-branch \
https://github.com/AMReX-Combustion/PeleLMeX.git

- name: Point PeleLMeX/Submodules/PelePhysics to this PR
working-directory: PeleLMeX
shell: bash
run: |
cd Submodules/PelePhysics
git fetch "$GITHUB_WORKSPACE/pelephysics-pr"
git checkout $(git -C "$GITHUB_WORKSPACE/pelephysics-pr" rev-parse HEAD)

echo "PelePhysics Submodule now points to:"
git rev-parse --short HEAD

- name: System Dependencies
working-directory: PeleLMeX
run: .github/workflows/dependencies/dependencies_gcc10.sh

- name: Build
working-directory: PeleLMeX/Exec/RegTests/FlameSheet/
run: |
make TPL COMP=gnu USE_MPI=TRUE
make -j 2 DIM=2 COMP=gnu USE_MPI=TRUE

- name: Run
working-directory: PeleLMeX/Exec/RegTests/FlameSheet/
run: |
mpirun -n 2 ./PeleLMeX2d.gnu.MPI.ex input.2d-regt amr.max_step=2 amr.plot_int=-1 amr.check_int=-1 amrex.abort_on_unused_inputs=1 amr.n_cell=32 64

PeleC-PMF:
name: PeleC GNU MPI Run [PMF]
runs-on: ubuntu-latest
env:
{CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code"}

steps:
- name: Checkout PelePhysics
uses: actions/checkout@v4
with:
path: pelephysics-pr
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Clone PeleC
run: |
git clone --recursive --shallow-submodules --single-branch \
https://github.com/AMReX-Combustion/PeleC.git

- name: Point PeleC/Submodules/PelePhysics to this PR
working-directory: PeleC
shell: bash
run: |
cd Submodules/PelePhysics
git fetch "$GITHUB_WORKSPACE/pelephysics-pr"
git checkout $(git -C "$GITHUB_WORKSPACE/pelephysics-pr" rev-parse HEAD)

echo "PelePhysics Submodule now points to:"
git rev-parse --short HEAD

- name: System Dependencies
working-directory: PeleC
run: |
set -eu -o pipefail

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update

sudo apt-get install -y --no-install-recommends \
build-essential \
libopenmpi-dev \
openmpi-bin

- name: Build
working-directory: PeleC/Exec/RegTests/PMF/
run: |
make TPL COMP=gnu USE_MPI=TRUE
make -j 2 DIM=3 COMP=gnu USE_MPI=TRUE

- name: Run
working-directory: PeleC/Exec/RegTests/PMF/
run: |
mpirun -n 2 ./PeleC3d.gnu.MPI.ex example.inp max_step=2 amr.plot_int=-1 amr.check_int=-1 amrex.abort_on_unused_inputs=0 amr.n_cell=8 8 128

PeleLMeX-clang-tidy:
name: PeleLMeX clang-tidy
needs: [PeleLMeX-FlameSheet, PeleC-PMF]
runs-on: ubuntu-24.04

steps:
- name: Checkout PelePhysics
uses: actions/checkout@v4
with:
path: pelephysics-pr
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Clone PeleLMeX
run: |
git clone --recursive --shallow-submodules --single-branch \
https://github.com/AMReX-Combustion/PeleLMeX.git

- name: Point PeleLMeX/Submodules/PelePhysics to this PR
working-directory: PeleLMeX
shell: bash
run: |
cd Submodules/PelePhysics
git fetch "$GITHUB_WORKSPACE/pelephysics-pr"
git checkout $(git -C "$GITHUB_WORKSPACE/pelephysics-pr" rev-parse HEAD)

echo "PelePhysics Submodule now points to:"
git rev-parse --short HEAD

- name: Setup
run: |
echo "NPROCS=$(nproc)" >> $GITHUB_ENV
echo "CCACHE_COMPRESS=1" >> $GITHUB_ENV
echo "CCACHE_COMPRESSLEVEL=10" >> $GITHUB_ENV
echo "CCACHE_LOGFILE=${{github.workspace}}/ccache.log.txt" >> $GITHUB_ENV
echo "CCACHE_EXTRAFILES=${{github.workspace}}/PeleLMeX/.clang-tidy" >> $GITHUB_ENV
echo "CCACHE_MAXSIZE=100M" >> $GITHUB_ENV
echo "CTCACHE_DIR=~/.cache/ctcache" >> $GITHUB_ENV

- name: Install Ccache
run: |
wget https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-linux-x86_64.tar.xz
sudo curl https://raw.githubusercontent.com/matus-chochlik/ctcache/7fd516e91c17779cbc6fc18bd119313d9532dd90/clang-tidy-cache -Lo /usr/bin/clang-tidy-cache
tar xvf ccache-4.8-linux-x86_64.tar.xz
sudo cp -f ccache-4.8-linux-x86_64/ccache /usr/local/bin/
sudo chmod +x /usr/bin/clang-tidy-cache
mkdir -p ~/.cache/ctcache

- name: Set Up Ccache
uses: actions/cache@v4
with:
path: ~/.cache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-

- name: Configure
working-directory: PeleLMeX
run: |
cmake -B"${{ github.workspace }}/build-clang-tidy-lmex" \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_CXX_COMPILER:STRING=clang++ \
-DCMAKE_C_COMPILER:STRING=clang \
-DPELE_ENABLE_EB:BOOL=OFF \
-DPELE_ENABLE_MPI:BOOL=OFF \
-DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \
-DPELE_ENABLE_CLANG_TIDY:BOOL=ON \
-DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \
${{ github.workspace }}/PeleLMeX

- name: Check
working-directory: ${{ github.workspace }}/build-clang-tidy-lmex
run: |
cmake --build . --parallel ${{ env.NPROCS }} 2>&1 | tee -a clang-tidy-full-report.txt
egrep "Warning:|Error:|warning:|error:" clang-tidy-full-report.txt \
| egrep -v "Submodules/amrex|Submodules/sundials|Submodules/AMReX-Hydro" \
| egrep -v "ld: warning:" | sort | uniq \
| awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > clang-tidy-warnings.txt

- name: Ccache Report
run: |
ls ~/.cache
ls ~/.cache/ccache
du -hs ~/.cache/ccache
ls ~/.cache/ctcache
du -hs ~/.cache/ctcache
ccache -s

- name: Full report
working-directory: ${{ github.workspace }}/build-clang-tidy-lmex
run: cat clang-tidy-full-report.txt

- name: Short report
working-directory: ${{ github.workspace }}/build-clang-tidy-lmex
run: |
echo "::add-matcher::${{ github.workspace }}/PeleLMeX/.github/problem-matchers/gcc.json"
cat clang-tidy-warnings.txt
export return=$(tail -n 1 clang-tidy-warnings.txt | awk '{print $2}')
exit ${return}

PeleC-clang-tidy:
name: PeleC clang-tidy
needs: [PeleLMeX-FlameSheet, PeleC-PMF]
runs-on: ubuntu-24.04

steps:
- name: Checkout PelePhysics
uses: actions/checkout@v4
with:
path: pelephysics-pr
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Clone PeleC
run: |
git clone --recursive --shallow-submodules --single-branch \
https://github.com/AMReX-Combustion/PeleC

- name: Point PeleC/Submodules/PelePhysics to this PR
working-directory: PeleC
shell: bash
run: |
cd Submodules/PelePhysics
git fetch "$GITHUB_WORKSPACE/pelephysics-pr"
git checkout $(git -C "$GITHUB_WORKSPACE/pelephysics-pr" rev-parse HEAD)

echo "PelePhysics Submodule now points to:"
git rev-parse --short HEAD

- name: Setup
run: |
echo "NPROCS=$(nproc)" >> $GITHUB_ENV
echo "CCACHE_COMPRESS=1" >> $GITHUB_ENV
echo "CCACHE_COMPRESSLEVEL=10" >> $GITHUB_ENV
echo "CCACHE_LOGFILE=${{github.workspace}}/ccache.log.txt" >> $GITHUB_ENV
echo "CCACHE_EXTRAFILES=${{github.workspace}}/PeleC/.clang-tidy" >> $GITHUB_ENV
echo "CCACHE_MAXSIZE=100M" >> $GITHUB_ENV
echo "CTCACHE_DIR=~/.cache/ctcache" >> $GITHUB_ENV

- name: Install Ccache
run: |
wget https://github.com/ccache/ccache/releases/download/v4.8/ccache-4.8-linux-x86_64.tar.xz
sudo curl https://raw.githubusercontent.com/matus-chochlik/ctcache/7fd516e91c17779cbc6fc18bd119313d9532dd90/clang-tidy-cache -Lo /usr/bin/clang-tidy-cache
tar xvf ccache-4.8-linux-x86_64.tar.xz
sudo cp -f ccache-4.8-linux-x86_64/ccache /usr/local/bin/
sudo chmod +x /usr/bin/clang-tidy-cache
mkdir -p ~/.cache/ctcache

- name: Set Up Ccache
uses: actions/cache@v4
with:
path: ~/.cache
key: ccache-${{github.workflow}}-${{github.job}}-git-${{github.sha}}
restore-keys: |
ccache-${{github.workflow}}-${{github.job}}-git-

- name: Configure
working-directory: PeleC
run: |
cmake -B"${{ github.workspace }}/build-clang-tidy-c" \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_CXX_COMPILER:STRING=clang++ \
-DCMAKE_C_COMPILER:STRING=clang \
-DPELE_ENABLE_MPI:BOOL=OFF \
-DPELE_ENABLE_FCOMPARE_FOR_TESTS:BOOL=OFF \
-DPELE_ENABLE_MASA:BOOL=OFF \
-DPELE_ENABLE_CLANG_TIDY:BOOL=ON \
-DPELE_EXCLUDE_BUILD_IN_CI:BOOL=ON \
-DCMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache \
${{github.workspace}}/PeleC

- name: Check
working-directory: ${{ github.workspace }}/build-clang-tidy-c
run: |
cmake --build . --parallel ${{ env.NPROCS }} 2>&1 | tee -a clang-tidy-full-report.txt
egrep "Warning:|Error:|warning:|error:" clang-tidy-full-report.txt \
| egrep -v "Submodules/amrex|Submodules/sundials|Submodules/AMReX-Hydro" \
| egrep -v "ld: warning:" | sort | uniq \
| awk 'BEGIN{i=0}{print $0}{i++}END{print "Warnings: "i}' > clang-tidy-warnings.txt

- name: Ccache Report
run: |
ls ~/.cache
ls ~/.cache/ccache
du -hs ~/.cache/ccache
ls ~/.cache/ctcache
du -hs ~/.cache/ctcache
ccache -s

- name: Full report
working-directory: ${{ github.workspace }}/build-clang-tidy-c
run: cat clang-tidy-full-report.txt

- name: Short report
working-directory: ${{ github.workspace }}/build-clang-tidy-c
run: |
echo "::add-matcher::${{ github.workspace }}/PeleC/.github/problem-matchers/gcc.json"
cat clang-tidy-warnings.txt
export return=$(tail -n 1 clang-tidy-warnings.txt | awk '{print $2}')
exit ${return}
3 changes: 2 additions & 1 deletion Source/Eos/EosParams.H
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ struct InitParm<eos::EosParm<eos::Manifold>>
}
} else if (density_lookup_type_string == "log") {
parm_in->m_h_parm.dens_lookup = eos::density_lookup_type::log;
parm_in->m_h_parm.idx_density = get_var_index("lnRHO", h_manf_data_in, 0);
parm_in->m_h_parm.idx_density =
get_var_index("lnRHO", h_manf_data_in, false);
if (parm_in->m_h_parm.idx_density < 0) {
parm_in->m_h_parm.idx_density = get_var_index("logRHO", h_manf_data_in);
}
Expand Down
Loading