Skip to content

Commit 50f2e0e

Browse files
author
MFC Action
committed
Docs @ 605ee69
1 parent b2746a7 commit 50f2e0e

File tree

7 files changed

+105
-104
lines changed

7 files changed

+105
-104
lines changed

documentation/md_case.html

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

documentation/md_getting-started.html

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,8 @@
138138
<h1><a class="anchor" id="autotoc_md65"></a>
139139
Fetching MFC</h1>
140140
<p>You can either download MFC's <a href="https://github.com/MFlowCode/MFC/releases/latest">latest release from GitHub</a> or clone the repository:</p>
141-
<div class="fragment"><div class="line">$ git clone https://github.com/MFlowCode/MFC.git</div>
142-
<div class="line">$ cd MFC</div>
143-
<div class="line">$ git checkout &lt;release tag&gt;</div>
141+
<div class="fragment"><div class="line">git clone https://github.com/MFlowCode/MFC.git</div>
142+
<div class="line">cd MFC</div>
144143
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md66"></a>
145144
Build Environment</h1>
146145
<p>MFC can be built in multiple ways on various operating systems. Please select your desired configuration from the list bellow:</p>
@@ -151,20 +150,20 @@ <h1><a class="anchor" id="autotoc_md65"></a>
151150
<ul>
152151
<li><b>On supported clusters:</b> Load environment modules</li>
153152
</ul>
154-
<div class="fragment"><div class="line">$ . ./mfc.sh load</div>
153+
<div class="fragment"><div class="line">. ./mfc.sh load</div>
155154
</div><!-- fragment --><ul>
156155
<li><b>Via <a href="https://wiki.debian.org/Aptitude">Aptitude</a>:</b></li>
157156
</ul>
158-
<div class="fragment"><div class="line">$ sudo apt update</div>
159-
<div class="line">$ sudo apt upgrade</div>
160-
<div class="line">$ sudo apt install tar wget make cmake gcc g++ \</div>
157+
<div class="fragment"><div class="line">sudo apt update</div>
158+
<div class="line">sudo apt upgrade</div>
159+
<div class="line">sudo apt install tar wget make cmake gcc g++ \</div>
161160
<div class="line"> python3 python3-dev \</div>
162161
<div class="line"> &quot;openmpi-*&quot; libopenmpi-dev</div>
163162
</div><!-- fragment --><ul>
164163
<li><b>Via <a href="https://wiki.archlinux.org/title/pacman">Pacman</a>:</b></li>
165164
</ul>
166-
<div class="fragment"><div class="line">$ sudo pacman -Syu</div>
167-
<div class="line">$ sudo pacman -S base-devel coreutils \</div>
165+
<div class="fragment"><div class="line">sudo pacman -Syu</div>
166+
<div class="line">sudo pacman -S base-devel coreutils \</div>
168167
<div class="line"> git ninja gcc-fortran \</div>
169168
<div class="line"> cmake openmpi python3 \</div>
170169
<div class="line"> python-pip openssh \</div>
@@ -203,32 +202,31 @@ <h1><a class="anchor" id="autotoc_md65"></a>
203202
</details>
204203
<details >
205204
<summary >
206-
MacOS (x86 and Apple Silicon)</summary>
205+
MacOS</summary>
207206
<p></p>
208-
<p><b>Note:</b> macOS remains the most difficult platform to consistently compile MFC on. If you run into issues, we suggest you try using Docker (instructions above).</p>
209207
<ul>
210-
<li><b>MacOS v10.15 (Catalina) or newer [ZSH]</b> (Verify with <code>echo $SHELL</code>)</li>
208+
<li><b>If you use [ZSH]</b> (Verify with <code>echo $SHELL</code>)</li>
211209
</ul>
212-
<div class="fragment"><div class="line">$ touch ~/.zshrc</div>
213-
<div class="line">$ open ~/.zshrc</div>
210+
<div class="fragment"><div class="line">touch ~/.zshrc</div>
211+
<div class="line">open ~/.zshrc</div>
214212
</div><!-- fragment --><ul>
215-
<li><b>Older than MacOS v10.15 (Catalina) [BASH]</b> (Verify with <code>echo $SHELL</code>)</li>
213+
<li><b>If you use [BASH]</b> (Verify with <code>echo $SHELL</code>)</li>
216214
</ul>
217-
<div class="fragment"><div class="line">$ touch ~/.bash_profile</div>
218-
<div class="line">$ open ~/.bash_profile</div>
219-
</div><!-- fragment --><p>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 <code>open-mpi</code> incompatibility with <code>clang</code>-based <code>gcc</code> on macOS: <a href="https://stackoverflow.com/questions/27930481/how-to-build-openmpi-with-homebrew-and-gcc-4-9">here</a>. We do <em>not</em> support <code>clang</code> due to conflicts with our Silo dependency.</p>
215+
<div class="fragment"><div class="line">touch ~/.bash_profile</div>
216+
<div class="line">open ~/.bash_profile</div>
217+
</div><!-- fragment --><p>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 13, 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 <code>open-mpi</code> incompatibility with <code>clang</code>-based <code>gcc</code> on macOS: <a href="https://stackoverflow.com/questions/27930481/how-to-build-openmpi-with-homebrew-and-gcc-4-9">here</a>. We do <em>not</em> support <code>clang</code> due to conflicts with the Silo dependency.</p>
220218
<div class="fragment"><div class="line"># === MFC MPI Installation ===</div>
221-
<div class="line">export MFC_GCC_VER=11</div>
219+
<div class="line">export MFC_GCC_VER=13</div>
222220
<div class="line">export OMPI_MPICC=gcc-$MFC_GCC_VER</div>
223221
<div class="line">export OMPI_CXX=g++-$MFC_GCC_VER</div>
224222
<div class="line">export OMPI_FC=gfortran-$MFC_GCC_VER</div>
225223
<div class="line">export CC=gcc-$MFC_GCC_VER</div>
226224
<div class="line">export CXX=g++-$MFC_GCC_VER</div>
227225
<div class="line">export FC=gfortran-$MFC_GCC_VER</div>
228226
<div class="line"># === MFC MPI Installation ===</div>
229-
</div><!-- fragment --><p><b>Close the open editor and terminal window</b>. Open a <b>new terminal</b> window before executing the commands bellow.</p>
230-
<div class="fragment"><div class="line">$ brew install wget make python make cmake coreutils gcc@$MFC_GCC_VER</div>
231-
<div class="line">$ HOMEBREW_MAKE_JOBS=$(nproc) brew install --cc=gcc-$MFC_GCC_VER --verbose --build-from-source open-mpi</div>
227+
</div><!-- fragment --><p><b>Close the open editor and terminal window</b>. Open a <b>new terminal</b> window before executing the commands below.</p>
228+
<div class="fragment"><div class="line">brew install wget make python make cmake coreutils gcc@$MFC_GCC_VER</div>
229+
<div class="line">HOMEBREW_MAKE_JOBS=$(nproc) brew install --cc=gcc-$MFC_GCC_VER --verbose --build-from-source open-mpi</div>
232230
</div><!-- fragment --><p>They will download the dependencies MFC requires to build itself. <code>open-mpi</code> will be compiled from source, using the version of GCC we specified above with the environment variables <code>HOMEBREW_CC</code> and <code>HOMEBREW_CXX</code>. Building this package might take a while.</p>
233231
<p></p>
234232
</details>
@@ -240,16 +238,16 @@ <h1><a class="anchor" id="autotoc_md65"></a>
240238
<p>First install Docker and Git:</p><ul>
241239
<li>Windows: <a href="https://docs.docker.com/get-docker/">Docker</a> + <a href="https://git-scm.com/downloads">Git</a>.</li>
242240
<li>macOS: <code>brew install git docker</code> (requires <a href="https://brew.sh/">Homebrew</a>).</li>
243-
<li>Other systems: <div class="fragment"><div class="line">$ sudo apt install git docker # Debian / Ubuntu via Aptitude</div>
244-
<div class="line">$ sudo pacman -S git docker # Arch Linux via Pacman</div>
241+
<li>Other systems: <div class="fragment"><div class="line">sudo apt install git docker # Debian / Ubuntu via Aptitude</div>
242+
<div class="line">sudo pacman -S git docker # Arch Linux via Pacman</div>
245243
</div><!-- fragment --></li>
246244
</ul>
247245
<p>Once Docker and Git are installed on your system, clone MFC with</p>
248-
<div class="fragment"><div class="line">$ git clone https://github.com/MFlowCode/MFC</div>
249-
<div class="line">$ cd MFC </div>
246+
<div class="fragment"><div class="line">git clone https://github.com/MFlowCode/MFC</div>
247+
<div class="line">cd MFC </div>
250248
</div><!-- fragment --><p>To fetch the prebuilt Docker image and enter an interactive bash session with the recommended settings applied, run</p>
251-
<div class="fragment"><div class="line">$ ./mfc.sh docker # If on \*nix/macOS</div>
252-
<div class="line"> .\mfc.bat docker # If on Windows</div>
249+
<div class="fragment"><div class="line">./mfc.sh docker # If on \*nix/macOS</div>
250+
<div class="line">.\mfc.bat docker # If on Windows</div>
253251
</div><!-- fragment --><p>We automatically mount and configure the proper permissions in order for you to access your local copy of MFC, available at <code>~/MFC</code>. You will be logged-in as the <code>me</code> user with root permissions.</p>
254252
<p>:warning: The state of your container is entirely transient, except for the MFC mount. Thus, any modification outside of <code>~/MFC</code> should be considered as permanently lost upon session exit.</p>
255253
<p></p>
@@ -270,22 +268,22 @@ <h1><a class="anchor" id="autotoc_md67"></a>
270268
<p><em>⚠️ The <code>--gpu</code> option requires that your compiler supports OpenACC for Fortran for your target GPU architecture.</em></p>
271269
<p>When these options are given to <code>mfc.sh</code>, 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 <code>--no-mpi</code> once, for the change to be permanent.</p>
272270
<p>MFC is composed of three codes, each being a separate <em>target</em>. By default, all targets (<code>pre_process</code>, <code>simulation</code>, and <code>post_process</code>) are selected. To only select a subset, use the <code>-t</code> (i.e., <code>--targets</code>) argument. For a detailed list of options, arguments, and features, please refer to <code>./mfc.sh build --help</code>.</p>
273-
<p>Most first-time users will want to build MFC using 8 threads (or more!) with MPI support: </p><div class="fragment"><div class="line">$ ./mfc.sh build -j 8</div>
271+
<p>Most first-time users will want to build MFC using 8 threads (or more!) with MPI support: </p><div class="fragment"><div class="line">./mfc.sh build -j 8</div>
274272
</div><!-- fragment --><p>Examples:</p>
275273
<ul>
276-
<li>Build MFC using 8 threads with MPI and GPU acceleration: <code>$ ./mfc.sh build --gpu -j 8</code>.</li>
277-
<li>Build MFC using a single thread without MPI, GPU, and Debug support: <code>$ ./mfc.sh build --no-mpi</code>.</li>
278-
<li>Build MFC's <code>simulation</code> code in Debug mode with MPI and GPU support: <code>$ ./mfc.sh build --debug --gpu -t simulation</code>.</li>
274+
<li>Build MFC using 8 threads with MPI and GPU acceleration: <code>./mfc.sh build --gpu -j 8</code>.</li>
275+
<li>Build MFC using a single thread without MPI, GPU, and Debug support: <code>./mfc.sh build --no-mpi</code>.</li>
276+
<li>Build MFC's <code>simulation</code> code in Debug mode with MPI and GPU support: <code>./mfc.sh build --debug --gpu -t simulation</code>.</li>
279277
</ul>
280278
<h1><a class="anchor" id="autotoc_md68"></a>
281279
Running the Test Suite</h1>
282280
<p>Run MFC's test suite with 8 threads:</p>
283-
<div class="fragment"><div class="line">$ ./mfc.sh test -j 8</div>
281+
<div class="fragment"><div class="line">./mfc.sh test -j 8</div>
284282
</div><!-- fragment --><p>Please refer to the <a class="el" href="md_testing.html">Testing</a> document for more information.</p>
285283
<h1><a class="anchor" id="autotoc_md69"></a>
286284
Running an Example Case</h1>
287285
<p>MFC has example cases in the <code>examples</code> folder. You can run such a case interactively using 2 tasks by typing:</p>
288-
<div class="fragment"><div class="line">$ ./mfc.sh run examples/2D_shockbubble/case.py -n 2</div>
286+
<div class="fragment"><div class="line">./mfc.sh run examples/2D_shockbubble/case.py -n 2</div>
289287
</div><!-- fragment --><p>Please refer to the <a class="el" href="md_running.html">Running</a> document for more information on <code>case.py</code> files and how to run them. </p>
290288
</div></div><!-- contents -->
291289
</div><!-- PageDoc -->

0 commit comments

Comments
 (0)