You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -73,7 +73,7 @@ For GNU Make builds, navigate to the execution directory and compile:
73
73
74
74
.. code-block:: bash
75
75
76
-
cd artemis/Exec/
76
+
cd artemis/
77
77
make -j 4
78
78
79
79
For CMake builds, create a separate build directory:
@@ -90,7 +90,7 @@ Both methods produce an executable ready for simulation. By default, the Landau-
90
90
Build Verification
91
91
^^^^^^^^^^^^^^^^^^
92
92
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.
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.
38
47
39
-
Build
40
-
-----
48
+
Obtaining the Source Code
49
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
41
50
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:
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.
46
62
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
+
^^^^^^^^^^^^^^^^^^^^^^^
48
65
49
-
**GPU build (default):**
66
+
Navigate to the FerroX/Exec directory and build using your preferred method:
67
+
68
+
**GNU Make (GPU default):**
50
69
51
70
.. code-block:: bash
52
71
72
+
cd FerroX/Exec
53
73
make -j 4
54
74
55
-
**CPU build:**
75
+
**CMake (basic):**
56
76
57
77
.. code-block:: bash
58
78
59
-
make -j 4 USE_CUDA=FALSE
79
+
cd FerroX
80
+
cmake -S . -B build
81
+
cmake --build build -j 4
60
82
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:**
62
95
63
96
.. code-block:: bash
64
97
98
+
# CPU build
99
+
make -j 4 USE_CUDA=FALSE
100
+
101
+
# CPU build with SUNDIALS
65
102
make -j 4 USE_CUDA=FALSE USE_SUNDIALS=TRUE
66
103
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>`_.
69
105
70
-
FerroX also supports building with CMake, which automatically downloads and builds dependencies.
71
-
72
-
**Basic CPU build:**
106
+
**CMake with External Dependencies:**
73
107
74
108
.. code-block:: bash
75
109
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
78
114
79
-
**GPU build with CUDA:**
115
+
Performance Optimizations
116
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
117
+
118
+
**GPU Acceleration:**
80
119
81
120
.. code-block:: bash
82
121
83
122
cmake -S . -B build -DFerroX_COMPUTE=CUDA
84
123
cmake --build build -j 4
85
124
86
-
**Advanced CMake Configurations:**
87
-
88
-
CPU build with embedded boundaries and time-dependent support:
125
+
**CPU Optimizations:**
89
126
90
127
.. code-block:: bash
91
128
92
129
cmake -S . -B build \
93
130
-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 \
94
141
-DFerroX_EB=ON \
95
142
-DFerroX_TIME_DEPENDENT=ON
96
143
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>`_.
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:
182
214
183
215
.. code-block:: bash
184
216
185
217
module load cudatoolkit
186
218
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).
0 commit comments