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
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.
24
37
25
-
Clone ARTEMIS
26
-
~~~~~~~~~~~~~
38
+
Obtaining the Source Code
39
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
27
40
28
-
Clone ARTEMIS in the same directory as AMReX:
41
+
Clone both AMReX and ARTEMIS from their respective GitHub repositories:
Make sure ``amrex/`` and ``artemis/`` are placed alongside each other in your filesystem.
48
+
Ensure the directory structure appears as:
35
49
36
-
Build ARTEMIS
37
-
~~~~~~~~~~~~~
50
+
.. code-block:: text
38
51
39
-
ARTEMIS supports both GNU Make and CMake build systems with various configuration options.
52
+
parent_directory/
53
+
├── amrex/
54
+
└── artemis/
40
55
41
-
**Key Build Flags:**
56
+
Understanding the Build System
57
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42
58
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:
45
60
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
48
63
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:
50
65
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
52
68
53
-
cd artemis/Exec/
69
+
Standard Build Process
70
+
^^^^^^^^^^^^^^^^^^^^^^^
54
71
55
-
**Basic build (LLG enabled by default):**
72
+
For GNU Make builds, navigate to the execution directory and compile:
56
73
57
74
.. code-block:: bash
58
75
76
+
cd artemis/Exec/
59
77
make -j 4
60
78
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:
66
80
67
81
.. code-block:: bash
68
82
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
74
87
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.
76
89
77
-
**Enabling GPU Acceleration (Performance Flag):**
90
+
Build Verification
91
+
^^^^^^^^^^^^^^^^^^
78
92
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.
80
94
81
-
GPU build (LLG enabled by default):
95
+
Advanced Build Options
96
+
-----------------------
82
97
83
-
.. code-block:: bash
98
+
Alternative Build Systems
99
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
84
100
85
-
make -j 4 USE_GPU=TRUE
101
+
**GNU Make with Custom Flags:**
86
102
87
-
GPU build with explicit LLG:
103
+
Disable LLG physics:
88
104
89
105
.. code-block:: bash
90
106
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
102
108
103
-
**Basic CPU Build (LLG enabled by default):**
109
+
Enable GPU acceleration:
104
110
105
111
.. code-block:: bash
106
112
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
111
114
112
-
**Advanced CMake Configurations:**
115
+
**CMake with Explicit Control:**
113
116
114
-
Explicitly control LLG (Physics Flag):
117
+
Disable LLG equation:
115
118
116
119
.. code-block:: bash
117
120
@@ -120,9 +123,10 @@ Explicitly control LLG (Physics Flag):
120
123
-DWarpX_MAG_LLG=OFF
121
124
cmake --build build -j 4
122
125
123
-
**Performance-Oriented Builds:**
126
+
Performance Optimizations
127
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
124
128
125
-
MPI + OpenMP Build:
129
+
**MPI + OpenMP Build:**
126
130
127
131
.. code-block:: bash
128
132
@@ -133,7 +137,7 @@ MPI + OpenMP Build:
133
137
-DWarpX_MAG_LLG=ON
134
138
cmake --build build -j 4
135
139
136
-
GPU Build with CUDA (enabling GPU acceleration):
140
+
**GPU Build with CUDA:**
137
141
138
142
.. code-block:: bash
139
143
@@ -145,37 +149,48 @@ GPU Build with CUDA (enabling GPU acceleration):
145
149
-DAMReX_CUDA_ARCH=8.0 # Adjust for your GPU architecture
0 commit comments