Skip to content

Commit 85094ed

Browse files
committed
Restructure
1 parent cf0b560 commit 85094ed

1 file changed

Lines changed: 82 additions & 67 deletions

File tree

Docs/source/install/artemis.rst

Lines changed: 82 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -15,103 +15,106 @@ The code couples magnetization physics with electromagnetic fields in a temporal
1515
Installation
1616
------------
1717

18-
Clone AMReX (dependency)
19-
~~~~~~~~~~~~~~~~~~~~~~~~~
18+
Quick Start
19+
~~~~~~~~~~~
20+
21+
AMReX and ARTEMIS must be cloned in the same directory.
2022

2123
.. code-block:: bash
2224
2325
git clone https://github.com/AMReX-Codes/amrex.git
26+
git clone https://github.com/AMReX-Microelectronics/artemis.git
27+
cd artemis/Exec/
28+
make -j 4
29+
30+
Detailed Installation Process
31+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32+
33+
Prerequisites and Dependencies
34+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35+
36+
ARTEMIS requires AMReX as its core dependency. The AMReX library provides the adaptive mesh refinement framework that enables ARTEMIS's high-performance capabilities. Both repositories must be placed alongside each other in your filesystem for the build system to locate the dependencies correctly.
2437

25-
Clone ARTEMIS
26-
~~~~~~~~~~~~~
38+
Obtaining the Source Code
39+
^^^^^^^^^^^^^^^^^^^^^^^^^^
2740

28-
Clone ARTEMIS in the same directory as AMReX:
41+
Clone both AMReX and ARTEMIS from their respective GitHub repositories:
2942

3043
.. code-block:: bash
3144
45+
git clone https://github.com/AMReX-Codes/amrex.git
3246
git clone https://github.com/AMReX-Microelectronics/artemis.git
3347
34-
Make sure ``amrex/`` and ``artemis/`` are placed alongside each other in your filesystem.
48+
Ensure the directory structure appears as:
3549

36-
Build ARTEMIS
37-
~~~~~~~~~~~~~
50+
.. code-block:: text
3851
39-
ARTEMIS supports both GNU Make and CMake build systems with various configuration options.
52+
parent_directory/
53+
├── amrex/
54+
└── artemis/
4055
41-
**Key Build Flags:**
56+
Understanding the Build System
57+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4258

43-
* **Physics Flags (e.g., `USE_LLG`)**: Control which physical models are included. The **Landau-Lifshitz-Gilbert (LLG) equation** enables **ferromagnetic dynamics** and is essential for magnon-photon coupling simulations.
44-
* **Performance Flags (e.g., `USE_GPU`)**: Control hardware acceleration. GPU builds provide significant speedup and excellent scaling on modern supercomputers.
59+
ARTEMIS supports both GNU Make and CMake build systems. The choice depends on your preference and platform requirements:
4560

46-
Option 1: Build with GNU Make
47-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61+
- **GNU Make**: Simpler configuration, suitable for development and testing
62+
- **CMake**: More flexible, better for complex builds and integration with other tools
4863

49-
Navigate to the ``Exec/`` folder inside ``artemis/`` and use one of the following commands:
64+
Key build flags control physics models and performance optimizations:
5065

51-
.. code-block:: bash
66+
- **Physics Flags**: ``USE_LLG`` (GNU Make) or ``WarpX_MAG_LLG`` (CMake) enable the Landau-Lifshitz-Gilbert equation for ferromagnetic dynamics
67+
- **Performance Flags**: ``USE_GPU`` (GNU Make) or ``WarpX_COMPUTE`` (CMake) control hardware acceleration
5268

53-
cd artemis/Exec/
69+
Standard Build Process
70+
^^^^^^^^^^^^^^^^^^^^^^^
5471

55-
**Basic build (LLG enabled by default):**
72+
For GNU Make builds, navigate to the execution directory and compile:
5673

5774
.. code-block:: bash
5875
76+
cd artemis/Exec/
5977
make -j 4
6078
61-
By default, ARTEMIS is configured to include the Landau-Lifshitz-Gilbert (LLG) equation, meaning **`USE_LLG = TRUE` is the default setting**.
62-
63-
**Explicitly control LLG (Physics Flag):**
64-
65-
Build without LLG (disabling ferromagnetic dynamics):
79+
For CMake builds, create a separate build directory:
6680

6781
.. code-block:: bash
6882
69-
make -j 4 USE_LLG=FALSE
70-
71-
Build with LLG (explicitly enabling ferromagnetic dynamics, same as default):
72-
73-
.. code-block:: bash
83+
cd artemis
84+
mkdir build && cd build
85+
cmake .. -DCMAKE_BUILD_TYPE=Release
86+
cmake --build . -j 4
7487
75-
make -j 4 USE_LLG=TRUE
88+
Both methods produce an executable ready for simulation. By default, the Landau-Lifshitz-Gilbert equation is enabled, allowing for magnon-photon coupling simulations.
7689

77-
**Enabling GPU Acceleration (Performance Flag):**
90+
Build Verification
91+
^^^^^^^^^^^^^^^^^^
7892

79-
To leverage the high performance and scalability offered by modern GPUs, set the `USE_GPU` flag.
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.
8094

81-
GPU build (LLG enabled by default):
95+
Advanced Build Options
96+
-----------------------
8297

83-
.. code-block:: bash
98+
Alternative Build Systems
99+
~~~~~~~~~~~~~~~~~~~~~~~~~~
84100

85-
make -j 4 USE_GPU=TRUE
101+
**GNU Make with Custom Flags:**
86102

87-
GPU build with explicit LLG:
103+
Disable LLG physics:
88104

89105
.. code-block:: bash
90106
91-
make -j 4 USE_LLG=TRUE USE_GPU=TRUE
92-
93-
Option 2: Build with CMake
94-
^^^^^^^^^^^^^^^^^^^^^^^^^^^
95-
96-
Create a build directory and configure:
97-
98-
.. code-block:: bash
99-
100-
cd artemis
101-
mkdir build && cd build
107+
make -j 4 USE_LLG=FALSE
102108
103-
**Basic CPU Build (LLG enabled by default):**
109+
Enable GPU acceleration:
104110

105111
.. code-block:: bash
106112
107-
cmake .. -DCMAKE_BUILD_TYPE=Release
108-
cmake --build . -j 4
109-
110-
By default, ARTEMIS CMake builds include the Landau-Lifshitz-Gilbert (LLG) equation, meaning **`-DWarpX_MAG_LLG=ON` is the default setting**.
113+
make -j 4 USE_GPU=TRUE
111114
112-
**Advanced CMake Configurations:**
115+
**CMake with Explicit Control:**
113116

114-
Explicitly control LLG (Physics Flag):
117+
Disable LLG equation:
115118

116119
.. code-block:: bash
117120
@@ -120,9 +123,10 @@ Explicitly control LLG (Physics Flag):
120123
-DWarpX_MAG_LLG=OFF
121124
cmake --build build -j 4
122125
123-
**Performance-Oriented Builds:**
126+
Performance Optimizations
127+
~~~~~~~~~~~~~~~~~~~~~~~~~~
124128

125-
MPI + OpenMP Build:
129+
**MPI + OpenMP Build:**
126130

127131
.. code-block:: bash
128132
@@ -133,7 +137,7 @@ MPI + OpenMP Build:
133137
-DWarpX_MAG_LLG=ON
134138
cmake --build build -j 4
135139
136-
GPU Build with CUDA (enabling GPU acceleration):
140+
**GPU Build with CUDA:**
137141

138142
.. code-block:: bash
139143
@@ -145,37 +149,48 @@ GPU Build with CUDA (enabling GPU acceleration):
145149
-DAMReX_CUDA_ARCH=8.0 # Adjust for your GPU architecture
146150
cmake --build build -j 4
147151
148-
Common CMake Configuration Options
149-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
152+
Compile-Time Configuration Options
153+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
154+
155+
**Common CMake Options:**
150156

151157
- ``-DWarpX_MAG_LLG=ON/OFF`` - Enable/disable LLG equation (default: ON)
152-
- ``-DWarpX_MPI=ON/OFF`` - Enable/disable MPI (default: ON)
153-
- ``-DWarpX_COMPUTE=NOACC/OMP/CUDA/SYCL`` - Set compute backend
154-
- ``-DWarpX_PRECISION=SINGLE/DOUBLE`` - Set floating point precision
155158
- ``-DWarpX_EB=ON/OFF`` - Enable/disable embedded boundaries
156159
- ``-DWarpX_OPENPMD=ON/OFF`` - Enable/disable openPMD I/O
160+
- ``-DWarpX_PRECISION=SINGLE/DOUBLE`` - Set floating point precision
157161
- ``-DCMAKE_BUILD_TYPE=Debug/Release`` - Set build type
162+
- ``-DWarpX_MPI=ON/OFF`` - Enable/disable MPI (default: ON)
163+
- ``-DWarpX_COMPUTE=NOACC/OMP/CUDA/SYCL`` - Set compute backend
164+
165+
**Debug Build Example:**
166+
167+
.. code-block:: bash
168+
169+
cmake -S . -B build \
170+
-DCMAKE_BUILD_TYPE=Debug \
171+
-DWarpX_MAG_LLG=ON
172+
cmake --build build -j 4
158173
159-
AMReX Configuration Options (CMake)
160-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
174+
Platform-Specific Configurations
175+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
161176

162-
Use external AMReX installation:
177+
**External AMReX Installation:**
163178

164179
.. code-block:: bash
165180
166181
cmake -S . -B build \
167182
-DWarpX_amrex_internal=OFF \
168183
-DAMReX_DIR=/path/to/amrex/lib/cmake/AMReX
169184
170-
Use local AMReX source directory:
185+
**Local AMReX Source Directory:**
171186

172187
.. code-block:: bash
173188
174189
cmake -S . -B build -DWarpX_amrex_src=/path/to/amrex/source
175190
176-
*Note: For GNU Make builds, the equivalent is setting* ``AMREX_HOME`` *in the GNUmakefile.*
191+
*Note: For GNU Make builds, set* ``AMREX_HOME`` *in the GNUmakefile.*
177192

178-
Use custom AMReX repository/branch:
193+
**Custom AMReX Repository/Branch:**
179194

180195
.. code-block:: bash
181196

0 commit comments

Comments
 (0)