Skip to content

Commit 68195e7

Browse files
authored
console-to-shell (#439)
1 parent d292c29 commit 68195e7

File tree

7 files changed

+36
-36
lines changed

7 files changed

+36
-36
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,23 @@ You can navigate [to this webpage](https://mflowcode.github.io/documentation/md_
5252
It's rather straightforward.
5353
We'll give a brief intro. here for MacOS.
5454
Using [brew](https://brew.sh), install MFC's modest set of dependencies:
55-
```console
55+
```shell
5656
brew install wget python cmake gcc@13 mpich
5757
```
5858
You're now ready to build and test MFC!
5959
Put it to a convenient directory via
60-
```console
60+
```shell
6161
git clone https://github.com/mflowcode/MFC.git
6262
cd MFC
6363
```
6464
and make sure MFC knows what compilers to use by putting the following in your `~/.profile`
65-
```console
65+
```shell
6666
export CC=gcc-13
6767
export CXX=g++-13
6868
export FC=gfortran-13
6969
```
7070
and source that file, build, and test!
71-
```console
71+
```shell
7272
source ~/.profile
7373
./mfc.sh build -j 8
7474
./mfc.sh test -j 8
@@ -78,7 +78,7 @@ And... you're done!
7878
You can learn more about MFC's capabilities [via its documentation](https://mflowcode.github.io/documentation/index.html) or play with the examples located in the `examples/` directory (some are [shown here](https://mflowcode.github.io/documentation/md_examples.html))!
7979

8080
The shock-droplet interaction case above was run via
81-
```console
81+
```shell
8282
./mfc.sh run ./examples/3d_shockdroplet/case.py -n 8
8383
```
8484
where `8` is the number of cores the example will run on.

docs/documentation/case.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ print(json.dumps({
2222

2323
Thus, you can run your case file with Python to view the computed case dictionary that will be processed by MFC when you run:
2424

25-
```console
25+
```shell
2626
python3 my_case_file.py
2727
```
2828

@@ -56,13 +56,13 @@ You can add as many additional positional arguments as you may need.
5656

5757
To run such a case, use the following format:
5858

59-
```console
59+
```shell
6060
./mfc.sh run <path/to/case.py> <positional arguments> <regular mfc.sh run arguments>
6161
```
6262

6363
For example, to run the 3D_weak_scaling case with `gbpp=2`:
6464

65-
```console
65+
```shell
6666
./mfc.sh run examples/3D_weak_scaling/case.py 2 -t pre_process -j 8
6767
```
6868

@@ -192,7 +192,7 @@ The code outputs error messages when an empty region is left in the domain.
192192

193193
Some parameters, as described above, can be defined by analytical functions in the input file. For example, one can define the following patch:
194194

195-
```console
195+
```shell
196196
'patch_icpp(2)%geometry' : 15,
197197
'patch_icpp(2)%x_centroid' : 0.25,
198198
'patch_icpp(2)%length_x' : 9.5,

docs/documentation/getting-started.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
You can either download MFC's [latest release from GitHub](https://github.com/MFlowCode/MFC/releases/latest) or clone the repository:
66

7-
```console
7+
```shell
88
git clone https://github.com/MFlowCode/MFC.git
99
cd MFC
1010
```
@@ -19,13 +19,13 @@ Please select your desired configuration from the list bellow:
1919

2020
- **On supported clusters:** Load environment modules
2121

22-
```console
22+
```shell
2323
. ./mfc.sh load
2424
```
2525

2626
- **Via [Aptitude](https://wiki.debian.org/Aptitude):**
2727

28-
```console
28+
```shell
2929
sudo apt update
3030
sudo apt upgrade
3131
sudo apt install tar wget make cmake gcc g++ \
@@ -36,7 +36,7 @@ sudo apt install tar wget make cmake gcc g++ \
3636

3737
- **Via [Pacman](https://wiki.archlinux.org/title/pacman):**
3838

39-
```console
39+
```shell
4040
sudo pacman -Syu
4141
sudo pacman -S base-devel coreutils \
4242
git ninja gcc-fortran \
@@ -67,7 +67,7 @@ Install the latest version of:
6767
- [Intel® oneAPI HPC Toolkit](https://www.intel.com/content/www/us/en/developer/tools/oneapi/hpc-toolkit-download.html)
6868

6969
Then, in order to initialize your development environment, open a terminal window and run:
70-
```console
70+
```shell
7171
"C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
7272
```
7373

@@ -92,14 +92,14 @@ You can now follow the appropriate instructions for your distribution.
9292

9393
- **If you use [ZSH]** (Verify with `echo $SHELL`)
9494

95-
```console
95+
```shell
9696
touch ~/.zshrc
9797
open ~/.zshrc
9898
```
9999

100100
- **If you use [BASH]** (Verify with `echo $SHELL`)
101101

102-
```console
102+
```shell
103103
touch ~/.bash_profile
104104
open ~/.bash_profile
105105
```
@@ -111,7 +111,7 @@ These lines ensure that LLVM's Clang, and Apple's modified version of GCC, won't
111111
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).
112112
We do *not* support `clang` due to conflicts with the Silo dependency.
113113

114-
```console
114+
```shell
115115
export MFC_GCC_VER=13
116116
export CC=gcc-$MFC_GCC_VER
117117
export CXX=g++-$MFC_GCC_VER
@@ -120,7 +120,7 @@ export FC=gfortran-$MFC_GCC_VER
120120

121121
**Close the open editor and terminal window**. Open a **new terminal** window before executing the commands below.
122122

123-
```console
123+
```shell
124124
brew install wget python cmake gcc@$MFC_GCC_VER mpich
125125
```
126126

@@ -138,22 +138,22 @@ First install Docker and Git:
138138
- Windows: [Docker](https://docs.docker.com/get-docker/) + [Git](https://git-scm.com/downloads).
139139
- macOS: `brew install git docker` (requires [Homebrew](https://brew.sh/)).
140140
- Other systems:
141-
```console
141+
```shell
142142
sudo apt install git docker # Debian / Ubuntu via Aptitude
143143
sudo pacman -S git docker # Arch Linux via Pacman
144144
```
145145

146146
Once Docker and Git are installed on your system, clone MFC with
147147

148-
```console
148+
```shell
149149
git clone https://github.com/MFlowCode/MFC
150150
cd MFC
151151
```
152152

153153
To fetch the prebuilt Docker image and enter an interactive bash session with the
154154
recommended settings applied, run
155155

156-
```console
156+
```shell
157157
./mfc.sh docker # If on \*nix/macOS
158158
.\mfc.bat docker # If on Windows
159159
```
@@ -190,7 +190,7 @@ To only select a subset, use the `-t` (i.e., `--targets`) argument.
190190
For a detailed list of options, arguments, and features, please refer to `./mfc.sh build --help`.
191191

192192
Most first-time users will want to build MFC using 8 threads (or more!) with MPI support:
193-
```console
193+
```shell
194194
./mfc.sh build -j 8
195195
```
196196

@@ -204,7 +204,7 @@ Examples:
204204

205205
Run MFC's test suite with 8 threads:
206206

207-
```console
207+
```shell
208208
./mfc.sh test -j 8
209209
```
210210

@@ -214,7 +214,7 @@ Please refer to the [Testing](testing.md) document for more information.
214214

215215
MFC has example cases in the `examples` folder. You can run such a case interactively using 2 tasks by typing:
216216

217-
```console
217+
```shell
218218
./mfc.sh run examples/2D_shockbubble/case.py -n 2
219219
```
220220

docs/documentation/running.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Please refer to `./mfc.sh run -h` for a complete list of arguments and options,
3232

3333
To run all stages of MFC, that is [pre_process](https://github.com/MFlowCode/MFC/tree/master/src/pre_process/), [simulation](https://github.com/MFlowCode/MFC/tree/master/src/simulation/), and [post_process](https://github.com/MFlowCode/MFC/tree/master/src/post_process/) on the sample case [2D_shockbubble](https://github.com/MFlowCode/MFC/tree/master/examples/2D_shockbubble/),
3434

35-
```console
35+
```shell
3636
./mfc.sh run examples/2D_shockbubble/case.py
3737
```
3838

@@ -45,14 +45,14 @@ For example,
4545

4646
- Running [pre_process](https://github.com/MFlowCode/MFC/tree/master/src/pre_process/) with 2 cores:
4747

48-
```console
48+
```shell
4949
./mfc.sh run examples/2D_shockbubble/case.py -t pre_process -n 2
5050
```
5151

5252
- Running [simulation](https://github.com/MFlowCode/MFC/tree/master/src/simulation/) and [post_process](https://github.com/MFlowCode/MFC/tree/master/src/post_process/)
5353
using 4 cores:
5454

55-
```console
55+
```shell
5656
./mfc.sh run examples/2D_shockbubble/case.py -t simulation post_process -n 4
5757
```
5858

@@ -64,7 +64,7 @@ The number of nodes can be specified with the `-N` (i.e., `--nodes`) option.
6464

6565
We provide a list of (baked-in) submission batch scripts in the `toolchain/templates` folder.
6666

67-
```console
67+
```shell
6868
./mfc.sh run examples/2D_shockbubble/case.py -e batch -N 2 -n 4 -t simulation -c <computer name>
6969
```
7070

@@ -167,14 +167,14 @@ in which $t_i$ is the starting time, $t_f$ is the final time, and $SF$ is the sa
167167
- There are several ways to do this. Keep in mind that, regardless of the .py file used, the post_process command will generate output files in the [`t_step_start`, `t_step_stop`] range, with `t_step_save` as the spacing between files.
168168
- One way is to set `t_step_stop` to the restarting point $t_s$ in `case.py`. Then, run the commands below. The first command will run on timesteps $[t_i, t_s]$. The second command will run on $[t_s, t_{f2}]$. Therefore, the whole range $[t_i, t_{f2}]$ will be post processed.
169169

170-
```console
170+
```shell
171171
./mfc.sh run case.py -t post_process
172172
./mfc.sh run restart_case.py -t post_process
173173
```
174174

175175
We have provided an example, `case.py` and `restart_case.py` in `/examples/1D_vacuum_restart/`. This simulation is a duplicate of the `1D_vacuum` case. It demonstrates stopping at timestep 7000, adding a new patch, and restarting the simulation. To test this code, run:
176176

177-
```console
177+
```shell
178178
./mfc.sh run examples/1D_vacuum_restart/case.py -t pre_process simulation
179179
./mfc.sh run examples/1D_vacuum_restart/restart_case.py -t pre_process simulation
180180
./mfc.sh run examples/1D_vacuum_restart/case.py -t post_process
@@ -185,7 +185,7 @@ We have provided an example, `case.py` and `restart_case.py` in `/examples/1D_va
185185

186186
- Oak Ridge National Laboratory's [Summit](https://www.olcf.ornl.gov/summit/):
187187

188-
```console
188+
```shell
189189
./mfc.sh run examples/2D_shockbubble/case.py -e batch \
190190
-N 2 -n 4 -t simulation -a <redacted> -c summit
191191
```

docs/documentation/testing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Testing
22

33
To run MFC's test suite, run
4-
```console
4+
```shell
55
./mfc.sh test -j <thread count>
66
```
77

@@ -21,7 +21,7 @@ To run a (non-contiguous) subset of tests, use the `--only` (`-o`) option instea
2121
### Creating Tests
2222

2323
To (re)generate *golden files*, append the `--generate` option:
24-
```console
24+
```shell
2525
./mfc.sh test --generate -j 8
2626
```
2727

@@ -87,7 +87,7 @@ Finally, the case is appended to the `cases` list, which will be returned by the
8787
### Testing Post Process
8888

8989
To test updated post process code, append the `-a` or `--test-all` option:
90-
```console
90+
```shell
9191
./mfc.sh test -a -j 8
9292
```
9393

docs/documentation/visualization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ This is optional and defaults to whatever is set on line 52 of `pace-paraview-se
9191
Once you run `./pace-paraview-server <options>`, it'll take a bit to start up.
9292
In the meantime, you'll see the below message:
9393

94-
```console
94+
```shell
9595
Submitted batch job <job #>
9696
Waiting for ParaView server to start. This may take several minutes ...
9797
```

examples/3D_weak_scaling/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Weak scaling benchmarks can be produced by keeping _gbpp_ constant and varying _
1616
For example, to run a weak scaling test that uses ~4GB of GPU memory per rank
1717
on 8 2-rank nodes with case optimization, one could:
1818

19-
```console
19+
```shell
2020
./mfc.sh run examples/3D_weak_scaling/case.py 4 -t pre_process simulation \
2121
-e batch -p mypartition -N 8 -n 2 -w "01:00:00" -# "MFC Weak Scaling" \
2222
--case-optimization -j 32

0 commit comments

Comments
 (0)