Users

Our community is here to help. Please report installation problems in case you should get stuck.

Choose one of the installation methods below to get started:

../_images/hpc.svg

HPC Systems

If want to use WarpX on a specific high-performance computing (HPC) systems, jump directly to our HPC system-specific documentation.

../_images/conda.svg

Using the Conda Package

A package for WarpX is available via the Conda package manager.

Tip

We recommend to configure your conda to use the faster libmamba dependency solver.

conda update -y -n base conda
conda install -y -n base conda-libmamba-solver
conda config --set solver libmamba

We recommend to deactivate that conda self-activates its base environment. This avoids interference with the system and other package managers.

conda config --set auto_activate_base false
conda create -n warpx -c conda-forge warpx
conda activate warpx

Note

The warpx conda package does not yet provide GPU support.

../_images/spack.svg

Using the Spack Package

Packages for WarpX are available via the Spack package manager. The package warpx installs executables and the package py-warpx includes Python bindings, i.e. PICMI.

# optional: activate Spack binary caches
spack mirror add rolling https://binaries.spack.io/develop
spack buildcache keys --install --trust

# see `spack info py-warpx` for build options.
# optional arguments:  -mpi ^warpx dims=2 compute=cuda
spack install py-warpx
spack load py-warpx

See spack info warpx or spack info py-warpx and the official Spack tutorial for more information.

../_images/pypi.svg

Using the PyPI Package

Given that you have the WarpX dependencies installed, you can use pip to install WarpX with PICMI from source:

python3 -m pip install -U pip
python3 -m pip install -U build packaging setuptools wheel
python3 -m pip install -U cmake

python3 -m pip wheel -v git+https://github.com/ECP-WarpX/WarpX.git
python3 -m pip install *whl

In the future, will publish pre-compiled binary packages on PyPI for faster installs. (Consider using conda in the meantime.)

../_images/brew.svg

Using the Brew Package

Note

Coming soon.

../_images/cmake.svg

From Source with CMake

After installing the WarpX dependencies, you can also install WarpX from source with CMake:

# get the source code
git clone https://github.com/ECP-WarpX/WarpX.git $HOME/src/warpx
cd $HOME/src/warpx

# configure
cmake -S . -B build

# optional: change configuration
ccmake build

# compile
#   on Windows:          --config RelWithDebInfo
cmake --build build -j 4

# executables for WarpX are now in build/bin/

We document the details in the developer installation.

Tips for macOS Users

Tip

Before getting started with package managers, please check what you manually installed in /usr/local. If you find entries in bin/, lib/ et al. that look like you manually installed MPI, HDF5 or other software in the past, then remove those files first.

If you find software such as MPI in the same directories that are shown as symbolic links then it is likely you brew installed software before. If you are trying annother package manager than brew, run brew unlink … on such packages first to avoid software incompatibilities.

See also: A. Huebl, Working With Multiple Package Managers, Collegeville Workshop (CW20), 2020