Skip to content

Commit 018b98f

Browse files
author
MFC Action
committed
Docs @ 0ba6c02
1 parent f7a2a23 commit 018b98f

Some content is hidden

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

85 files changed

+4709
-2783
lines changed

documentation/case.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ <h4 class="doxsection"><a class="anchor" id="autotoc_md9"></a>
341341
<div class="line"><span class="keyword">end </span>if</div>
342342
</div><!-- fragment --><h4 class="doxsection"><a class="anchor" id="autotoc_md10"></a>
343343
Hard Coded Patches</h4>
344-
<p>Some patch configurations are not adequately handled with the above analytic variable definitions. In this case, a hard coded patch can be used. Hard coded patches can be added by adding additional hard coded patch identifiers to <span class="tt">src/pre_process/include/1[2,3]dHardcodedIC.fpp</span>. When using a hard coded patch, the <span class="tt">patch_icpp(patch_id)%hcid</span> must be set to the hard-coded patch id. For example, to add a 2D Hardcoded patch with an id of 200, one would add the following to <span class="tt">src/pre_process/include/2dHardcodedIC.fpp</span></p>
344+
<p>Some patch configurations are not adequately handled with the above analytic variable definitions. In this case, a hard coded patch can be used. Hard coded patches can be added by adding additional hard coded patch identifiers to <span class="tt">src/common/include/1[2,3]dHardcodedIC.fpp</span>. When using a hard coded patch, the <span class="tt">patch_icpp(patch_id)%hcid</span> must be set to the hard-coded patch id. For example, to add a 2D Hardcoded patch with an id of 200, one would add the following to <span class="tt">src/common/include/2dHardcodedIC.fpp</span></p>
345345
<div class="fragment"><div class="line"><span class="comment">case(200)</span></div>
346346
<div class="line"> ! primitive variables assignment</div>
347347
</div><!-- fragment --><p>and use <span class="tt">patch_icpp(i)%hcid = 200</span> in the input file. Additional variables can be declared in <span class="tt">Hardcoded1[2,3]DVariables</span> and used in <span class="tt">hardcoded1[2,3]D</span>. As a convention, any hard coded patches that are part of the MFC master branch should be identified as 1[2,3]xx where the first digit indicates the number of dimensions.</p>
@@ -351,7 +351,7 @@ <h4 class="doxsection"><a class="anchor" id="autotoc_md9"></a>
351351
<li><span class="tt">case(270)</span>: Extrude 1D data to 2D domain</li>
352352
<li><span class="tt">case(370)</span>: Extrude 2D data to 3D domain</li>
353353
</ul>
354-
<p>Setup: Only requires specifying <span class="tt">init_dir</span> and filename pattern via <span class="tt">zeros_default</span>. Grid dimensions are automatically detected from the data files. Implementation: All variables and file handling are managed in <span class="tt">src/pre_process/include/ExtrusionHardcodedIC.fpp</span> with no manual grid configuration needed. Usage: Ideal for initializing simulations from lower-dimensional solutions, enabling users to add perturbations or modifications to the base extruded fields for flow instability studies.</p>
354+
<p>Setup: Only requires specifying <span class="tt">init_dir</span> and filename pattern via <span class="tt">zeros_default</span>. Grid dimensions are automatically detected from the data files. Implementation: All variables and file handling are managed in <span class="tt">src/common/include/ExtrusionHardcodedIC.fpp</span> with no manual grid configuration needed. Usage: Ideal for initializing simulations from lower-dimensional solutions, enabling users to add perturbations or modifications to the base extruded fields for flow instability studies.</p>
355355
<h4 class="doxsection"><a class="anchor" id="autotoc_md11"></a>
356356
Parameter Descriptions</h4>
357357
<ul>

documentation/case_constraints.html

Lines changed: 785 additions & 36 deletions
Large diffs are not rendered by default.

documentation/contributing.html

Lines changed: 759 additions & 0 deletions
Large diffs are not rendered by default.

documentation/docker.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,16 @@
128128
<div class="headertitle"><div class="title">Containers </div></div>
129129
</div><!--header-->
130130
<div class="contents">
131-
<div class="textblock"><h1 class="doxsection"><a class="anchor" id="autotoc_md110"></a>
131+
<div class="textblock"><h1 class="doxsection"><a class="anchor" id="autotoc_md151"></a>
132132
Containers</h1>
133-
<h2 class="doxsection"><a class="anchor" id="autotoc_md111"></a>
133+
<h2 class="doxsection"><a class="anchor" id="autotoc_md152"></a>
134134
Navigating Docker</h2>
135135
<p>Install Docker on</p><ul>
136136
<li><a href="https://docs.docker.com/desktop/setup/install/mac-install/">MacOS</a></li>
137137
<li><a href="https://docs.docker.com/desktop/setup/install/windows-install/">Windows</a></li>
138138
<li><a href="https://docs.docker.com/desktop/setup/install/linux/">Linux</a></li>
139139
</ul>
140-
<h3 class="doxsection"><a class="anchor" id="autotoc_md112"></a>
140+
<h3 class="doxsection"><a class="anchor" id="autotoc_md153"></a>
141141
Docker Desktop GUI</h3>
142142
<ul>
143143
<li>Search for the <a href="https://hub.docker.com/r/sbryngelson/mfc">sbryngelson/mfc</a> repository. All the MFC containers are stored here.</li>
@@ -150,13 +150,13 @@ <h3 class="doxsection"><a class="anchor" id="autotoc_md112"></a>
150150
</ul>
151151
</li>
152152
</ul>
153-
<h3 class="doxsection"><a class="anchor" id="autotoc_md113"></a>
153+
<h3 class="doxsection"><a class="anchor" id="autotoc_md154"></a>
154154
Docker CLI</h3>
155155
<p>You can navigate Docker entirely from the command line. From a bash-like shell, pull from the <a href="https://hub.docker.com/r/sbryngelson/mfc">sbryngelson/mfc</a> repository and run the latest MFC container: </p><div class="fragment"><div class="line">docker run -it --rm --entrypoint bash sbryngelson/mfc:latest-cpu</div>
156156
</div><!-- fragment --><p><b>Selecting OS/ARCH:</b> Docker selects the compatible architecture by default when pulling and running a container. You can manually specify your platform if something seems to go wrong, as Docker may suggest doing so. For example, <span class="tt">linux/amd64</span> handles many *nix-based x86 architectures, and <span class="tt">linux/arm64</span> handles Apple Silicon and Arm-based *nix devices. You can specify it like this: </p><div class="fragment"><div class="line">docker run -it --rm --entrypoint bash --platform linux/amd64 sbryngelson/mfc:latest-cpu</div>
157157
</div><!-- fragment --><p><b>What's Next?</b></p>
158158
<p>Once a container has started, the primary working directory is <span class="tt">/opt/MFC</span>, and all necessary files are located there. You can check out the usual MFC documentation, such as the <a class="el" href="examples.html" title="Example Cases">Example Cases</a>, to get familiar with running cases. Then, review the <a class="el" href="case.html" title="Case Files">Case Files</a> to write a custom case file.</p>
159-
<h2 class="doxsection"><a class="anchor" id="autotoc_md114"></a>
159+
<h2 class="doxsection"><a class="anchor" id="autotoc_md155"></a>
160160
Details on Running Containers</h2>
161161
<p>Let's take a closer look at running MFC within a container. Kick off a CPU container: </p><div class="fragment"><div class="line">docker run -it --rm --entrypoint bash sbryngelson/mfc:latest-cpu</div>
162162
</div><!-- fragment --><p> Or, start a GPU container. </p><div class="fragment"><div class="line">docker run -it --rm --gpus all --entrypoint bash sbryngelson/mfc:latest-gpu</div>
@@ -166,25 +166,25 @@ <h2 class="doxsection"><a class="anchor" id="autotoc_md114"></a>
166166
</div><!-- fragment --><p><b>Shared Memory</b></p>
167167
<p>If you run a job with multiple MPI ranks, you could run into <em>MPI memory binding errors</em>. This can manifest as a failed test (launched via <span class="tt">./mfc.sh test</span>) and running cases with <span class="tt">./mfc.sh run -n X &lt;path/to/case.py&gt;</span> where <span class="tt">X &gt; 1</span>. To avoid this issue, you can increase the shared memory size (to keep MPI working): </p><div class="fragment"><div class="line">docker run -it --rm --entrypoint bash --shm-size=&lt;e.g., 4gb&gt; sbryngelson/mfc:latest-cpu</div>
168168
</div><!-- fragment --><p> or avoid MPI altogether via <span class="tt">./mfc.sh &lt;your commands&gt; --no-mpi</span>.</p>
169-
<h3 class="doxsection"><a class="anchor" id="autotoc_md115"></a>
169+
<h3 class="doxsection"><a class="anchor" id="autotoc_md156"></a>
170170
Portability</h3>
171171
<p>On the source machine, pull and save the image: </p><div class="fragment"><div class="line">docker pull sbryngelson/mfc:latest-cpu</div>
172172
<div class="line">docker save -o mfc:latest-cpu.tar sbryngelson/mfc:latest-cpu</div>
173173
</div><!-- fragment --><p> On the target machine, load and run the image: </p><div class="fragment"><div class="line">docker load -i mfc:latest-cpu.tar</div>
174174
<div class="line">docker run -it --rm mfc:latest-cpu</div>
175-
</div><!-- fragment --><h2 class="doxsection"><a class="anchor" id="autotoc_md116"></a>
175+
</div><!-- fragment --><h2 class="doxsection"><a class="anchor" id="autotoc_md157"></a>
176176
Using Supercomputers/Clusters via Apptainer/Singularity</h2>
177-
<h3 class="doxsection"><a class="anchor" id="autotoc_md117"></a>
177+
<h3 class="doxsection"><a class="anchor" id="autotoc_md158"></a>
178178
Interactive Shell</h3>
179179
<div class="fragment"><div class="line">apptainer shell --nv --fakeroot --writable-tmpfs --bind &quot;$PWD&quot;:/mnt docker://sbryngelson/mfc:latest-gpu</div>
180180
<div class="line">Apptainer&gt;cd /opt/MFC</div>
181181
</div><!-- fragment --><p> or </p><div class="fragment"><div class="line">apptainer exec --nv --fakeroot --writable-tmpfs --bind &quot;$PWD&quot;:/mnt docker://sbryngelson/mfc:latest-gpu bash -c &quot;cd /opt/MFC &amp;&amp; bash&quot;</div>
182182
</div><!-- fragment --><p> To run MFC on CPUs, omit <span class="tt">--nv</span> and use the <span class="tt">mfc:latest-cpu</span> container image.</p>
183-
<h3 class="doxsection"><a class="anchor" id="autotoc_md118"></a>
183+
<h3 class="doxsection"><a class="anchor" id="autotoc_md159"></a>
184184
For Portability</h3>
185185
<p>On the source machine, pull and translate the image into <span class="tt">.sif</span> format: </p><div class="fragment"><div class="line">apptainer build mfc:latest-gpu.sif docker://sbryngelson/mfc:latest-gpu</div>
186186
</div><!-- fragment --><p> On the target machine, load and start an interactive shell: </p><div class="fragment"><div class="line">apptainer shell --nv --fakeroot --writable-tmpfs --bind &quot;$PWD&quot;:/mnt mfc:latest-gpu.sif</div>
187-
</div><!-- fragment --><h3 class="doxsection"><a class="anchor" id="autotoc_md119"></a>
187+
</div><!-- fragment --><h3 class="doxsection"><a class="anchor" id="autotoc_md160"></a>
188188
Slurm Job</h3>
189189
<p>Below is an example Slurm batch job script. Refer to your machine's user guide for instructions on properly loading and using Apptainer. </p><div class="fragment"><div class="line">#!/bin/bash</div>
190190
<div class="line">#SBATCH --job-name=mfc-sim</div>
@@ -213,29 +213,29 @@ <h3 class="doxsection"><a class="anchor" id="autotoc_md118"></a>
213213
</ul>
214214
</li>
215215
</ul>
216-
<h2 class="doxsection"><a class="anchor" id="autotoc_md120"></a>
216+
<h2 class="doxsection"><a class="anchor" id="autotoc_md161"></a>
217217
Tag Details</h2>
218-
<h3 class="doxsection"><a class="anchor" id="autotoc_md121"></a>
218+
<h3 class="doxsection"><a class="anchor" id="autotoc_md162"></a>
219219
Base Images</h3>
220220
<ul>
221221
<li>CPU images (v4.3.0-latest releases) are built on <b>Ubuntu 22.04</b>.</li>
222222
<li>GPU images (v4.3.0-latest releases) are built on <b>NVHPC SDK 23.11 (CUDA 12.3) &amp; Ubuntu 22.04</b>.</li>
223223
</ul>
224-
<h3 class="doxsection"><a class="anchor" id="autotoc_md122"></a>
224+
<h3 class="doxsection"><a class="anchor" id="autotoc_md163"></a>
225225
Tag Structure</h3>
226226
<ul>
227227
<li><b><span class="tt">vx.x.x</span></b> - Official MFC release versions (recommended: use <span class="tt">latest</span> release)</li>
228228
<li><b><span class="tt">cpu/gpu</span></b> - Build configurations for CPU or GPU acceleration.</li>
229229
<li><b><span class="tt">ubuntu-xx.xx</span></b> - Base Ubuntu version (standard = <span class="tt">amd64</span>, <span class="tt">-arm</span> = <span class="tt">arm64</span>)</li>
230230
</ul>
231-
<h3 class="doxsection"><a class="anchor" id="autotoc_md123"></a>
231+
<h3 class="doxsection"><a class="anchor" id="autotoc_md164"></a>
232232
Example Tags</h3>
233233
<div class="fragment"><div class="line">mfc:latest-xxx # Latest version (amd64 &amp; arm64)</div>
234234
<div class="line">mfc:vx.x.x-cpu # CPU version (amd64 &amp; arm64)</div>
235235
<div class="line">mfc:vx.x.x-gpu # GPU version (amd64 &amp; arm64)</div>
236236
<div class="line">mfc:vx.x.x-xxx-ubuntu-xx.xx # amd64 natively-supported version</div>
237237
<div class="line">mfc:vx.x.x-xxx-ubuntu-xx.xx-arm # arm64 natively-supported version</div>
238-
</div><!-- fragment --><h3 class="doxsection"><a class="anchor" id="autotoc_md124"></a>
238+
</div><!-- fragment --><h3 class="doxsection"><a class="anchor" id="autotoc_md165"></a>
239239
Architecture Support</h3>
240240
<p>You can specify your architecture with <span class="tt">--platform &lt;os&gt;/&lt;arch&gt;</span>, typically either <span class="tt">linux/amd64</span> or <span class="tt">linux/arm64</span>. If you are unsure, Docker automatically selects the compatible image with your system architecture. If native support isn't available, QEMU emulation is enabled for the following architectures, albeit with degraded performance. </p><div class="fragment"><div class="line">linux/amd64</div>
241241
<div class="line">linux/amd64/v2</div>

0 commit comments

Comments
 (0)