Skip to content

Commit cbf9f61

Browse files
author
Malmahrouqi3
committed
improved docs
1 parent 615bab4 commit cbf9f61

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ And here is a high amplitude acoustic wave reflecting and emerging through a cir
8484

8585

8686
## Getting started
87-
For a quick start, open a GitHub Codespace to load a pre-configured docker container to get familiar with MFC commands. Click <kbd> <> Code</kbd> (green button at top right) → <kbd>Codespaces</kbd> (right tab) → <kbd>+</kbd> (create a codespace).
87+
For a quick start, open a GitHub Codespace to load a pre-configured Docker container to get familiar with MFC commands. Click <kbd> <> Code</kbd> (green button at top right) → <kbd>Codespaces</kbd> (right tab) → <kbd>+</kbd> (create a codespace).
8888

89-
****Notes:**** Codespaces is a free service with a monthly quota of compute time and storage usage. It is commended for testing commands, troubleshooting, and running simple case files without the need to install dependencies and build MFC on your device. Remember to save any important files locally before closing your codespace. To learn more, read through [how docker & containers work](https://mflowcode.github.io/documentation/docker.html).
89+
****Notes:**** Codespaces is a free service with a monthly quota of compute time and storage usage. It is recommended for testing commands, troubleshooting, and running simple case files without the need to install dependencies and build MFC on your device. Remember to save any important files locally before closing your codespace. To learn more, read through [how Docker & Containers work](https://mflowcode.github.io/documentation/docker.html).
9090

9191
Otherwise, you can navigate [to this webpage](https://mflowcode.github.io/documentation/md_getting-started.html) to get started using MFC!
9292
It's rather straightforward.

docs/documentation/docker.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ docker run -it --rm --entrypoint bash --platform linux/amd64 sbryngelson/mfc:lat
3030
```
3131
<br>
3232

33+
**What is Next:**
34+
35+
After starting a container, the primary working directory is `/opt/MFC`, where all necessary files are located. Read through [Example Cases](https://mflowcode.github.io/documentation/md_examples.html) to get familiar with running cases, then review [Case Files](https://mflowcode.github.io/documentation/md_case.html) to write a custom case file.
36+
37+
38+
<br>
39+
3340
## Running Containers
3441

3542
Start a CPU container.
@@ -40,7 +47,7 @@ Start a GPU container.
4047
```bash
4148
docker run -it --rm --gpus all --entrypoint bash sbryngelson/mfc:latest-gpu
4249
```
43-
**Note:** `--gpus all` exposes the container to available GPUs, and only Nvidia GPUs are currently supported. Make sure your device's CUDA version is at least 12.3 to avoid backward compatibility issues.
50+
**Note:** `--gpus all` exposes the container to available GPUs, and only NVIDIA GPUs are currently supported. Make sure your device's CUDA version is at least 12.3 to avoid backward compatibility issues.
4451

4552
<br>
4653
<br>
@@ -55,7 +62,7 @@ docker run -it --rm --entrypoint bash -v "$PWD":/mnt sbryngelson/mfc:latest-cpu
5562

5663
**Shared Memory:**
5764

58-
Increase the shared memory size to prevent MPI memory binding errors which may fail some tests and cases. Otherwise, you can disable MPI inside the container (`--no-mpi`).
65+
When encountering MPI memory binding errors resulting in failed tests and cases, increase the shared memory size or disable MPI inside the container (`./mfc.sh --no-mpi`).
5966
```bash
6067
docker run -it --rm --entrypoint bash --shm-size=<e.g., 4gb> sbryngelson/mfc:latest-cpu
6168
```
@@ -91,6 +98,7 @@ or
9198
```bash
9299
apptainer exec --nv --fakeroot --writable-tmpfs --bind "$PWD":/mnt docker://sbryngelson/mfc:latest-gpu bash -c "cd /opt/MFC && bash"
93100
```
101+
**Note:** To run MFC on CPU cores, omit `--nv` and use `mfc:latest-cpu` container image.
94102

95103
### **For Portability,**
96104
On the source machine,
@@ -107,6 +115,7 @@ apptainer shell --nv --fakeroot --writable-tmpfs --bind "$PWD":/mnt mfc:latest-g
107115

108116

109117
### Slurm Job
118+
Below is a slurm job template. Refer to your HPC user guide for instructions on properly loading and using apptainer.
110119
```bash
111120
#!/bin/bash
112121
#SBATCH --job-name=mfc-sim
@@ -117,9 +126,6 @@ apptainer shell --nv --fakeroot --writable-tmpfs --bind "$PWD":/mnt mfc:latest-g
117126
#SBATCH --output=mfc-sim-%j.out
118127
#SBATCH --error=mfc-sim-%j.err
119128

120-
# Load required modules
121-
module load apptainer
122-
123129
cd $SLURM_SUBMIT_DIR
124130

125131
# Define container image
@@ -135,7 +141,7 @@ Where,
135141
`/sim` directory should all the simulation files, including the case setup (`case.py`).
136142

137143
`--nv --fakeroot --writable-tmpfs`, these flags are critical to:
138-
- Grant access to the host system's Nvidia GPU and its CUDA libraries.
144+
- Grant access to the host system's NVIDIA GPUs and its CUDA libraries.
139145
- Enable root-like permissions inside the container without actual root access.
140146
- Allow temporary write access to the container filesystem.
141147

docs/documentation/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Examples:
146146
- Build MFC's `simulation` code in Debug mode with MPI and GPU support: `./mfc.sh build --debug --gpu -t simulation`.
147147

148148
## Using Containers
149-
As an alternative to building MFC from scratch, use containers to quickly access pre-built MFC with all its dependencies.
149+
Instead of building MFC from scratch, use containers to quickly access pre-built MFC along with its dependencies.
150150

151151
Run the latest MFC container.
152152
```bash

0 commit comments

Comments
 (0)