-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
--- | ||
title: Setup | ||
--- | ||
|
||
|
||
Welcome to the WarpX tutorials! | ||
Here you can find a guide on how to set up your system to be able to run and analyze WarpX simulations. | ||
Let's roll 💃🕺. | ||
|
||
|
||
## Install the dependencies with Conda (Windows, macOS, Linux) | ||
|
||
As a first step get [Conda](https://docs.conda.io/en/latest/) and configure it with `libmamba`. | ||
|
||
~~~ | ||
conda update -y -n base conda | ||
conda install -y -n base conda-libmamba-solver | ||
conda config --set solver libmamba | ||
conda config --set auto_activate_base false | ||
~~~ | ||
{: .source} | ||
|
||
|
||
Create a virtual environment for WarpX and install the dependencies. | ||
~~~ | ||
conda create -n warpx -c conda-forge blaspp boost ccache cmake compilers git "heffte=*=mpi_mpich*" | ||
lapackpp "openpmd-api=*=mpi_mpich*" openpmd-viewer python make numpy pandas scipy yt | ||
"fftw=*=mpi_mpich*" pkg-config matplotlib mamba mpich mpi4py ninja pip virtualenv | ||
conda activate warpx | ||
~~~ | ||
{: .source} | ||
|
||
|
||
## Build WarpX | ||
|
||
Get the source code | ||
~~~ | ||
git clone https://github.com/ECP-WarpX/WarpX.git $HOME/src/warpx | ||
cd $HOME/src/warpx | ||
~~~ | ||
{: .source} | ||
|
||
Configure the build | ||
~~~ | ||
cmake -S . -B build | ||
~~~ | ||
{: .source} | ||
|
||
When configuring, you can pass different flags that enble or disable various options. | ||
For example: | ||
~~~ | ||
cmake -S . -B build -DWarpX_DIMS=1 -DCMAKE_BUILD_TYPE=Debug | ||
~~~ | ||
will compile the code in 1D geometry and in debug mode. | ||
You can find the list of the build options and their default values | ||
[here](https://warpx.readthedocs.io/en/latest/install/cmake.html#build-options). | ||
For these tutorials, we compile in 1D, 2D, 3D and enable FFT calculations. | ||
~~~ | ||
cmake -S . -B build -DWarpX_DIMS="1;2;3" -DWarpX_FFT=ON | ||
~~~ | ||
|
||
|
||
|
||
|
||
# compile | ||
# on Windows: --config RelWithDebInfo | ||
cmake --build build -j 4 | ||
|
||
# executables for WarpX are now in build/bin/ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
{% include links.md %} |