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
Make sure ``amrex/`` and ``artemis/`` are placed alongside each other in your filesystem.
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.
31
37
32
-
3. **Build ARTEMIS**:
38
+
Obtaining the Source Code
39
+
^^^^^^^^^^^^^^^^^^^^^^^^^^
33
40
34
-
1. Navigate to the ``Exec/`` folder inside ``artemis/``.
35
-
2. Build with ``make -j 4``, for example:
41
+
Clone both AMReX and ARTEMIS from their respective GitHub repositories:
By default, *LLG* is enabled (``USE_LLG = TRUE``). You can explicitly switch it on/off:
48
+
Ensure the directory structure appears as:
43
49
44
-
- **Without LLG**:
50
+
.. code-block:: text
45
51
46
-
.. code-block:: bash
52
+
parent_directory/
53
+
├── amrex/
54
+
└── artemis/
47
55
48
-
make -j 4 USE_LLG=FALSE
56
+
Understanding the Build System
57
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
49
58
50
-
- **With LLG**:
59
+
ARTEMIS supports both GNU Make and CMake build systems. The choice depends on your preference and platform requirements:
51
60
52
-
.. code-block:: bash
61
+
- **GNU Make**: Simpler configuration, suitable for development and testing
62
+
- **CMake**: More flexible, better for complex builds and integration with other tools
53
63
54
-
make -j 4 USE_LLG=TRUE
64
+
Key build flags control physics models and performance optimizations:
55
65
56
-
To enable GPU acceleration (e.g., CUDA), set ``USE_GPU=TRUE`` in the make command. Check the ``GNUmakefile`` or other build scripts for additional optional flags like MPI, OpenMP, etc.
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
68
+
69
+
Standard Build Process
70
+
^^^^^^^^^^^^^^^^^^^^^^^
71
+
72
+
For GNU Make builds, navigate to the execution directory and compile:
73
+
74
+
.. code-block:: bash
75
+
76
+
cd artemis/
77
+
make -j 4
78
+
79
+
For CMake builds, create a separate build directory:
80
+
81
+
.. code-block:: bash
82
+
83
+
cd artemis
84
+
mkdir build &&cd build
85
+
cmake .. -DCMAKE_BUILD_TYPE=Release
86
+
cmake --build . -j 4
87
+
88
+
Both methods produce an executable ready for simulation. By default, the Landau-Lifshitz-Gilbert equation is enabled, allowing for magnon-photon coupling simulations.
89
+
90
+
Build Verification
91
+
^^^^^^^^^^^^^^^^^^
92
+
93
+
After successful compilation, verify the build by running a test simulation. The executable will be located in the build directory or top directory depending on your build method.
94
+
95
+
For detailed instructions on setting up and running ARTEMIS simulations, see :ref:`usage_run_artemis`.
96
+
97
+
Advanced Build Options
98
+
-----------------------
99
+
100
+
Alternative Build Systems
101
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
102
+
103
+
**GNU Make with Custom Flags:**
104
+
105
+
Disable LLG physics:
106
+
107
+
.. code-block:: bash
108
+
109
+
make -j 4 USE_LLG=FALSE
110
+
111
+
Enable GPU acceleration:
112
+
113
+
.. code-block:: bash
114
+
115
+
make -j 4 USE_GPU=TRUE
116
+
117
+
**CMake with Explicit Control:**
118
+
119
+
Disable LLG equation:
120
+
121
+
.. code-block:: bash
122
+
123
+
cmake -S . -B build \
124
+
-DCMAKE_BUILD_TYPE=Release \
125
+
-DWarpX_MAG_LLG=OFF
126
+
cmake --build build -j 4
127
+
128
+
Performance Optimizations
129
+
~~~~~~~~~~~~~~~~~~~~~~~~~~
130
+
131
+
**MPI + OpenMP Build:**
132
+
133
+
.. code-block:: bash
134
+
135
+
cmake -S . -B build \
136
+
-DCMAKE_BUILD_TYPE=Release \
137
+
-DWarpX_MPI=ON \
138
+
-DWarpX_COMPUTE=OMP \
139
+
-DWarpX_MAG_LLG=ON
140
+
cmake --build build -j 4
141
+
142
+
**GPU Build with CUDA:**
143
+
144
+
.. code-block:: bash
145
+
146
+
cmake -S . -B build \
147
+
-DCMAKE_BUILD_TYPE=Release \
148
+
-DWarpX_COMPUTE=CUDA \
149
+
-DWarpX_MPI=ON \
150
+
-DWarpX_MAG_LLG=ON \
151
+
-DAMReX_CUDA_ARCH=8.0 # Adjust for your GPU architecture
0 commit comments