Skip to content

Commit b4f7a16

Browse files
authored
Merge branch 'master' into sbryngelson-patch-1
2 parents 56f7c15 + 334046b commit b4f7a16

File tree

433 files changed

+774
-31967
lines changed

Some content is hidden

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

433 files changed

+774
-31967
lines changed

.github/workflows/docs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ jobs:
1111
docs:
1212
name: Build & Publish
1313
runs-on: ubuntu-latest
14-
14+
15+
if: github.repository == 'MFlowCode/MFC'
16+
concurrency:
17+
group: docs-publish
18+
cancel-in-progress: true
19+
1520
steps:
1621
- uses: actions/checkout@v3
1722

.github/workflows/links.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: LinkChecker
2+
3+
on: push
4+
5+
jobs:
6+
markdown-link-check:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@master
10+
- uses: gaurav-nelson/github-action-markdown-link-check@v1
11+
with:
12+
config-file: '.link_config.json'
13+
use-verbose-mode: 'yes'

.github/workflows/phoenix/submit.sh

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
usage() {
6+
echo "Usage: $0 [script.sh] [cpu|gpu]"
7+
}
8+
9+
if [ ! -z "$1" ]; then
10+
sbatch_script_contents=`cat $1`
11+
else
12+
usage
13+
exit 1
14+
fi
15+
16+
sbatch_cpu_opts="\
17+
#SBATCH -p cpu-small # partition
18+
#SBATCH --ntasks-per-node=24 # Number of cores per node required
19+
#SBATCH --mem-per-cpu=2G # Memory per core\
20+
"
21+
22+
sbatch_gpu_opts="\
23+
#SBATCH -CV100-16GB
24+
#SBATCH -G2\
25+
"
26+
27+
if [ "$2" == "cpu" ]; then
28+
sbatch_device_opts="$sbatch_cpu_opts"
29+
elif [ "$2" == "gpu" ]; then
30+
sbatch_device_opts="$sbatch_gpu_opts"
31+
else
32+
usage
33+
exit 1
34+
fi
35+
36+
job_slug="`basename "$1" | sed 's/\.sh$//' | sed 's/[^a-zA-Z0-9]/-/g'`-$2"
37+
38+
sbatch <<EOT
39+
#!/bin/bash
40+
#SBATCH -Jshb-$job_slug # Job name
41+
#SBATCH --account=gts-sbryngelson3 # charge account
42+
#SBATCH -N1 # Number of nodes required
43+
$sbatch_device_opts
44+
#SBATCH -t 04:00:00 # Duration of the job (Ex: 15 mins)
45+
#SBATCH -q embers # QOS Name
46+
#SBATCH -o$job_slug.out # Combined output and error messages file
47+
#SBATCH -W # Do not exit until the submitted job terminates.
48+
49+
set -e
50+
set -x
51+
52+
cd "\$SLURM_SUBMIT_DIR"
53+
echo "Running in $(pwd):"
54+
55+
job_slug="$job_slug"
56+
job_device="$2"
57+
58+
. ./mfc.sh load -c p -m $2
59+
60+
$sbatch_script_contents
61+
62+
EOT
63+

.github/workflows/phoenix/test.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
build_opts=""
4+
if [ "$job_device" == "gpu" ]; then
5+
build_opts="--gpu"
6+
fi
7+
8+
./mfc.sh build -j 8 $build_opts
9+
10+
n_test_threads=8
11+
12+
if [ "$job_device" == "gpu" ]; then
13+
gpu_count=$(nvidia-smi -L | wc -l) # number of GPUs on node
14+
gpu_ids=$(seq -s ' ' 0 $(($gpu_count-1))) # 0,1,2,...,gpu_count-1
15+
device_opts="-g $gpu_ids"
16+
n_test_threads=`expr $gpu_count \* 2`
17+
fi
18+
19+
./mfc.sh test -a -j $n_test_threads $device_opts -- -c phoenix
20+

.github/workflows/ci.yml renamed to .github/workflows/test.yml

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ jobs:
9090
OPT1: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }}
9191
OPT2: ${{ matrix.debug == 'debug' && '-% 20' || '' }}
9292

93-
- name: Ensure empty diff
94-
run: git diff --exit-code tests/
95-
9693
docker:
9794
name: Github | Docker
9895
runs-on: ubuntu-latest
@@ -103,9 +100,6 @@ jobs:
103100
- name: Test
104101
run: sudo ./mfc.sh docker ./mfc.sh test -j $(nproc) -a
105102

106-
- name: Ensure empty diff
107-
run: git diff --exit-code tests/
108-
109103
self:
110104
name: Georgia Tech | Phoenix (NVHPC)
111105
if: github.repository == 'MFlowCode/MFC'
@@ -120,21 +114,13 @@ jobs:
120114
- name: Clone
121115
uses: actions/checkout@v3
122116

123-
- name: Build
124-
run: |
125-
. ./mfc.sh load -c p -m gpu
126-
./mfc.sh build -j 2 $(if [ '${{ matrix.device }}' == 'gpu' ]; then echo '--gpu'; fi)
127-
128-
- name: Test
129-
run: |
130-
. ./mfc.sh load -c p -m gpu
131-
mv misc/run-phoenix-release-${{ matrix.device }}.sh ./
132-
sbatch run-phoenix-release-${{ matrix.device }}.sh
117+
- name: Build & Test
118+
run: bash .github/workflows/phoenix/submit.sh .github/workflows/phoenix/test.sh ${{ matrix.device }}
133119

134-
- name: Ensure empty diff
135-
run: exit $(git status --porcelain tests/ | wc -l)
120+
- name: Archive Logs
121+
uses: actions/upload-artifact@v3
122+
if: always()
123+
with:
124+
name: logs
125+
path: test-${{ matrix.device }}.out
136126

137-
- name: Print
138-
if: always()
139-
run: |
140-
cat test.out

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
node_modules/
2+
package.json
3+
yarn.lock
4+
docker-compose.yml
5+
16
/build/
27
.vscode/
38
src/*/include/case.fpp
@@ -19,8 +24,6 @@ __pycache__
1924
/tests/*/**
2025
!/tests/*/golden.txt
2126
!/tests/*/golden-metadata.txt
22-
!/tests/*/case.py
23-
!/tests/*/README.md
2427

2528
# NVIDIA Nsight Compute
2629
*.nsys-rep

.link_config.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"ignorePatterns": [
3+
{
4+
"pattern": "examples.md"
5+
}
6+
],
7+
"replacementPatterns": [
8+
{
9+
"pattern": "^.attachments",
10+
"replacement": "file://some/conventional/folder/.attachments"
11+
},
12+
{
13+
"pattern": "^/",
14+
"replacement": "{{BASEURL}}/"
15+
}
16+
],
17+
"httpHeaders": [
18+
{
19+
"urls": ["https://example.com"],
20+
"headers": {
21+
"Authorization": "Basic Zm9vOmJhcg==",
22+
"Foo": "Bar"
23+
}
24+
}
25+
],
26+
"timeout": "20s",
27+
"retryOn429": true,
28+
"retryCount": 5,
29+
"fallbackRetryDelay": "30s",
30+
"aliveStatusCodes": [200, 206, 403]
31+
}
32+

.typos.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ AttributeIDSupressMenu = "AttributeIDSupressMenu"
1010
INOUT = "INOUT"
1111
WRONLY = "WRONLY"
1212
nd = "nd"
13-
# Childs = "Childs"
14-
# myu = "myu"
15-
16-
1713

1814
[files]
1915
extend-exclude = ["docs/documentation/references*", "tests/"]

CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,11 @@ endif()
196196
# * For each .fpp file found with filepath <dirpath>/<filename>.fpp, using a
197197
# custom command, instruct CMake how to generate a file with path
198198
#
199-
# src/<target>/autogen/<filename>.f90
199+
# src/<target>/fypp/<filename>.f90
200200
#
201201
# by running Fypp on <dirpath>/<filename>.fpp. It is important to understand
202202
# that this does not actually run the pre-processor. Rather, it instructs
203-
# CMake what to do when it finds a src/<target>/autogen/<filename>.f90 path
203+
# CMake what to do when it finds a src/<target>/fypp/<filename>.f90 path
204204
# in the source list for a target. Thus, an association is made from an .f90
205205
# file to its corresponding .fpp file (if applicable) even though the
206206
# generation is of the form .fpp -> .f90.
@@ -223,7 +223,7 @@ endif()
223223
# one of them is modified).
224224
#
225225
# .fpp files in src/common are treated as if they were in src/<target> (not
226-
# pre-processed to src/common/autogen/) so as not to clash with other targets'
226+
# pre-processed to src/common/fypp/) so as not to clash with other targets'
227227
# .fpp files (this has caused problems in the past).
228228
#
229229
# * Export, in the variable <target>_SRCs, a list of all source files (.f90)
@@ -250,7 +250,7 @@ macro(HANDLE_SOURCES target useCommon)
250250
list(APPEND ${target}_SRCs ${common_F90s})
251251
endif()
252252

253-
# src/[<target>,common]/*.fpp -> src/<target>/autogen/*.f90
253+
# src/[<target>,common]/*.fpp -> src/<target>/fypp/*.f90
254254
file(GLOB ${target}_FPPs CONFIGURE_DEPENDS "${${target}_DIR}/*.fpp")
255255
if (${useCommon})
256256
file(GLOB common_FPPs CONFIGURE_DEPENDS "${common_DIR}/*.fpp")
@@ -259,22 +259,22 @@ macro(HANDLE_SOURCES target useCommon)
259259

260260
# Locate src/[<target>,common]/include/*.fpp
261261
file(GLOB ${target}_incs CONFIGURE_DEPENDS "${${target}_DIR}/include/*.fpp"
262-
"${CMAKE_CURRENT_BINARY_DIR}/include/*.fpp")
262+
"${CMAKE_BINARY_DIR}/include/${target}/*.fpp")
263263

264264
if (${useCommon})
265265
file(GLOB common_incs CONFIGURE_DEPENDS "${common_DIR}/include/*.fpp")
266266
list(APPEND ${target}_incs ${common_incs})
267267
endif()
268268

269-
file(MAKE_DIRECTORY "${${target}_DIR}/autogen")
269+
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/fypp/${target}")
270270
foreach(fpp ${${target}_FPPs})
271271
cmake_path(GET fpp FILENAME fpp_filename)
272-
set(f90 "${${target}_DIR}/autogen/${fpp_filename}.f90")
272+
set(f90 "${CMAKE_BINARY_DIR}/fypp/${target}/${fpp_filename}.f90")
273273

274274
add_custom_command(
275275
OUTPUT ${f90}
276276
COMMAND ${FYPP_EXE} -m re
277-
-I "${CMAKE_CURRENT_BINARY_DIR}/include"
277+
-I "${CMAKE_BINARY_DIR}/include/${target}"
278278
-I "${${target}_DIR}/include"
279279
-I "${common_DIR}/include"
280280
-I "${common_DIR}"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<img src="https://zenodo.org/badge/doi/10.1016/j.cpc.2020.107396.svg" />
1010
</a>
1111
<a href="https://github.com/MFlowCode/MFC/actions">
12-
<img src="https://github.com/MFlowCode/MFC/actions/workflows/ci.yml/badge.svg" />
12+
<img src="https://github.com/MFlowCode/MFC/actions/workflows/test.yml/badge.svg" />
1313
</a>
1414
<a href="https://lbesson.mit-license.org/">
1515
<img src="https://img.shields.io/badge/License-MIT-blue.svg" />
@@ -50,7 +50,7 @@ If you use MFC, consider citing it:
5050

5151
## License
5252

53-
Copyright 2023.
53+
Copyright 2021-2024.
5454
MFC is under the MIT license (see [LICENSE](LICENSE) file for full text).
5555

5656
## Acknowledgements

docs/documentation/case.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Case Files
22

3-
Example Python case files, also referred to as *input files*, can be found in the [examples/](examples/) directory. They print a Python dictionary containing input parameters for MFC. Their contents, and a guide to filling them out, are documented
3+
Example Python case files, also referred to as *input files*, can be found in the [examples/](https://github.com/MFlowCode/MFC/tree/master/examples) directory. They print a Python dictionary containing input parameters for MFC. Their contents, and a guide to filling them out, are documented
44
in the user manual. A commented, tutorial script
5-
can also be found in [examples/3d_sphbubcollapse/](examples/3D_sphbubcollapse/case.py).
5+
can also be found in [examples/3d_sphbubcollapse/](https://github.com/MFlowCode/MFC/blob/master/examples/3D_sphbubcollapse/case.py).
66

77
## Basic Skeleton
88

0 commit comments

Comments
 (0)