Skip to content

Commit c191335

Browse files
committed
Merge master
2 parents b57a6db + 20b2be7 commit c191335

36 files changed

+271
-164
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ 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' || '' }}
9292

9393
docker:
9494
name: Github | Docker

.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

.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/"]

docs/documentation/case.md

Lines changed: 103 additions & 56 deletions
Large diffs are not rendered by default.

docs/documentation/getting-started.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ $ git checkout <release tag>
1212

1313
## Build Environment
1414

15-
MFC can be built in multiple ways on various operating systems. Please select your desired configuration from the list bellow:
15+
MFC can be built in multiple ways on various operating systems.
16+
Please select your desired configuration from the list bellow:
1617

1718
<details>
1819
<summary><h2>*nix</h2></summary>
@@ -70,20 +71,15 @@ Then, in order to initialize your development environment, open a terminal windo
7071
"C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
7172
```
7273

73-
To follow this guide, please replace `./mfc.sh` with `mfc.bat` when running any
74-
commands. `./mfc.sh` is intended Unix-like systems. You will also have access to the `.sln`
75-
Microsoft Visual Studio solution files for an IDE (Integrated Development
76-
Environment).
74+
To follow this guide, please replace `./mfc.sh` with `mfc.bat` when running any commands. `./mfc.sh` is intended Unix-like systems.
75+
You will also have access to the `.sln` Microsoft Visual Studio solution files for an IDE (Integrated Development Environment).
7776

7877
</details>
7978

8079
<details>
8180
<summary><h3>Windows + WSL</h3></summary>
8281

83-
Install the latest version of the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/)
84-
as well as a distribution such as Ubuntu which can be found [here](https://apps.microsoft.com/store/detail/ubuntu/9PDXGNCFSCZV). Acquiring an interactive session is as simple as typing `wsl` in your
85-
command prompt, or alternatively, selecting the distribution from the dropdown menu
86-
available in the [Microsoft Terminal](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701).
82+
Install the latest version of the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/) as well as a distribution such as Ubuntu which can be found [here](https://apps.microsoft.com/store/detail/ubuntu/9PDXGNCFSCZV). Acquiring an interactive session is as simple as typing `wsl` in your command prompt, or alternatively, selecting the distribution from the dropdown menu available in the [Microsoft Terminal](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701).
8783

8884
You can now follow the appropriate instructions for your distribution.
8985

@@ -111,7 +107,12 @@ $ touch ~/.bash_profile
111107
$ open ~/.bash_profile
112108
```
113109

114-
An editor should open. Please paste the following lines into it before saving the file. If you wish to use a version of GNU's GCC other than 11, modify the first assignment. These lines ensure that LLVM's Clang, and Apple's modified version of GCC, won't be used to compile MFC. Further reading on `open-mpi` incompatibility with `clang`-based `gcc` on macOS: [here](https://stackoverflow.com/questions/27930481/how-to-build-openmpi-with-homebrew-and-gcc-4-9). We do *not* support `clang` due to conflicts with our Silo dependency.
110+
An editor should open.
111+
Please paste the following lines into it before saving the file.
112+
If you wish to use a version of GNU's GCC other than 11, modify the first assignment.
113+
These lines ensure that LLVM's Clang, and Apple's modified version of GCC, won't be used to compile MFC.
114+
Further reading on `open-mpi` incompatibility with `clang`-based `gcc` on macOS: [here](https://stackoverflow.com/questions/27930481/how-to-build-openmpi-with-homebrew-and-gcc-4-9).
115+
We do *not* support `clang` due to conflicts with our Silo dependency.
115116

116117
```console
117118
# === MFC MPI Installation ===
@@ -132,7 +133,8 @@ $ brew install wget make python make cmake coreutils gcc@$MFC_GCC_VER
132133
$ HOMEBREW_MAKE_JOBS=$(nproc) brew install --cc=gcc-$MFC_GCC_VER --verbose --build-from-source open-mpi
133134
```
134135

135-
They will download the dependencies MFC requires to build itself. `open-mpi` will be compiled from source, using the version of GCC we specified above with the environment variables `HOMEBREW_CC` and `HOMEBREW_CXX`. Building this package might take a while.
136+
They will download the dependencies MFC requires to build itself. `open-mpi` will be compiled from source, using the version of GCC we specified above with the environment variables `HOMEBREW_CC` and `HOMEBREW_CXX`.
137+
Building this package might take a while.
136138

137139
</details>
138140

@@ -188,9 +190,14 @@ MFC can be built with support for various (compile-time) features:
188190

189191
_⚠️ The `--gpu` option requires that your compiler supports OpenACC for Fortran for your target GPU architecture._
190192

191-
When these options are given to `mfc.sh`, they will be remembered when you issue future commands. You can enable and disable features at any time by passing any of the arguments above. For example, if you have previously built MFC with MPI support and no longer wish to run using MPI, you can pass `--no-mpi` once, for the change to be permanent.
193+
When these options are given to `mfc.sh`, they will be remembered when you issue future commands.
194+
You can enable and disable features at any time by passing any of the arguments above.
195+
For example, if you have previously built MFC with MPI support and no longer wish to run using MPI, you can pass `--no-mpi` once, for the change to be permanent.
192196

193-
MFC is composed of three codes, each being a separate _target_. By default, all targets (`pre_process`, `simulation`, and `post_process`) are selected. To only select a subset, use the `-t` (i.e `--targets`) argument. For a detailed list of options, arguments, and features, please refer to `./mfc.sh build --help`.
197+
MFC is composed of three codes, each being a separate _target_.
198+
By default, all targets (`pre_process`, `simulation`, and `post_process`) are selected.
199+
To only select a subset, use the `-t` (i.e., `--targets`) argument.
200+
For a detailed list of options, arguments, and features, please refer to `./mfc.sh build --help`.
194201

195202
Most first-time users will want to build MFC using 8 threads (or more!) with MPI support:
196203
```console

docs/documentation/running.md

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# Running
22

3-
MFC can be run using `mfc.sh`'s `run` command. It supports both interactive and
4-
batch execution, the latter being designed for multi-socket systems, namely supercomputers,
5-
equipped with a scheduler such as PBS, SLURM, and LSF. A full (and updated) list
6-
of available arguments can be acquired with `./mfc.sh run -h`.
3+
MFC can be run using `mfc.sh`'s `run` command.
4+
It supports both interactive and batch execution, the latter being designed for multi-socket systems, namely supercomputers, equipped with a scheduler such as PBS, SLURM, and LSF.
5+
A full (and updated) list of available arguments can be acquired with `./mfc.sh run -h`.
76

87
## Interactive Execution
98

@@ -44,11 +43,10 @@ Please refer to `./mfc.sh run -h` for a complete list of arguments and options,
4443

4544
## Batch Execution
4645

47-
The MFC detects which scheduler your system is using and handles the creation and
48-
execution of batch scripts. The batch engine is requested with the `-e batch` option.
49-
Whereas the interactive engine can execute all of MFC's codes in succession, the batch engine
50-
requires you to only specify one target with the `-t` option. The number of nodes and GPUs can,
51-
respectively be specified with the `-N` (i.e `--nodes`) and `-g` (i.e `--gpus-per-node`) options.
46+
The MFC detects which scheduler your system is using and handles the creation and execution of batch scripts.
47+
The batch engine is requested with the `-e batch` option.
48+
Whereas the interactive engine can execute all of MFC's codes in succession, the batch engine requires you to only specify one target with the `-t` option.
49+
The number of nodes and GPUs can, respectively be specified with the `-N` (i.e `--nodes`) and `-g` (i.e `--gpus-per-node`) options.
5250

5351
```console
5452
$ ./mfc.sh run examples/2D_shockbubble/case.py -e batch -N 2 -n 4 -g 4 -t simulation
@@ -62,42 +60,48 @@ Other useful arguments include:
6260
- `-a <account name>` to identify the account to be charged for the job. (i.e `--account`)
6361
- `-p <partition name>` to select the job's partition. (i.e `--partition`)
6462

65-
Since some schedulers don't have a standardized syntax to request certain resources, MFC can only
66-
provide support for a restricted subset of common configuration options. If MFC fails
67-
to execute on your system, or if you wish to adjust how the program runs and resources
68-
are requested to be allocated, you are invited to modify the template batch script for your queue system.
69-
Upon execution of `./mfc.sh run`, MFC fills in the template with runtime parameters, to
70-
generate the batch file it will submit. These files are located in the [templates](https://github.com/MFlowCode/MFC/tree/master/toolchain/templates/)
71-
directory. To request GPUs, modification of the template will be required on most systems.
63+
Since some schedulers don't have a standardized syntax to request certain resources, MFC can only provide support for a restricted subset of common configuration options.
64+
If MFC fails to execute on your system, or if you wish to adjust how the program runs and resources are requested to be allocated, you are invited to modify the template batch script for your queue system.
65+
Upon execution of `./mfc.sh run`, MFC fills in the template with runtime parameters, to generate the batch file it will submit.
66+
These files are located in the [templates](https://github.com/MFlowCode/MFC/tree/master/toolchain/templates/) directory.
67+
To request GPUs, modification of the template will be required on most systems.
7268

73-
- Lines that begin with `#>` are ignored and won't figure in the final batch
74-
script, not even as a comment.
69+
- Lines that begin with `#>` are ignored and won't figure in the final batch script, not even as a comment.
7570

76-
- Statements of the form `${expression}` are string-replaced to provide
77-
runtime parameters, most notably execution options. You can perform therein any Python operation recognized by the built-in `expr()` function.
71+
- Statements of the form `${expression}` are string-replaced to provide runtime parameters, most notably execution options.
72+
You can perform therein any Python operation recognized by the built-in `expr()` function.
7873

7974
As an example, one might request GPUs on a SLURM system using the following:
8075

8176
```
8277
#SBATCH --gpus=v100-32:{gpus_per_node*nodes}
8378
```
8479

85-
- Statements of the form `{MFC::expression}` tell MFC where to place the common code,
86-
across all batch files, that is required for proper execution. They are not intended to be
87-
modified by users.
80+
- Statements of the form `{MFC::expression}` tell MFC where to place the common code, across all batch files, that is required for proper execution.
81+
They are not intended to be modified by users.
8882

8983
**Disclaimer**: IBM's JSRUN on LSF-managed computers does not use the traditional node-based approach to
9084
allocate resources. Therefore, the MFC constructs equivalent resource-sets in task and GPU count.
9185

9286
### Profiling with NVIDIA Nsight
9387

94-
MFC provides two different argument to facilitate profiling with NVIDIA Nsight. **Please ensure that the used argument is placed at the end so that their respective flags can be appended.**
95-
- Nsight Systems (Nsys): `./mfc.sh run ... --nsys [nsys flags]` allows one to visualize MFC's system-wide performance with [NVIDIA Nsight Systems](https://developer.nvidia.com/nsight-systems). NSys is best for getting a general understanding of the order and execution times of major subroutines (WENO, Riemann, etc.) in MFC. When used, `--nsys` will run the simulation and generate `.nsys-rep` files in the case directory for all targets. These files can then be imported into Nsight System's GUI, which can be downloaded [here](https://developer.nvidia.com/nsight-systems/get-started#latest-Platforms). It is best to run case files with a few timesteps so that the report files remain small. Learn more about NVIDIA Nsight Systems [here](https://docs.nvidia.com/nsight-systems/UserGuide/index.html).
96-
- Nsight Compute (NCU): `./mfc.sh run ... --ncu [ncu flags]` allows one to conduct kernel-level profiling with [NVIDIA Nsight Compute](https://developer.nvidia.com/nsight-compute). NCU provides profiling information for every subroutine called and is more detailed than NSys. When used, `--ncu` will output profiling information for all subroutines, including elapsed clock cycles, memory used, and more after the simulation is run. Please note that adding this argument will significantly slow down the simulation and should only be used on case files with a few timesteps. Learn more about NVIDIA Nsight Compute [here](https://docs.nvidia.com/nsight-compute/NsightCompute/index.html).
88+
MFC provides two different argument to facilitate profiling with NVIDIA Nsight.
89+
**Please ensure that the used argument is placed at the end so that their respective flags can be appended.**
90+
- Nsight Systems (Nsys): `./mfc.sh run ... --nsys [nsys flags]` allows one to visualize MFC's system-wide performance with [NVIDIA Nsight Systems](https://developer.nvidia.com/nsight-systems).
91+
NSys is best for getting a general understanding of the order and execution times of major subroutines (WENO, Riemann, etc.) in MFC.
92+
When used, `--nsys` will run the simulation and generate `.nsys-rep` files in the case directory for all targets.
93+
These files can then be imported into Nsight System's GUI, which can be downloaded [here](https://developer.nvidia.com/nsight-systems/get-started#latest-Platforms). It is best to run case files with a few timesteps so that the report files remain small. Learn more about NVIDIA Nsight Systems [here](https://docs.nvidia.com/nsight-systems/UserGuide/index.html).
94+
- Nsight Compute (NCU): `./mfc.sh run ... --ncu [ncu flags]` allows one to conduct kernel-level profiling with [NVIDIA Nsight Compute](https://developer.nvidia.com/nsight-compute).
95+
NCU provides profiling information for every subroutine called and is more detailed than NSys.
96+
When used, `--ncu` will output profiling information for all subroutines, including elapsed clock cycles, memory used, and more after the simulation is run.
97+
Please note that adding this argument will significantly slow down the simulation and should only be used on case files with a few timesteps.
98+
Learn more about NVIDIA Nsight Compute [here](https://docs.nvidia.com/nsight-compute/NsightCompute/index.html).
9799

98100
### Restarting Cases
99101

100-
When running a simulation, MFC generates a `./restart_data` folder in the case directory that contains `lustre_*.dat` files that can be used to restart a simulation from saved timesteps. This allows a user to run a simulation to some timestep $X$, then later continue it to run to another timestep $Y$, where $Y > X$. The user can also choose to add new patches at the intermediate timestep.
102+
When running a simulation, MFC generates a `./restart_data` folder in the case directory that contains `lustre_*.dat` files that can be used to restart a simulation from saved timesteps.
103+
This allows a user to run a simulation to some timestep $X$, then later continue it to run to another timestep $Y$, where $Y > X$.
104+
The user can also choose to add new patches at the intermediate timestep.
101105

102106
If you want to restart a simulation,
103107

0 commit comments

Comments
 (0)