You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/documentation/getting-started.md
+20-13Lines changed: 20 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,8 @@ $ git checkout <release tag>
12
12
13
13
## Build Environment
14
14
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:
16
17
17
18
<details>
18
19
<summary><h2>*nix</h2></summary>
@@ -70,20 +71,15 @@ Then, in order to initialize your development environment, open a terminal windo
70
71
"C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
71
72
```
72
73
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).
77
76
78
77
</details>
79
78
80
79
<details>
81
80
<summary><h3>Windows + WSL</h3></summary>
82
81
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).
87
83
88
84
You can now follow the appropriate instructions for your distribution.
89
85
@@ -111,7 +107,12 @@ $ touch ~/.bash_profile
111
107
$ open ~/.bash_profile
112
108
```
113
109
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.
115
116
116
117
```console
117
118
# === MFC MPI Installation ===
@@ -132,7 +133,8 @@ $ brew install wget make python make cmake coreutils gcc@$MFC_GCC_VER
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.
136
138
137
139
</details>
138
140
@@ -188,9 +190,14 @@ MFC can be built with support for various (compile-time) features:
188
190
189
191
_⚠️ The `--gpu` option requires that your compiler supports OpenACC for Fortran for your target GPU architecture._
190
192
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.
192
196
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`.
194
201
195
202
Most first-time users will want to build MFC using 8 threads (or more!) with MPI support:
Copy file name to clipboardExpand all lines: docs/documentation/running.md
+31-27Lines changed: 31 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,8 @@
1
1
# Running
2
2
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`.
7
6
8
7
## Interactive Execution
9
8
@@ -44,11 +43,10 @@ Please refer to `./mfc.sh run -h` for a complete list of arguments and options,
44
43
45
44
## Batch Execution
46
45
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.
@@ -62,42 +60,48 @@ Other useful arguments include:
62
60
-`-a <account name>` to identify the account to be charged for the job. (i.e `--account`)
63
61
-`-p <partition name>` to select the job's partition. (i.e `--partition`)
64
62
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.
72
68
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.
75
70
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.
78
73
79
74
As an example, one might request GPUs on a SLURM system using the following:
80
75
81
76
```
82
77
#SBATCH --gpus=v100-32:{gpus_per_node*nodes}
83
78
```
84
79
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.
88
82
89
83
**Disclaimer**: IBM's JSRUN on LSF-managed computers does not use the traditional node-based approach to
90
84
allocate resources. Therefore, the MFC constructs equivalent resource-sets in task and GPU count.
91
85
92
86
### Profiling with NVIDIA Nsight
93
87
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).
97
99
98
100
### Restarting Cases
99
101
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.
0 commit comments