Skip to content

Commit b64ec96

Browse files
committed
Merge remote-tracking branch 'upstream' into bugFixes
2 parents 121ddeb + 4833971 commit b64ec96

File tree

358 files changed

+15348
-6649
lines changed

Some content is hidden

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

358 files changed

+15348
-6649
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ jobs:
8888
/bin/bash mfc.sh test -j $(nproc) $OPT1 $OPT2
8989
env:
9090
OPT1: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }}
91-
OPT2: ${{ matrix.debug == 'debug' && '-% 75' || '' }}
91+
OPT2: ${{ matrix.debug == 'debug' && '-% 20' || '' }}
92+
93+
- name: Ensure empty diff
94+
run: git diff --exit-code tests/
9295

9396
docker:
9497
name: Github | Docker
@@ -100,6 +103,9 @@ jobs:
100103
- name: Test
101104
run: sudo ./mfc.sh docker ./mfc.sh test -j $(nproc) -a
102105

106+
- name: Ensure empty diff
107+
run: git diff --exit-code tests/
108+
103109
self:
104110
name: Georgia Tech | Phoenix (NVHPC)
105111
if: github.repository == 'MFlowCode/MFC'
@@ -125,8 +131,10 @@ jobs:
125131
mv misc/run-phoenix-release-${{ matrix.device }}.sh ./
126132
sbatch run-phoenix-release-${{ matrix.device }}.sh
127133
134+
- name: Ensure empty diff
135+
run: exit $(git status --porcelain tests/ | wc -l)
136+
128137
- name: Print
129138
if: always()
130139
run: |
131140
cat test.out
132-

.github/workflows/lint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
6+
pull_request:
7+
8+
workflow_dispatch:
9+
10+
jobs:
11+
docs:
12+
name: Lint Toolchain
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Lint the toolchain
19+
run: ./mfc.sh lint

.github/workflows/pretty.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Pretty
2+
3+
on:
4+
push:
5+
6+
pull_request:
7+
8+
workflow_dispatch:
9+
10+
jobs:
11+
docs:
12+
name: Code formatting
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Check formatting
19+
run: |
20+
./mfc.sh format
21+
git diff --exit-code

.github/workflows/spelling.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Spell Check
2+
on:
3+
push:
4+
workflow_dispatch:
5+
6+
jobs:
7+
run:
8+
name: Spell Check
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
14+
- name: Spell Check
15+
uses: crate-ci/typos@master

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ __pycache__
2828

2929
docs/*/initial*
3030
docs/*/result*
31+
docs/documentation/*-example.png
3132
docs/documentation/examples.md
3233

3334
examples/*batch/*/

.typos.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[default]
2+
extend-ignore-identifiers-re = [
3+
"AttributeID.*Supress.*",
4+
]
5+
6+
[default.extend-identifiers]
7+
AttributeIDSupressMenu = "AttributeIDSupressMenu"
8+
9+
[default.extend-words]
10+
INOUT = "INOUT"
11+
WRONLY = "WRONLY"
12+
nd = "nd"
13+
# Childs = "Childs"
14+
# myu = "myu"
15+
16+
17+
18+
[files]
19+
extend-exclude = ["docs/documentation/references*", "tests/"]

CMakeLists.txt

Lines changed: 51 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,18 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
6565
endif()
6666
elseif ((CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_Fortran_COMPILER_ID STREQUAL "PGI"))
6767
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 21.7)
68-
message(FATAL_ERROR "${__err_msg}ERROR: NVHPC v21.7 or newer is required to build MFC.")
68+
message(FATAL_ERROR "${__err_msg}ERROR: When using NVHPC, v21.7 or newer is required to build MFC.")
69+
endif()
70+
if (MAKE_BUILD_TYPE STREQUAL "Debug")
71+
if (MFC_OpenACC)
72+
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 23.0)
73+
message(FATAL_ERROR "${__err_msg}ERROR: When using NVHPC, v23.0 or newer is required to build MFC with Debug and GPU options.")
74+
endif()
75+
else()
76+
if (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 23.8)
77+
message(FATAL_ERROR "${__err_msg}ERROR: Debug is not working with NVHPC 23.X and older and CPU options at present.")
78+
endif()
79+
endif()
6980
endif()
7081
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "AppleClang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
7182
message(FATAL_ERROR "${__err_msg}ERROR: MFC does not support the Apple Clang compilers. Please consult the documentation.")
@@ -145,7 +156,7 @@ elseif ((CMAKE_Fortran_COMPILER_ID STREQUAL "NVHPC") OR (CMAKE_Fortran_COMPILER_
145156
endif()
146157

147158
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
148-
add_compile_options(-C -g -traceback -Mchkptr -Mchkstk -Minform=inform -Mbounds)
159+
add_compile_options(-C -g -O0 -traceback -Mchkptr -Mchkstk -Minform=inform -Mbounds)
149160
endif()
150161
endif()
151162

@@ -229,6 +240,8 @@ macro(HANDLE_SOURCES target useCommon)
229240
set(${target}_DIR "${CMAKE_SOURCE_DIR}/src/${target}")
230241
set(common_DIR "${CMAKE_SOURCE_DIR}/src/common")
231242

243+
string(TOUPPER ${target} ${target}_UPPER)
244+
232245
# Gather src/[<target>,common]/*.f90
233246
file(GLOB ${target}_F90s CONFIGURE_DEPENDS "${${target}_DIR}/*.f90")
234247
set(${target}_SRCs ${${target}_F90s})
@@ -245,9 +258,9 @@ macro(HANDLE_SOURCES target useCommon)
245258
endif()
246259

247260
# Locate src/[<target>,common]/include/*.fpp
248-
if (EXISTS "${${target}_DIR}/include")
249-
file(GLOB ${target}_incs CONFIGURE_DEPENDS "${${target}_DIR}/include/*.fpp")
250-
endif()
261+
file(GLOB ${target}_incs CONFIGURE_DEPENDS "${${target}_DIR}/include/*.fpp"
262+
"${CMAKE_CURRENT_BINARY_DIR}/include/*.fpp")
263+
251264
if (${useCommon})
252265
file(GLOB common_incs CONFIGURE_DEPENDS "${common_DIR}/include/*.fpp")
253266
list(APPEND ${target}_incs ${common_incs})
@@ -261,11 +274,14 @@ macro(HANDLE_SOURCES target useCommon)
261274
add_custom_command(
262275
OUTPUT ${f90}
263276
COMMAND ${FYPP_EXE} -m re
264-
-I "${common_DIR}"
265-
-I "${common_DIR}/include"
277+
-I "${CMAKE_CURRENT_BINARY_DIR}/include"
266278
-I "${${target}_DIR}/include"
279+
-I "${common_DIR}/include"
280+
-I "${common_DIR}"
267281
-D MFC_${CMAKE_Fortran_COMPILER_ID}
282+
-D MFC_${${target}_UPPER}
268283
-D MFC_COMPILER="${CMAKE_Fortran_COMPILER_ID}"
284+
-D MFC_CASE_OPTIMIZATION=False
269285
--line-numbering
270286
--no-folding
271287
"${fpp}" "${f90}"
@@ -317,10 +333,10 @@ function(MFC_SETUP_TARGET)
317333
"${CMAKE_SOURCE_DIR}/src/${ARGS_TARGET}/include")
318334
endif()
319335

320-
string(TOUPPER "${ARGS_TARGET}" ARGS_TARGET_UPPER)
336+
string(TOUPPER "${ARGS_TARGET}" ${ARGS_TARGET}_UPPER)
321337
target_compile_definitions(
322338
${ARGS_TARGET} PRIVATE MFC_${CMAKE_Fortran_COMPILER_ID}
323-
MFC_${ARGS_TARGET_UPPER}
339+
MFC_${${ARGS_TARGET}_UPPER}
324340
)
325341

326342
if (MFC_MPI AND ARGS_MPI)
@@ -430,6 +446,20 @@ if (MFC_SYSCHECK)
430446
endif()
431447

432448
if (MFC_DOCUMENTATION)
449+
# Files in examples/ are used to generate docs/documentation/examples.md
450+
file(GLOB_RECURSE examples_DOCs CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/examples/*")
451+
452+
add_custom_command(
453+
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/examples.md"
454+
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/docs/examples.sh;${examples_DOCs}"
455+
COMMAND "bash" "${CMAKE_CURRENT_SOURCE_DIR}/docs/examples.sh"
456+
"${CMAKE_CURRENT_SOURCE_DIR}"
457+
COMMENT "Generating examples.md"
458+
VERBATIM
459+
)
460+
461+
file(GLOB common_DOCs CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/docs/*")
462+
433463
# GEN_DOCS: Given a target name (herein <target>), this macro sets up a
434464
# target, <target>_docs, that generates documentation for <target> using
435465
# Doxygen. It is then added as a dependency of the documentation target.
@@ -456,13 +486,20 @@ if (MFC_DOCUMENTATION)
456486
"${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile.in"
457487
"${CMAKE_CURRENT_BINARY_DIR}/${target}-Doxyfile" @ONLY)
458488

489+
set(opt_example_dependency "")
490+
if (${target} STREQUAL documentation)
491+
set(opt_example_dependency "${CMAKE_CURRENT_SOURCE_DIR}/docs/documentation/examples.md")
492+
endif()
493+
494+
file(GLOB_RECURSE ${target}_DOCs CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/docs/${target}/*")
495+
list(APPEND ${target}_DOCs "${common_DOCs}")
496+
459497
add_custom_command(
460498
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${target}/html/index.html"
461499
DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${target}-Doxyfile"
462-
"${${target}_SRCs}"
463-
COMMAND "bash" "${CMAKE_CURRENT_SOURCE_DIR}/docs/examples.sh"
464-
"${CMAKE_CURRENT_SOURCE_DIR}" &&
465-
"${DOXYGEN_EXECUTABLE}" "${target}-Doxyfile"
500+
"${opt_example_dependency}"
501+
"${${target}_SRCs}" "${${target}_DOCs}"
502+
COMMAND "${DOXYGEN_EXECUTABLE}" "${target}-Doxyfile"
466503
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
467504
COMMENT "${target}: Generating documentation"
468505
)
@@ -487,7 +524,7 @@ if (MFC_DOCUMENTATION)
487524
ExternalProject_Add(doxygen-awesome-css
488525
PREFIX doxygen-awesome-css
489526
GIT_REPOSITORY "https://github.com/jothepro/doxygen-awesome-css"
490-
GIT_TAG "df83fbf22cfff76b875c13d324baf584c74e96d0"
527+
GIT_TAG "df88fe4fdd97714fadfd3ef17de0b4401f804052"
491528
CONFIGURE_COMMAND ""
492529
BUILD_COMMAND ""
493530
INSTALL_COMMAND ""

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Computational Physics Group at Georgia Tech (Spencer Bryngelson)
3+
Copyright (c) 2021 Spencer Bryngelson, Tim Colonius
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
66

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
<p align="justify">
2020
Welcome to the home of MFC!
2121
MFC simulates compressible multi-component and multi-phase flows, amongst other things.
22-
It scales ideally to tens of thousands of GPUs.
22+
It scales ideally to tens of thousands of GPUs on NVIDIA- and AMD-GPU Machines, like OLCF Summit and Frontier.
23+
As such, it is an exascale CFD codebase.
2324
MFC is written in Fortran and makes use of metaprogramming to keep the codebase readable.
24-
Please contact the developers, like <a href="mailto:shb@gatech.edu">Spencer</a>, if you have questions.
25-
We have an active Slack channel to help ease in new MFC users and support development.
25+
Don't hesitate to get in touch with the developers, like <a href="mailto:shb@gatech.edu">Spencer</a>, if you have questions.
26+
We have an active Slack channel to help ease new MFC users and support development.
2627

2728
MFC has API and high-level documentation on [its website](https://mflowcode.github.io/).
2829
The latter is also available [here](docs/documentation/readme.md).

docs/documentation/authors.md

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
11
## Authors
22

3-
MFC was first developed by the Colonius research group at Caltech.
4-
Now it is developed and maintained by the groups of Professors <a href="https://comp-physics.group">Spencer Bryngelson</a>, <a href="https://colonius.caltech.edu/">Tim Colonius</a>, and <a href="https://vivo.brown.edu/display/mrodri97">Mauro Rodriguez</a> (alphabetical).
5-
6-
We try to maintain a list of current and past developers:
7-
8-
+ S. Bryngelson
9-
+ T. Colonius
10-
+ V. Coralic
11-
+ H. Le Berre
12-
+ K. Maeda
13-
+ J. Meng
14-
+ F. O'Meally
15-
+ A. Radhakrishnan
16-
+ J. Rodolfo Chreim
17-
+ M. Rodriguez
18-
+ K. Schmidmayer
19-
+ J. Spratt
20-
+ B. Wilfong
3+
Contributors to MFC since 2019 can be [viewed here](https://github.com/MFlowCode/MFC/graphs/contributors).

0 commit comments

Comments
 (0)