Skip to content

Commit 8952248

Browse files
authored
Merge branch 'master' into add-modular-precision-update
2 parents b10d9fa + 6bad379 commit 8952248

File tree

142 files changed

+6699
-1672
lines changed

Some content is hidden

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

142 files changed

+6699
-1672
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ CMakeLists.txt @sbryngelson @henryleberre
1313
.vscode/ @sbryngelson @henryleberre
1414
.github/workflows/ @sbryngelson @henryleberre
1515

16+
# Spencer H. Bryngelson & Ben Wilfong
17+
.typos.toml @sbryngelson @wilfonba

.github/file-filter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fortran_src: &fortran_src
77

88
python_src: &python_src
99
- '**/*.py'
10-
- 'toolchain/requirements.txt'
10+
- 'toolchain/pyproject.toml'
1111

1212
cmakelist: &cmakelist
1313
- 'CMakeLists.txt'
Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Cleanness
1+
name: Cleanliness
22

33
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
6-
cleanness:
7-
name: Code Cleanness Test
6+
cleanliness:
7+
name: Code Cleanliness Test
88
runs-on: "ubuntu-latest"
99
env:
1010
pr_everything: 0
@@ -25,7 +25,6 @@ jobs:
2525
run: |
2626
sudo apt update -y
2727
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
28-
2928
3029
- name: Build
3130
run: |
@@ -35,59 +34,67 @@ jobs:
3534
sed -i '/\/master\//d' master.txt
3635
3736
- name: Unused Variables Diff
37+
continue-on-error: true
3838
run: |
39-
grep -F 'Wunused-variable' master.txt -B 4 > mUnused.txt
40-
grep -F 'Wunused-variable' pr.txt -B 4 > prUnused.txt
41-
diff prUnused.txt mUnused.txt || true
39+
grep -F 'Wunused-variable' master.txt > mUnused.txt
40+
grep -F 'Wunused-variable' pr.txt > prUnused.txt
41+
diff prUnused.txt mUnused.txt
4242
4343
- name: Unused Dummy Arguments Diff
44+
continue-on-error: true
4445
run: |
45-
grep -F 'Wunused-dummy-argument' pr.txt -B 4 > prDummy.txt
46-
grep -F 'Wunused-dummy-argument' master.txt -B 4 > mDummy.txt
47-
diff prDummy.txt mDummy.txt || true
46+
grep -F 'Wunused-dummy-argument' pr.txt > prDummy.txt
47+
grep -F 'Wunused-dummy-argument' master.txt > mDummy.txt
48+
diff prDummy.txt mDummy.txt
4849
4950
- name: Unused Value Diff
51+
continue-on-error: true
5052
run: |
51-
grep -F 'Wunused-value' pr.txt -B 4 > prUnused_val.txt
52-
grep -F 'Wunused-value' master.txt -B 4 > mUnused_val.txt
53-
diff prUnused_val.txt mUnused_val.txt || true
53+
grep -F 'Wunused-value' pr.txt > prUnused_val.txt
54+
grep -F 'Wunused-value' master.txt > mUnused_val.txt
55+
diff prUnused_val.txt mUnused_val.txt
5456
5557
- name: Maybe Uninitialized Variables Diff
58+
continue-on-error: true
5659
run: |
57-
grep -F 'Wmaybe-uninitialized' pr.txt -B 4 > prMaybe.txt
58-
grep -F 'Wmaybe-uninitialized' master.txt -B 4 > mMaybe.txt
59-
diff prMaybe.txt mMaybe.txt || true
60+
grep -F 'Wmaybe-uninitialized' pr.txt > prMaybe.txt
61+
grep -F 'Wmaybe-uninitialized' master.txt > mMaybe.txt
62+
diff prMaybe.txt mMaybe.txt
6063
6164
6265
- name: Everything Diff
66+
continue-on-error: true
6367
run: |
64-
grep '\-W' pr.txt -B 4 > pr_every.txt
65-
grep '\-W' master.txt -B 4 > m_every.txt
66-
diff pr_every.txt m_every.txt || true
68+
grep '\-W' pr.txt > pr_every.txt
69+
grep '\-W' master.txt > m_every.txt
70+
diff pr_every.txt m_every.txt
6771
6872
- name: List of Warnings
6973
run: |
7074
cat pr_every.txt
7175
7276
7377
- name: Summary
78+
continue-on-error: true
7479
run: |
75-
pr_variable=$(grep -c -F 'Wunused-variable' pr.txt -B 4)
76-
pr_argument=$(grep -c -F 'Wunused-dummy-argument' pr.txt -B 4)
77-
pr_value=$(grep -c -F 'Wunused-value' pr.txt -B 4)
78-
pr_uninit=$(grep -c -F 'Wmaybe-uninitialized' pr.txt -B 4)
79-
pr_everything=$(grep -c '\-W' pr.txt -B 4)
80+
pr_variable=$(grep -c -F 'Wunused-variable' pr.txt)
81+
pr_argument=$(grep -c -F 'Wunused-dummy-argument' pr.txt)
82+
pr_value=$(grep -c -F 'Wunused-value' pr.txt)
83+
pr_uninit=$(grep -c -F 'Wmaybe-uninitialized' pr.txt)
84+
pr_everything=$(grep -c '\-W' pr.txt)
8085
81-
master_variable=$(grep -c -F 'Wunused-variable' master.txt -B 4)
82-
master_argument=$(grep -c -F 'Wunused-dummy-argument' master.txt -B 4)
83-
master_value=$(grep -c -F 'Wunused-value' master.txt -B 4)
84-
master_uninit=$(grep -c -F 'Wmaybe-uninitialized' master.txt -B 4)
85-
master_everything=$(grep -c '\-W' master.txt -B 4)
86+
master_variable=$(grep -c -F 'Wunused-variable' master.txt)
87+
master_argument=$(grep -c -F 'Wunused-dummy-argument' master.txt)
88+
master_value=$(grep -c -F 'Wunused-value' master.txt)
89+
master_uninit=$(grep -c -F 'Wmaybe-uninitialized' master.txt)
90+
master_everything=$(grep -c '\-W' master.txt )
8691
8792
echo "pr_everything=$pr_everything" >> $GITHUB_ENV
8893
echo "master_everything=$master_everything" >> $GITHUB_ENV
8994
90-
echo "Difference is how many warnings were added or removed from master to pr, negative numbers are better since you are removing warnings"
95+
echo "Difference is how many warnings were added or removed from master to PR."
96+
echo "Negative numbers are better since you are removing warnings."
97+
echo " "
9198
echo "Unused Variable Count: $pr_variable, Difference: $((pr_variable - master_variable))"
9299
echo "Unused Dummy Argument: $pr_argument, Difference: $((pr_argument - master_argument))"
93100
echo "Unused Value: $pr_value, Difference: $((pr_value - master_value))"
@@ -99,6 +106,5 @@ jobs:
99106
if: env.pr_everything > env.master_everything
100107
run: |
101108
echo "Difference between warning count in PR is greater than in master."
102-
exit 1
103109
104110

CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ elseif ((CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_Fortran_COMPILER_
7676
message(FATAL_ERROR "ERROR: When using NVHPC, v21.7 or newer is required to build MFC.\n${__err_msg}")
7777
endif()
7878

79-
if ((CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 23.11) AND (CMAKE_BUILD_TYPE STREQUAL "Debug") AND MFC_OpenACC)
80-
message(FATAL_ERROR "ERROR: When using NVHPC, MFC with Debug and GPU options requires NVHPC v23.11 or newer.\n${__err_msg}")
79+
if ((CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 24.5) AND (CMAKE_BUILD_TYPE STREQUAL "Debug") AND MFC_OpenACC)
80+
message(FATAL_ERROR "ERROR: When using NVHPC, MFC with Debug and GPU options requires NVHPC v24.5 or newer.\n${__err_msg}")
8181
endif()
8282
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
8383
message(FATAL_ERROR "ERROR: MFC does not support the Apple Clang compilers. Please consult the documentation.\n${__err_msg}")
@@ -223,7 +223,9 @@ if (CMAKE_BUILD_TYPE STREQUAL "Release")
223223
# Enable LTO/IPO if supported
224224
if (CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC")
225225
if (MFC_Unified)
226-
message(STATUS "IPO is not available with NVHPC using Unified Memory")
226+
message(STATUS "LTO/IPO is not available with NVHPC using Unified Memory")
227+
elseif(CMAKE_Fortran_COMPILER_VERSION VERSION_LESS "23.11")
228+
message(STATUS "LTO/IPO is not supported in NVHPC Version < 23.11. Use a newer version of NVHPC for best performance.")
227229
else()
228230
message(STATUS "Performing IPO using -Mextract followed by -Minline")
229231
set(NVHPC_USE_TWO_PASS_IPO TRUE)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ cd MFC
6868
```
6969
and be sure MFC knows where to find Boost by appending to your dotfiles and sourcing them again
7070
```shell
71-
echo -e 'export BOOST_INCLUDE=/opt/homebrew/' | tee -a ~/.bash_profile ~/.zshrc
71+
echo -e "export BOOST_INCLUDE='$(brew --prefix --installed boost)/include'" | tee -a ~/.bash_profile ~/.zshrc
7272
. ~/.bash_profile 2>/dev/null || . ~/.zshrc 2>/dev/null
7373
! [ -z "${BOOST_INCLUDE+x}" ] && echo 'Environment is ready!' || echo 'Error: $BOOST_INCLUDE is unset. Please adjust the previous commands to fit with your environment.'
7474
```
@@ -132,7 +132,7 @@ They are organized below. Just click the drop-downs!
132132

133133
* Shock and interface capturing schemes
134134
* First-order upwinding
135-
* WENO reconstructions of order 3 and 5
135+
* WENO reconstructions of order 3, 5, and 7
136136
* WENO variants: WENO-JS, WENO-M, WENO-Z, TENO
137137
* Monotonicity-preserving reconstructions
138138
* Reliable handling of high density ratios

benchmarks/5eq_rk3_weno3_hllc/case.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
description="This MFC case was created for the purposes of benchmarking MFC.",
1515
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1616

17-
parser.add_argument("dict", type=str, metavar="DICT", help=argparse.SUPPRESS)
18-
parser.add_argument("gbpp", type=int, metavar="MEM", default=16, help="Adjusts the problem size per rank to fit into [MEM] GB of GPU memory per GPU.")
17+
parser.add_argument("--mfc", type=json.loads, default='{}', metavar="DICT",
18+
help="MFC's toolchain's internal state.")
19+
parser.add_argument("--gbpp", type=int, metavar="MEM", default=16,
20+
help="Adjusts the problem size per rank to fit into [MEM] GB of GPU memory per GPU.")
1921

2022
ARGS = vars(parser.parse_args())
21-
DICT = json.loads(ARGS["dict"])
23+
DICT = ARGS["mfc"]
2224

2325
size = 1 if DICT["gpu"] else 0
2426

benchmarks/hypo_hll/case.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
description="This MFC case was created for the purposes of benchmarking MFC.",
1313
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1414

15-
parser.add_argument("dict", type=str, metavar="DICT", help=argparse.SUPPRESS)
16-
parser.add_argument("gbpp", type=int, metavar="MEM", default=16, help="Adjusts the problem size per rank to fit into [MEM] GB of GPU memory per GPU.")
15+
parser.add_argument("--mfc", type=json.loads, default='{}', metavar="DICT",
16+
help="MFC's toolchain's internal state.")
17+
parser.add_argument("--gbpp", type=int, metavar="MEM", default=16,
18+
help="Adjusts the problem size per rank to fit into [MEM] GB of GPU memory per GPU.")
1719

1820
ARGS = vars(parser.parse_args())
19-
DICT = json.loads(ARGS["dict"])
21+
DICT = ARGS["mfc"]
2022

2123
size = 1 if DICT["gpu"] else 0
2224

benchmarks/ibm/case.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
description="This MFC case was created for the purposes of benchmarking MFC.",
1212
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1313

14-
parser.add_argument("dict", type=str, metavar="DICT", help=argparse.SUPPRESS)
15-
parser.add_argument("gbpp", type=int, metavar="MEM", default=16, help="Adjusts the problem size per rank to fit into [MEM] GB of GPU memory per GPU.")
14+
parser.add_argument("--mfc", type=json.loads, default='{}', metavar="DICT",
15+
help="MFC's toolchain's internal state.")
16+
parser.add_argument("--gbpp", type=int, metavar="MEM", default=16,
17+
help="Adjusts the problem size per rank to fit into [MEM] GB of GPU memory per GPU.")
1618

1719
ARGS = vars(parser.parse_args())
18-
DICT = json.loads(ARGS["dict"])
20+
DICT = ARGS["mfc"]
1921

2022
size = 1 if DICT["gpu"] else 0
2123

benchmarks/viscous_weno5_sgb_acoustic/case.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616
description="This MFC case was created for the purposes of benchmarking MFC.",
1717
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
1818

19-
parser.add_argument("dict", type=str, metavar="DICT", help=argparse.SUPPRESS)
20-
parser.add_argument("gbpp", type=int, metavar="MEM", default=16, help="Adjusts the problem size per rank to fit into [MEM] GB of GPU memory per GPU.")
19+
parser.add_argument("--mfc", type=json.loads, default='{}', metavar="DICT",
20+
help="MFC's toolchain's internal state.")
21+
parser.add_argument("--gbpp", type=int, metavar="MEM", default=16,
22+
help="Adjusts the problem size per rank to fit into [MEM] GB of GPU memory per GPU.")
2123

2224
ARGS = vars(parser.parse_args())
23-
DICT = json.loads(ARGS["dict"])
25+
DICT = ARGS["mfc"]
2426

2527
size = 1 if DICT["gpu"] else 0
2628

0 commit comments

Comments
 (0)