Skip to content

Commit 5f9c253

Browse files
authored
Merge branch 'development' into gift_testing
2 parents 6aad5ae + ca9e532 commit 5f9c253

File tree

136 files changed

+3062
-1733
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+3062
-1733
lines changed

.clang-tidy

-3
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,17 @@ Checks: >
1111
-cppcoreguidelines-init-variables,
1212
-cppcoreguidelines-interfaces-global-init,
1313
-cppcoreguidelines-macro-usage,
14-
-cppcoreguidelines-no-malloc,
1514
-cppcoreguidelines-non-private-member-variables-in-classes,
1615
-cppcoreguidelines-owning-memory,
1716
-cppcoreguidelines-pro-*,
1817
misc-*,
1918
-misc-const-correctness,
2019
-misc-include-cleaner,
2120
-misc-non-private-member-variables-in-classes,
22-
-misc-no-recursion,
2321
-misc-use-anonymous-namespace,
2422
modernize-*,
2523
-modernize-avoid-c-arrays,
2624
-modernize-use-trailing-return-type,
27-
-modernize-use-using,
2825
performance-*,
2926
-performance-avoid-endl,
3027
portability-*,

.github/workflows/burn_cell_sdc.yml

+16
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,19 @@ jobs:
5858
cd unit_test/burn_cell_sdc
5959
diff state_over_time.txt ci-benchmarks/aprox19_BE_state_over_time.txt
6060
61+
- name: Compile, burn_cell_sdc (RKC, aprox19)
62+
run: |
63+
cd unit_test/burn_cell_sdc
64+
make realclean
65+
make INTEGRATOR_DIR=RKC NETWORK_DIR=aprox19 -j 4
66+
67+
- name: Run burn_cell_sdc (RKC, aprox19)
68+
run: |
69+
cd unit_test/burn_cell_sdc
70+
./main3d.gnu.ex inputs_aprox19.ci
71+
72+
- name: Compare to stored output (RKC, aprox19)
73+
run: |
74+
cd unit_test/burn_cell_sdc
75+
diff state_over_time.txt ci-benchmarks/aprox19_RKC_state_over_time.txt
76+

.github/workflows/check_powi.yml

+2-11
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- development
1111

1212
jobs:
13-
check-ifdefs:
13+
check-powi:
1414
runs-on: ubuntu-latest
1515

1616
steps:
@@ -21,16 +21,7 @@ jobs:
2121
- name: Setup Python
2222
uses: actions/setup-python@v5
2323
with:
24-
python-version: '3.10'
25-
26-
- name: Cache pip
27-
uses: actions/cache@v4
28-
with:
29-
# this path is specific to Ubuntu
30-
path: ~/.cache/pip
31-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
32-
restore-keys: |
33-
${{ runner.os }}-pip-
24+
python-version: '3.11'
3425

3526
- name: Run check_powi
3627
run: |

.github/workflows/check_pr_branch.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: check PR branch
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
- reopened
9+
- edited
10+
11+
jobs:
12+
check-PR-branch:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: PRs should not target main
16+
run: |
17+
if [[ "${{ github.base_ref }}" == "main" ]]; then
18+
echo 'Pull requests must not be made against main. Please target development instead.'
19+
exit 1
20+
fi

.github/workflows/clang-tidy.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "clang-tidy"
2+
3+
on: [pull_request]
4+
5+
concurrency:
6+
group: ${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
clang_tidy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Get AMReX
16+
run: |
17+
mkdir external
18+
cd external
19+
git clone https://github.com/AMReX-Codes/amrex.git
20+
cd amrex
21+
git checkout development
22+
echo 'AMREX_HOME=$(GITHUB_WORKSPACE)/external/amrex' >> $GITHUB_ENV
23+
echo $AMREX_HOME
24+
if [[ -n "${AMREX_HOME}" ]]; then exit 1; fi
25+
cd ../..
26+
27+
- name: Install dependencies
28+
run: |
29+
.github/workflows/dependencies_clang-tidy-apt-llvm.sh 17
30+
31+
- name: Compile burn_cell_sdc
32+
run: |
33+
cd unit_test/burn_cell_sdc
34+
make USE_MPI=FALSE USE_CLANG_TIDY=TRUE CLANG_TIDY=clang-tidy-17 CLANG_TIDY_WARN_ERROR=TRUE -j 4
35+

.github/workflows/compiler-warnings.yml

+18-6
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,46 @@ jobs:
3030
run: |
3131
cd unit_test/burn_cell
3232
make realclean
33-
make USE_MPI=FALSE USE_OMP=FALSE DEBUG=TRUE WARN_ALL=TRUE WARN_ERROR=TRUE NETWORK_DIR=subch_simple -j 2
33+
make USE_MPI=FALSE USE_OMP=FALSE DEBUG=TRUE WARN_ALL=TRUE WARN_ERROR=TRUE NETWORK_DIR=subch_simple -j 4
3434
3535
- name: Compile burn_cell w/o debug
3636
run: |
3737
cd unit_test/burn_cell
3838
make realclean
39-
make USE_MPI=FALSE USE_OMP=FALSE WARN_ALL=TRUE WARN_ERROR=TRUE NETWORK_DIR=subch_simple -j 2
39+
make USE_MPI=FALSE USE_OMP=FALSE WARN_ALL=TRUE WARN_ERROR=TRUE NETWORK_DIR=subch_simple -j 4
40+
41+
- name: Compile burn_cell_sdc w/ debug
42+
run: |
43+
cd unit_test/burn_cell_sdc
44+
make realclean
45+
make USE_MPI=FALSE USE_OMP=FALSE DEBUG=TRUE WARN_ALL=TRUE WARN_ERROR=TRUE NETWORK_DIR=subch_simple USE_NSE_NET=TRUE SCREEN_METHOD=chabrier1998 -j 4
46+
47+
- name: Compile burn_cell_sdc w/o debug
48+
run: |
49+
cd unit_test/burn_cell_sdc
50+
make realclean
51+
make USE_MPI=FALSE USE_OMP=FALSE WARN_ALL=TRUE WARN_ERROR=TRUE NETWORK_DIR=subch_simple USE_NSE_NET=TRUE SCREEN_METHOD=chabrier1998 -j 4
4052
4153
- name: Compile test_eos w/ debug
4254
run: |
4355
cd unit_test/test_eos
4456
make realclean
45-
make USE_MPI=FALSE USE_OMP=FALSE DEBUG=TRUE WARN_ALL=TRUE WARN_ERROR=TRUE EOS_DIR=gamma_law -j 2
57+
make USE_MPI=FALSE USE_OMP=FALSE DEBUG=TRUE WARN_ALL=TRUE WARN_ERROR=TRUE EOS_DIR=gamma_law -j 4
4658
4759
- name: Compile test_eos w/o debug
4860
run: |
4961
cd unit_test/test_eos
5062
make realclean
51-
make USE_MPI=FALSE USE_OMP=FALSE WARN_ALL=TRUE WARN_ERROR=TRUE EOS_DIR=gamma_law -j 2
63+
make USE_MPI=FALSE USE_OMP=FALSE WARN_ALL=TRUE WARN_ERROR=TRUE EOS_DIR=gamma_law -j 4
5264
5365
- name: Compile test_sdc w/ debug
5466
run: |
5567
cd unit_test/test_sdc
5668
make realclean
57-
make USE_MPI=FALSE USE_OMP=FALSE DEBUG=TRUE WARN_ALL=TRUE WARN_ERROR=TRUE NETWORK_DIR=aprox19 USE_NSE_TABLE=TRUE -j 2
69+
make USE_MPI=FALSE USE_OMP=FALSE DEBUG=TRUE WARN_ALL=TRUE WARN_ERROR=TRUE NETWORK_DIR=aprox19 USE_NSE_TABLE=TRUE -j 4
5870
5971
- name: Compile test_sdc w/o debug
6072
run: |
6173
cd unit_test/test_sdc
6274
make realclean
63-
make USE_MPI=FALSE USE_OMP=FALSE WARN_ALL=TRUE WARN_ERROR=TRUE NETWORK_DIR=aprox19 USE_NSE_TABLE=TRUE -j 2
75+
make USE_MPI=FALSE USE_OMP=FALSE WARN_ALL=TRUE WARN_ERROR=TRUE NETWORK_DIR=aprox19 USE_NSE_TABLE=TRUE -j 4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
set -eu -o pipefail
4+
5+
# `man apt.conf`:
6+
# Number of retries to perform. If this is non-zero APT will retry
7+
# failed files the given number of times.
8+
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries
9+
10+
if [[ ! -f /etc/apt/trusted.gpg.d/apt.llvm.org.asc ]]; then
11+
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
12+
fi
13+
14+
source /etc/os-release # set UBUNTU_CODENAME
15+
16+
sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME} main"
17+
sudo add-apt-repository "deb http://apt.llvm.org/${UBUNTU_CODENAME}/ llvm-toolchain-${UBUNTU_CODENAME}-$1 main"
18+
19+
sudo apt-get update
20+
21+
sudo apt-get install -y --no-install-recommends \
22+
clang-tidy-$1 libomp-$1-dev

.github/workflows/docs-test.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,15 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v4
22-
with:
23-
fetch-depth: 0
22+
2423
- name: Install pandoc and doxygen
2524
run: |
2625
sudo apt install pandoc doxygen
2726
2827
- name: Setup Python
2928
uses: actions/setup-python@v5
3029
with:
31-
python-version: '3.10'
30+
python-version: '3.11'
3231
cache: "pip"
3332

3433
- name: Install dependencies

.github/workflows/gh-pages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
run: ./deploy_docs_action.sh
4444

4545
- name: Deploy
46-
uses: peaceiris/actions-gh-pages@v3
46+
uses: peaceiris/actions-gh-pages@v4
4747
with:
4848
github_token: ${{ secrets.GITHUB_TOKEN }}
4949
publish_dir: ./out

.zenodo.json

+10
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,21 @@
4343
"name": "Malone, Chris",
4444
"orcid": "0000-0002-4045-7932"
4545
},
46+
{
47+
"affiliation": "Leiden Observatory",
48+
"name": "Sharda, Piyush",
49+
"orcid": "0000-0003-3347-7094"
50+
},
4651
{
4752
"affiliation": "Arizona State University",
4853
"name": "Timmes, Frank",
4954
"orcid": "0000-0002-0474-159X"
5055
},
56+
{
57+
"affiliation": "Michigan State University",
58+
"name": "Wibking, Benjamin",
59+
"orcid": "0000-0003-3175-2291"
60+
},
5161
{
5262
"affiliation": "Center for Computational Sciences and Engineering, Lawrence Berkeley National Laboratory",
5363
"name": "Willcox, Donald",

CHANGES.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
# 24.05
2+
3+
* Runtime parameters can now be type `bool` (#1536)
4+
5+
* more clang-tidy and compiler warning cleaning (#1527 #1530,
6+
#1532, #1533)
7+
8+
* Remove recursion in quicksort to avoid CUDA stack limits (#1531)
9+
10+
* Update the pynucastro networks to cache derived rate partition
11+
functions (#1529)
12+
13+
# 24.04
14+
15+
* A new `test_screening_templated` unit test was added -- this
16+
works with any of the templated networks. (#1525)
17+
18+
* A lot of small code clean-ups from clang-tidy (#1516, #1518, #1519, #1520, #1522)
19+
20+
* The NSE solver was optimized (#1503, #1504, #1506, #1507, #1508)
21+
22+
* The integrator code was synced up between implementations, fixing
23+
a bug in the RKC retry tolerances (#1513)
24+
25+
* A `reinterpret_cast` in `rhs.H` was removed (#1435)
26+
127
# 24.03
228

329
* pivoting in the linear algebra routines can now be disabled

EOS/breakout/_parameters

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@namespace: eos
22

3-
eos_gamma real 0.d0
3+
eos_gamma real 0.e0
44

55

66

EOS/gamma_law/_parameters

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
@namespace: eos
22

3-
eos_gamma real 5.d0/3.d0
4-
eos_assume_neutral integer 1
3+
eos_gamma real 5.e0/3.e0
4+
eos_assume_neutral bool 1

EOS/helmholtz/_parameters

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
@namespace: eos
22

33
# use the Coulomb corrections
4-
use_eos_coulomb integer 1
4+
use_eos_coulomb bool 1
55

66
# Force the EOS output quantities to match input
7-
eos_input_is_constant integer 1
7+
eos_input_is_constant bool 1
88

99
# Tolerance for iterations with respect to temperature
10-
eos_ttol real 1.0d-8
10+
eos_ttol real 1.0e-8
1111

1212
# Tolerance for iterations with respect to density
13-
eos_dtol real 1.0d-8
13+
eos_dtol real 1.0e-8
1414

1515
# Density target for radiation pressure smoothing (negative means smoothing is disabled)
16-
prad_limiter_rho_c real -1.0d0
16+
prad_limiter_rho_c real -1.0e0
1717

1818
# Density gradient for radiation pressure smoothing (negative means smoothing is disabled)
19-
prad_limiter_delta_rho real -1.0d0
19+
prad_limiter_delta_rho real -1.0e0

EOS/helmholtz/actual_eos.H

+5-5
Original file line numberDiff line numberDiff line change
@@ -1022,9 +1022,9 @@ void single_iter_update (T& state, int var, int dvar,
10221022

10231023
// Compute the error from the last iteration
10241024

1025-
amrex::Real error = std::abs((xnew - x) / x);
1025+
amrex::Real error = std::abs(xnew - x);
10261026

1027-
if (error < xtol) converged = true;
1027+
if (error < xtol * x) converged = true;
10281028
}
10291029

10301030

@@ -1132,10 +1132,10 @@ void double_iter_update (T& state, int var1, int var2,
11321132
state.T = tnew;
11331133

11341134
// Compute the errors
1135-
amrex::Real error1 = std::abs((rnew - rold) / rold);
1136-
amrex::Real error2 = std::abs((tnew - told) / told);
1135+
amrex::Real error1 = std::abs(rnew - rold);
1136+
amrex::Real error2 = std::abs(tnew - told);
11371137

1138-
if (error1 < dtol && error2 < ttol) converged = true;
1138+
if (error1 < dtol * rold && error2 < ttol * told) converged = true;
11391139
}
11401140

11411141

EOS/multigamma/_parameters

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
eos_gamma_default real 1.4
44

5-
species_a_name character ""
5+
species_a_name string ""
66
species_a_gamma real 1.4
77

8-
species_b_name character ""
8+
species_b_name string ""
99
species_b_gamma real 1.4
1010

11-
species_c_name character ""
11+
species_c_name string ""
1212
species_c_gamma real 1.4
1313

1414

EOS/polytrope/_parameters

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@namespace: eos
22

3-
polytrope_type integer 0
4-
polytrope_gamma real 0.0d0
5-
polytrope_K real 0.0d0
6-
polytrope_mu_e real 2.0d0
3+
polytrope_type int 0
4+
polytrope_gamma real 0.0e0
5+
polytrope_K real 0.0e0
6+
polytrope_mu_e real 2.0e0
77

0 commit comments

Comments
 (0)