Skip to content

Commit

Permalink
Merge branch 'development' into clang-tidy-header
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Sep 28, 2024
2 parents cf311d2 + 6ea903d commit b4acb17
Show file tree
Hide file tree
Showing 310 changed files with 44,814 additions and 4,972 deletions.
5 changes: 3 additions & 2 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Checks: >
-cppcoreguidelines-init-variables,
-cppcoreguidelines-interfaces-global-init,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-*,
Expand All @@ -25,9 +24,9 @@ Checks: >
modernize-*,
-modernize-avoid-c-arrays,
-modernize-use-trailing-return-type,
-modernize-use-using,
performance-*,
-performance-avoid-endl,
-performance-enum-size,
portability-*,
readability-*,
-readability-avoid-const-params-in-decls,
Expand All @@ -40,6 +39,8 @@ Checks: >
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-named-parameter,
-readability-redundant-inline-specifier,
-readability-redundant-member-init,
-readability-simplify-boolean-expr,
-readability-static-accessed-through-instance,
mpi-*,
Expand Down
1 change: 1 addition & 0 deletions .codespell-ignore-words
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ nd
ue
bion
aas
checkin
49 changes: 49 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# http://EditorConfig.org
#
# precedence of rules is bottom to top

# this is the top-most EditorConfig file
root = true


[*.{c,h,cpp,hpp,H,py}]
# 4 space indentation
indent_style = space
indent_size = 4

# Clean up trailing whitespace
trim_trailing_whitespace = true

# unix-style newlines
end_of_line = lf

# newline ending in files
insert_final_newline = true


[*.md]
# two end of line whitespaces are newlines without a paragraph
trim_trailing_whitespace = false


[*.rst]
# Enforce UTF-8 encoding
charset = utf-8

# Unix-style newlines
end_of_line = lf

# Newline ending in files
insert_final_newline = true

# 3 space indentation
indent_style = space
indent_size = 3

# Clean up trailing whitespace
trim_trailing_whitespace = true

[{Makefile,GNUmakefile,Make.*}]
# TABs are part of its syntax
indent_style = tab
indent_size = unset
2 changes: 1 addition & 1 deletion .github/workflows/check_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def doit(castro_dir):
# remove comments
idx = line.find("#")
if idx > 0:
line = line[idx:]
line = line[:idx]

found_param = pattern.match(line)
if not found_param:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/check_pr_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: check PR branch

on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited

jobs:
check-PR-branch:
runs-on: ubuntu-latest
steps:
- name: PRs should not target main
run: |
if [[ "${{ github.base_ref }}" == "main" ]]; then
echo 'Pull requests must not be made against main. Please target development instead.'
exit 1
fi
23 changes: 19 additions & 4 deletions .github/workflows/dependencies_hip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,23 @@ set -eu -o pipefail
# failed files the given number of times.
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries

# Ref.: https://rocmdocs.amd.com/en/latest/Installation_Guide/Installation-Guide.html#ubuntu
# Ref.: https://rocm.docs.amd.com/projects/install-on-linux/en/latest/how-to/native-install/ubuntu.html

# Make the directory if it doesn't exist yet.
# This location is recommended by the distribution maintainers.
sudo mkdir --parents --mode=0755 /etc/apt/keyrings

# Download the key, convert the signing-key to a full
# keyring required by apt and store in the keyring directory
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null

curl -O https://repo.radeon.com/rocm/rocm.gpg.key
sudo apt-key add rocm.gpg.key
echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${1-debian}/ ubuntu main" \

source /etc/os-release # set UBUNTU_CODENAME: focal or jammy or ...

echo "deb [arch=amd64] https://repo.radeon.com/rocm/apt/${1-latest} ${UBUNTU_CODENAME} main" \
| sudo tee /etc/apt/sources.list.d/rocm.list
echo 'export PATH=/opt/rocm/llvm/bin:/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin:$PATH' \
| sudo tee -a /etc/profile.d/rocm.sh
Expand All @@ -43,8 +56,10 @@ sudo apt-get install -y --no-install-recommends \
roctracer-dev \
rocprofiler-dev \
rocrand-dev \
rocprim-dev \
hiprand-dev
rocprim-dev

# hiprand-dev is a new package that does not exist in old versions
sudo apt-get install -y --no-install-recommends hiprand-dev || true

# activate
#
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/flame_wave-compare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Run flame_wave
run: |
cd Exec/science/flame_wave
./Castro2d.gnu.DEBUG.ex inputs_2d.testsuite max_step=2 castro.sum_interval=1 amr.plot_files_output=0 amr.checkpoint_files_output=0
./Castro2d.gnu.DEBUG.ex inputs_2d.testsuite max_step=2 castro.sum_interval=1 amr.plot_files_output=1 amr.checkpoint_files_output=0
- name: Check grid_diag.out
run: |
Expand All @@ -47,3 +47,10 @@ jobs:
run: |
cd Exec/science/flame_wave
diff species_diag.out ci-benchmarks/species_diag.out
- name: Check job_info parameters
run: |
cd Exec/science/flame_wave
line_no=`grep -n "Inputs File Parameters" plt00000/job_info | cut -d ":" -f 1`
tail -n +$(($line_no -1)) plt00000/job_info > tmp.txt
diff tmp.txt ci-benchmarks/job_info_params.txt
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: ./deploy_docs_action.sh

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/good_defines.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
ALLOW_GPU_PRINTF
AMREX_DEBUG
AMREX_PARTICLES
AMREX_SPACEDIM
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/style/check_trailing_whitespaces.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ find . -type d \( -name .git \
-o -path ./paper \
-o -name build -o -name install \
-o -name tmp_build_dir -o -name tmp_install_dir \
-o -name ci-benchmarks \
-o -path ./util/gcem \
\) -prune -o \
-type f \( \( -name "*.H" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wdmerger_collision-compare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ jobs:
- name: Check the extrema
run: |
cd Exec/science/wdmerger
../../../external/amrex/Tools/Plotfile/fextrema.gnu.ex plt00095 > fextrema.out
../../../external/amrex/Tools/Plotfile/fextrema.gnu.ex plt00086 > fextrema.out
diff fextrema.out ci-benchmarks/wdmerger_collision_2D.out
5 changes: 5 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"name": "Bell, John",
"orcid": "0000-0002-5749-334X"
},
{
"affiliation": "Department of Physics and Astronomy, Stony Brook University",
"name": "Chen, Zhi",
"orcid": "0000-0002-2839-107X"
},
{
"name": "Harpole, Alice",
"orcid": "0000-0002-1530-781X"
Expand Down
106 changes: 106 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,109 @@
# 24.09

* Code clean-ups / clang-tidy (#2942, #2949)

* update the `hse_convergence` readme to reflect current convergence
(#2946)

* update the `bubble_convergence` plotting script (#2947)

* new Frontier scaling numbers (#2948)

* more GPU error printing (@3944)

* science problem updates: `flame_wave` (#2943)

* documentation updates (#2939)

# 24.08

* lazy QueueReduction has been enabled for the timing diagnostics
(#2926)

* The `job_info` file output now correctly labels the compute time
as GPU-hours instead of CPU-hours when running on GPUs (#2930)

* We can now output warnings when running on GPUs if you build
with `USE_GPU_PRINTF=TRUE`(#2923, #2928)

* Code clean-ups / sync with Microphysics (#2900, #2901, #2905,
#2906, #2909, #2912, #2919, #2922, #2932, #2933, #2936, #2938,
#2940)

* The area weighting in the diagnostics in `subch_planar` was fixed
(#2885)

* A script to produce a resolution study for the `circular_det`
problem was added (#2857)

* science problem updates: `xrb_layered` (#2917), `nova` (#2913),
`wdmerger` (#2907, #2918, #2931), `Detonation` (#2902)

* updated scaling results on Frontier (#2904, #2914, #2915)

* more exact Riemann solver clean-up (#2896, #2897, #2898)
and clean-ups to the two shock solvers (#2895)

* fix issues with eigenvectors and clang-tidy in the MHD solver
(#2880)

# 24.07

* Reorganizing of the existing 2-shock and HLL Riemann solvers
(#2887, #2888, #2889, #2890)

* Some clean-up, accuracy improvements, and optimization of the
exact Riemann solver in preparation for coupling it to simulations
(#2868, #2869, #2875)

* a new problem setup, `subch_planar`, for exploring He detonations
(#2870, #2873, #2881, #2883, #2886, #2877, #2878)

* clean-up the computation of the shock variable for hybrid Riemann
solves (#2865)

* code clean-ups (#2852, #2871, #2891)

* documentation improvements (#2843, #2879)

* add an EditorConfig (#2872)

* add the circular detonation problem to test multidimensional shock
algorithms (#2858)

# 24.06

* Doc updates (#2839, #2842, #2846, #2851, #2854, #2860)

* Sync problem and Castro runtime parameters to recent Microphysics
changes (#2838, #2845, #2861)

* fix parsing in the `check_params.py` script (#2850)

* code cleaning (#2840, #2842, #2843)

# 24.05

* Changed how the shock flag is computed. It is now computed once,
at the start of a timestep. It also takes into account sources
such that the pressure jump is only the pressure that is available
to drive a shock. (#2726, #2728)

* Fixed a boundary condition check in gravity (#2833)

* Some coverity and clang-tidy fixes (#2810, #2811, #2835, #2831,
#2832)

* Fix the wdmerger initialization when the two stars are overlapping
(#2829)

* Fixed the Castro retry mechanism when amr.subcycling_mode = None
(#2821, #2824, #2826)

* Added more amr parameters to the `job_info` file (#2828)

* Added OpenMP to the SDC burn loop (#2770)

# 24.04

* Some clang-tidy fixes (#2779, #2780, #2781, #2784, #2786, #2787, #2790,
Expand Down
2 changes: 0 additions & 2 deletions Diagnostics/DustCollapse/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ USE_OMP = FALSE

USE_REACT = FALSE

USE_ACC = FALSE

# programs to be compiled
ALL: dustcollapse_$(DIM)d.ex

Expand Down
2 changes: 0 additions & 2 deletions Diagnostics/Radiation/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ USE_OMP = FALSE

USE_REACT = FALSE

USE_ACC = FALSE

ALL: radhelp

radhelp:
Expand Down
2 changes: 0 additions & 2 deletions Diagnostics/Sedov/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ USE_OMP = FALSE

USE_REACT = FALSE

USE_ACC = FALSE

# programs to be compiled
ALL: sedov_$(DIM)d.ex

Expand Down
2 changes: 1 addition & 1 deletion Docs/source/Hydrodynamics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ behavior:
Compute Primitive Variables
---------------------------

We compute the primtive variables from the conserved variables.
We compute the primitive variables from the conserved variables.

- :math:`\rho, \rho e`: directly copy these from the conserved state
vector
Expand Down
2 changes: 1 addition & 1 deletion Docs/source/Verification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ test problem. A hot sphere is centered at the origin in a spherical
geometry. The spectrum from this sphere follows a Planck
distribution. The ambient medium is at a much lower temperature. A
frequency-dependent opacity makes the domain optically thin for high
frequecies and optically thick for low frequency. At long times, the
frequencies and optically thick for low frequency. At long times, the
solution will be a combination of the blackbody radiation from the
ambient medium plus the radiation that propagated from the hot sphere.
An analytic solution exists :cite:`graziani:2008` which gives the
Expand Down
8 changes: 7 additions & 1 deletion Docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_version():

# General information about the project.
project = 'Castro'
copyright = '2018-2022, Castro development team'
copyright = '2018-2024, Castro development team'
author = 'Castro development team'

html_logo = "castro_logo_hot_200.png"
Expand Down Expand Up @@ -218,6 +218,12 @@ def get_version():
]


# -- Options for linkcheck

linkcheck_retries = 3
linkcheck_timeout = 100


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
Expand Down
Loading

0 comments on commit b4acb17

Please sign in to comment.