Skip to content

Commit 18e963d

Browse files
committed
Update structure
1 parent 1d9a54b commit 18e963d

3 files changed

Lines changed: 188 additions & 144 deletions

File tree

Docs/source/install/artemis.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ AMReX and ARTEMIS must be cloned in the same directory.
2424
2525
git clone https://github.com/AMReX-Codes/amrex.git
2626
git clone https://github.com/AMReX-Microelectronics/artemis.git
27-
cd artemis/Exec/
27+
cd artemis/
2828
make -j 4
2929
3030
Detailed Installation Process
@@ -73,7 +73,7 @@ For GNU Make builds, navigate to the execution directory and compile:
7373

7474
.. code-block:: bash
7575
76-
cd artemis/Exec/
76+
cd artemis/
7777
make -j 4
7878
7979
For CMake builds, create a separate build directory:
@@ -90,7 +90,7 @@ Both methods produce an executable ready for simulation. By default, the Landau-
9090
Build Verification
9191
^^^^^^^^^^^^^^^^^^
9292

93-
After successful compilation, verify the build by checking the executable exists and can display help information. The executable will be located in the build directory or Exec folder depending on your build method.
93+
After successful compilation, verify the build by checking the executable exists and can display help information. The executable will be located in the build directory or top directory depending on your build method.
9494

9595
Advanced Build Options
9696
-----------------------

Docs/source/install/ferrox.rst

Lines changed: 98 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -24,93 +24,146 @@ Please `report installation problems <https://github.com/AMReX-Microelectronics/
2424
Installation
2525
------------
2626

27-
First, download the AMReX repository:
27+
Quick Start
28+
~~~~~~~~~~~
29+
30+
**Prerequisites:** Git, C++ compiler, CUDA toolkit (for GPU builds)
31+
32+
**Build Commands:**
2833

2934
.. code-block:: bash
30-
35+
3136
git clone https://github.com/AMReX-Codes/amrex.git
37+
git clone https://github.com/AMReX-Microelectronics/FerroX.git
38+
cd FerroX/Exec && make -j 4
3239
33-
At the same directory level as AMReX, download the FerroX Repository:
40+
Detailed Installation Process
41+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3442

35-
.. code-block:: bash
43+
Prerequisites and Dependencies
44+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3645

37-
git clone https://github.com/AMReX-Microelectronics/FerroX.git
46+
FerroX requires a modern C++ compiler, Git version control, and optional dependencies like CUDA toolkit for GPU acceleration and SUNDIALS for advanced time integration. The AMReX library is required and can be obtained automatically through CMake or manually cloned.
3847

39-
Build
40-
-----
48+
Obtaining the Source Code
49+
^^^^^^^^^^^^^^^^^^^^^^^^^^
4150

42-
FerroX supports both GNU Make and CMake build systems with various configuration options.
51+
Download the AMReX repository at the same directory level as where you plan to install FerroX:
4352

44-
Option 1: Build with GNU Make
45-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53+
.. code-block:: bash
54+
55+
git clone https://github.com/AMReX-Codes/amrex.git
56+
git clone https://github.com/AMReX-Microelectronics/FerroX.git
57+
58+
Understanding the Build System
59+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60+
61+
FerroX supports two build systems: GNU Make for quick builds and CMake for advanced configuration. GNU Make is simpler but offers fewer options, while CMake provides comprehensive dependency management and cross-platform support.
4662

47-
Make sure that the AMReX and FerroX are cloned in the same location in your filesystem. Navigate to the Exec folder within the FerroX directory and execute the following commands:
63+
Standard Build Process
64+
^^^^^^^^^^^^^^^^^^^^^^^
4865

49-
**GPU build (default):**
66+
Navigate to the FerroX/Exec directory and build using your preferred method:
67+
68+
**GNU Make (GPU default):**
5069

5170
.. code-block:: bash
5271
72+
cd FerroX/Exec
5373
make -j 4
5474
55-
**CPU build:**
75+
**CMake (basic):**
5676

5777
.. code-block:: bash
5878
59-
make -j 4 USE_CUDA=FALSE
79+
cd FerroX
80+
cmake -S . -B build
81+
cmake --build build -j 4
6082
61-
**CPU build with SUNDIALS support:**
83+
Build Verification
84+
^^^^^^^^^^^^^^^^^^
85+
86+
After successful compilation, verify the installation by running the test cases provided in the Examples directory. Check that the executable runs without errors and produces expected output files.
87+
88+
Advanced Build Options
89+
----------------------
90+
91+
Alternative Build Systems
92+
~~~~~~~~~~~~~~~~~~~~~~~~~~
93+
94+
**GNU Make Options:**
6295

6396
.. code-block:: bash
6497
98+
# CPU build
99+
make -j 4 USE_CUDA=FALSE
100+
101+
# CPU build with SUNDIALS
65102
make -j 4 USE_CUDA=FALSE USE_SUNDIALS=TRUE
66103
67-
Option 2: Build with CMake
68-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
104+
For SUNDIALS support with GNU Make, first follow the SUNDIALS installation steps as described `here <https://github.com/AMReX-Microelectronics/MagneX/blob/development/Exec/README_sundials>`_.
69105

70-
FerroX also supports building with CMake, which automatically downloads and builds dependencies.
71-
72-
**Basic CPU build:**
106+
**CMake with External Dependencies:**
73107

74108
.. code-block:: bash
75109
76-
cmake -S . -B build
77-
cmake --build build -j 4
110+
# Use external AMReX installation
111+
cmake -S . -B build \
112+
-DFerroX_amrex_internal=OFF \
113+
-DAMReX_DIR=/path/to/amrex/lib/cmake/AMReX
78114
79-
**GPU build with CUDA:**
115+
Performance Optimizations
116+
~~~~~~~~~~~~~~~~~~~~~~~~~~
117+
118+
**GPU Acceleration:**
80119

81120
.. code-block:: bash
82121
83122
cmake -S . -B build -DFerroX_COMPUTE=CUDA
84123
cmake --build build -j 4
85124
86-
**Advanced CMake Configurations:**
87-
88-
CPU build with embedded boundaries and time-dependent support:
125+
**CPU Optimizations:**
89126

90127
.. code-block:: bash
91128
92129
cmake -S . -B build \
93130
-DFerroX_COMPUTE=OMP \
131+
-DFerroX_SIMD=ON
132+
133+
Physics Module Configuration
134+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135+
136+
**Embedded Boundaries and Time-Dependent Features:**
137+
138+
.. code-block:: bash
139+
140+
cmake -S . -B build \
94141
-DFerroX_EB=ON \
95142
-DFerroX_TIME_DEPENDENT=ON
96143
97-
GPU build with SUNDIALS support:
144+
**SUNDIALS Integration:**
145+
146+
For SUNDIALS library integration, first follow the SUNDIALS installation steps as described `here <https://github.com/AMReX-Microelectronics/MagneX/blob/development/Exec/README_sundials>`_.
98147

99148
.. code-block:: bash
100149
101150
cmake -S . -B build \
102-
-DFerroX_COMPUTE=CUDA \
103-
-DFerroX_SUNDIALS=ON
151+
-DFerroX_SUNDIALS=ON \
152+
-DFerroX_sundials_src=/path/to/sundials/source
104153
105-
Debug build with print options enabled:
154+
Debug and Development Options
155+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156+
157+
**Debug Build with Verbose Output:**
106158

107159
.. code-block:: bash
108160
109161
cmake -S . -B build \
110162
-DCMAKE_BUILD_TYPE=Debug \
111-
-DFerroX_PRINT_HIGH=ON
163+
-DFerroX_PRINT_HIGH=ON \
164+
-DFerroX_PRINT_MEDIUM=ON
112165
113-
**Core CMake Configuration Options:**
166+
**Core Configuration Options:**
114167

115168
- ``-DFerroX_COMPUTE=NOACC/OMP/CUDA/SYCL/HIP`` - Computing backend (default: OMP)
116169
- ``-DFerroX_PRECISION=SINGLE/DOUBLE`` - Floating point precision (default: DOUBLE)
@@ -120,73 +173,47 @@ Debug build with print options enabled:
120173
- ``-DFerroX_MPI=ON/OFF`` - Multi-node support (default: ON)
121174
- ``-DFerroX_SIMD=ON/OFF`` - CPU SIMD acceleration (default: OFF)
122175

123-
**Print Debug Options:**
176+
**Debug Print Options:**
124177

125178
- ``-DFerroX_PRINT_HIGH=ON/OFF`` - High level debug printing (default: OFF)
126179
- ``-DFerroX_PRINT_MEDIUM=ON/OFF`` - Medium level debug printing (default: OFF)
127180
- ``-DFerroX_PRINT_LOW=ON/OFF`` - Low level debug printing (default: OFF)
128181
- ``-DFerroX_PRINT_NAME=ON/OFF`` - Function name debug printing (default: OFF)
129182

130-
**AMReX Configuration Options:**
131-
132-
**Use external AMReX installation:**
133-
134-
.. code-block:: bash
135-
136-
cmake -S . -B build \
137-
-DFerroX_amrex_internal=OFF \
138-
-DAMReX_DIR=/path/to/amrex/lib/cmake/AMReX
183+
Platform-Specific Configurations
184+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
139185

140-
**Use local AMReX source directory:**
186+
**AMReX Source Management:**
141187

142188
.. code-block:: bash
143189
190+
# Use local AMReX source
144191
cmake -S . -B build -DFerroX_amrex_src=/path/to/amrex/source
145-
146-
**Use custom AMReX repository/branch:**
147-
148-
.. code-block:: bash
149-
192+
193+
# Use custom AMReX repository/branch
150194
cmake -S . -B build \
151195
-DFerroX_amrex_repo=https://github.com/user/amrex.git \
152196
-DFerroX_amrex_branch=my_branch
153-
154-
**Test with specific AMReX pull request:**
155-
156-
.. code-block:: bash
157-
197+
198+
# Test with specific AMReX pull request
158199
cmake -S . -B build -DFerroX_amrex_pr=1234
159200
160-
**SUNDIALS Configuration Options:**
161-
162-
**Use external SUNDIALS installation:**
201+
**SUNDIALS External Integration:**
163202

164203
.. code-block:: bash
165204
205+
# Use external SUNDIALS installation
166206
cmake -S . -B build \
167207
-DFerroX_SUNDIALS=ON \
168208
-DFerroX_sundials_internal=OFF \
169209
-DSUNDIALS_DIR=/path/to/sundials/lib/cmake/sundials
170210
171-
**Use local SUNDIALS source directory:**
211+
**HPC System Configuration:**
172212

173-
.. code-block:: bash
174-
175-
cmake -S . -B build \
176-
-DFerroX_SUNDIALS=ON \
177-
-DFerroX_sundials_src=/path/to/sundials/source
178-
179-
**HPC System Notes:**
180-
181-
If you want to use FerroX on a specific high-performance computing (HPC) system, follow the same steps as above. For MPI+CUDA build, make sure that appropriate CUDA modules are loaded. For instance, on Perlmutter you will need to do:
213+
For high-performance computing systems, ensure appropriate modules are loaded. For example, on Perlmutter:
182214

183215
.. code-block:: bash
184216
185217
module load cudatoolkit
186218
187-
Incorporating SUNDIALS
188-
----------------------
189-
190-
If you want to incorporate the SUNDIALS library into your FerroX code, first follow the SUNDIALS installation steps as described `here <https://github.com/AMReX-Microelectronics/MagneX/blob/development/Exec/README_sundials>`_. To build the code with SUNDIALS support enabled, you can include the USE_SUNDIALS=TRUE option with the appropriate build command (refer to the example under the 'Build' heading).
191-
192219

0 commit comments

Comments
 (0)