Skip to content

Commit e2ceaf5

Browse files
Working 0-1D Chemistry (among other things) (#653)
Co-authored-by: Dimitrios Adam <[email protected]> Co-authored-by: Henry Le Berre <[email protected]>
1 parent 8bddd33 commit e2ceaf5

Some content is hidden

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

84 files changed

+3459
-1018
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'

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
133133
-fimplicit-none
134134
#-ffpe-trap=invalid,zero,denormal,overflow
135135
-fsignaling-nans
136+
-finit-real=snan
137+
-finit-integer=-99999999
136138
)
137139
endif()
138140

README.md

Lines changed: 1 addition & 1 deletion
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
```

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

docs/documentation/case.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,26 @@ Input files can accept command line arguments, forwarded by `mfc.sh run`.
3434
Consider this example from the `scaling` case:
3535

3636
```python
37-
import argparse
37+
import json, argparse
3838

3939
parser = argparse.ArgumentParser(
4040
prog="scaling",
4141
description="Weak- and strong-scaling benchmark case.",
4242
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
4343

44-
parser.add_argument("dict", type=str, metavar="DICT")
45-
parser.add_argument("-s", "--scaling", type=str, metavar="SCALING", choices=["weak", "strong"], help="Whether weak- or strong-scaling is being exercised.")
44+
parser.add_argument("--mfc", type=json.loads, default='{}', metavar="DICT",
45+
help="MFC's toolchain's internal state.")
46+
parser.add_argument("-s", "--scaling", type=str, metavar="SCALING", choices=["weak", "strong"],
47+
help="Whether weak- or strong-scaling is being exercised.")
4648

4749
# Your parsed arguments are here
4850
args = parser.parse_args()
4951
```
5052

51-
The first argument is always a JSON string representing `mfc.sh run`'s internal
52-
state.
53+
The `--mfc` argument is a JSON string representing `mfc.sh run`'s internal
54+
state, passed in when MFC runs your input file.
5355
It contains all the runtime information you might want from the build/run system.
54-
You can add as many additional arguments as you may need.
56+
You can add as many additional arguments and options as you may need.
5557

5658
To run such a case, use the following format:
5759

docs/documentation/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ before configuring your environment:
106106

107107
```shell
108108
brew install coreutils python cmake fftw hdf5 gcc boost open-mpi
109-
echo -e 'export BOOST_INCLUDE=/opt/homebrew/' | tee -a ~/.bash_profile ~/.zshrc
109+
echo -e "export BOOST_INCLUDE='$(brew --prefix --installed boost)/include'" | tee -a ~/.bash_profile ~/.zshrc
110110
. ~/.bash_profile 2>/dev/null || . ~/.zshrc 2>/dev/null
111111
! [ -z "${BOOST_INCLUDE+x}" ] && echo 'Environment is ready!' || echo 'Error: $BOOST_INCLUDE is unset. Please adjust the previous commands to fit with your environment.'
112112
```

0 commit comments

Comments
 (0)