-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into codespell_update
- Loading branch information
Showing
257 changed files
with
21,978 additions
and
9,344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: check runtime params | ||
|
||
on: | ||
push: | ||
branches: | ||
- development | ||
- main | ||
pull_request: | ||
branches: | ||
- development | ||
|
||
jobs: | ||
check-runtime-params: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get submodules | ||
run: | | ||
git submodule update --init | ||
cd external/Microphysics | ||
git fetch; git checkout development | ||
cd ../amrex | ||
git fetch; git checkout development | ||
cd ../.. | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Run check-params | ||
run: | | ||
PYTHONPATH=external/Microphysics/util/build_scripts python .github/workflows/check_params.py . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import argparse | ||
import importlib | ||
import os | ||
import re | ||
from pathlib import Path | ||
import sys | ||
|
||
# some parameters that are not defined in _cpp_parameters | ||
|
||
whitelist = ["maestro.lo_bc", | ||
"maestro.hi_bc"] | ||
|
||
# we don't have all of the radiation parametrs in the _cpp_parameters | ||
# yet, so we won't check these namespaces | ||
|
||
namespace_ignore = [] | ||
|
||
def doit(maestroex_dir): | ||
|
||
maestroex = Path(os.path.abspath(maestroex_dir)) | ||
|
||
# import the module that defines the MAESTROeX runtime params | ||
sys.path.append(str(maestroex / "Source" / "param/")) | ||
import parse_maestro_params | ||
|
||
# read in the parameters defined in _cpp_parameters | ||
param_file = maestroex / "Source" / "param" / "_cpp_parameters" | ||
params = parse_maestro_params.read_param_file(str(param_file)) | ||
|
||
namespaces = set(p.namespace for p in params) | ||
runtime_parameters = [f"{p.namespace}.{p.name}" for p in params] | ||
|
||
pattern = re.compile(r"[A-Za-z0-9_]+\.[A-Za-z0-9_]+", re.IGNORECASE) | ||
|
||
# loop over all the inputs files | ||
exec_path = maestroex / "Exec" | ||
for f in exec_path.glob("**/inputs*"): | ||
|
||
if os.path.isdir(f): | ||
continue | ||
|
||
# find all the params in each namespace | ||
with open(f) as infile: | ||
print(f"working on {f}") | ||
for line in infile: | ||
# remove comments | ||
idx = line.find("#") | ||
if idx > 0: | ||
line = line[:idx] | ||
|
||
found_param = pattern.match(line) | ||
if not found_param: | ||
continue | ||
|
||
p = found_param.group(0) | ||
nm = p.split(".")[0] | ||
if nm in namespaces and nm not in namespace_ignore: | ||
if not (p in runtime_parameters or p in whitelist): | ||
sys.exit(f"Error: {p} not valid") | ||
|
||
|
||
if __name__ == "__main__": | ||
|
||
# we need the top-level MAESTROeX directory | ||
|
||
p = argparse.ArgumentParser() | ||
p.add_argument("maestroex_dir", type=str, nargs=1, | ||
help="top level MAESTROeX directory") | ||
|
||
args = p.parse_args() | ||
|
||
doit(args.maestroex_dir[0]) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: "clang-tidy" | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
clang_tidy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get submodules | ||
run: | | ||
git submodule update --init | ||
cd external/Microphysics | ||
git fetch; git checkout development | ||
echo "MICROPHYSICS_HOME=$(pwd)" >> $GITHUB_ENV | ||
cd ../amrex | ||
git fetch; git checkout development | ||
echo "AMREX_HOME=$(pwd)" >> $GITHUB_ENV | ||
cd ../.. | ||
- name: Install dependencies | ||
run: | | ||
.github/workflows/dependencies_clang-tidy-apt-llvm.sh 17 | ||
- name: Compile wdconvect | ||
run: | | ||
echo $AMREX_HOME | ||
echo $MICROPHYSICS_HOME | ||
cd Exec/science/wdconvect | ||
make USE_MPI=FALSE USE_OMP=FALSE USE_CLANG_TIDY=TRUE CLANG_TIDY=clang-tidy-17 CLANG_TIDY_WARN_ERROR=TRUE -j 4 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: "compiler warnings" | ||
|
||
on: [pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
compiler_warnings: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get submodules | ||
run: | | ||
git submodule update --init | ||
cd external/Microphysics | ||
git fetch; git checkout development | ||
cd ../amrex | ||
git fetch; git checkout development | ||
cd ../.. | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update -y -qq | ||
sudo apt-get -qq -y install curl g++>=9.3.0 | ||
- name: Compile wdconvect | ||
run: | | ||
cd Exec/science/wdconvect | ||
make USE_MPI=FALSE USE_OMP=FALSE DEBUG=TRUE WARN_ALL=TRUE WARN_ERROR=TRUE -j 4 | ||
- name: Compile reacting_bubble | ||
run: | | ||
cd Exec/test_problems/reacting_bubble | ||
make USE_MPI=FALSE USE_OMP=FALSE DEBUG=TRUE DIM=2 WARN_ALL=TRUE WARN_ERROR=TRUE -j 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: wdconvect | ||
|
||
on: [pull_request] | ||
jobs: | ||
wdconvect-3d: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get submodules | ||
run: | | ||
git submodule update --init | ||
cd external/Microphysics | ||
git fetch; git checkout development | ||
cd ../amrex | ||
git fetch; git checkout development | ||
cd ../.. | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update -y -qq | ||
sudo apt-get -qq -y install curl g++>=9.3.0 | ||
- name: Compile wdconvect | ||
run: | | ||
cd Exec/science/wdconvect | ||
make USE_OMP=FALSE USE_MPI=FALSE -j 4 | ||
- name: Run wdconvect | ||
run: | | ||
cd Exec/science/wdconvect | ||
cp model_files/kepler_new_6.25e8.hybrid.hse.320 . | ||
cp inputs_files/inputs_3d_regression.2levels . | ||
./Maestro3d.gnu.ex inputs_3d_regression.2levels | ||
- name: Build the fextrema tool | ||
run: | | ||
cd external/amrex/Tools/Plotfile | ||
make programs=fextrema -j 4 | ||
- name: Check the extrema | ||
run: | | ||
cd Exec/science/wdconvect | ||
../../../external/amrex/Tools/Plotfile/fextrema.gnu.ex wdconvect_plt0000003 > fextrema.out | ||
diff fextrema.out ci-benchmarks/wdconvect_3d_extrema.out | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.