Dependencies
pyAMReX depends on the following popular third party software. Please see installation instructions below.
a mature C++17 compiler, e.g., GCC 8.4+, Clang 7, NVCC 11.0, MSVC 19.15 or newer
AMReX: we automatically download and compile a copy
pybind11 2.13.0+: we automatically download and compile a copy
Optional dependencies include:
MPI 3.0+: for multi-node and/or multi-GPU execution
for on-node accelerated compute one of either:
OpenMP 3.1+: for threaded CPU execution or
CUDA Toolkit 11.0+ (11.3+ recommended): for Nvidia GPU support (see matching host-compilers) or
ROCm 5.2+ (5.5+ recommended): for AMD GPU support
CCache: to speed up rebuilds (For CUDA support, needs version 3.7.9+ and 4.2+ is recommended)
Ninja: for faster parallel compiles
further optional dependencies of AMReX
-
mpi4py 2.1+: for multi-node and/or multi-GPU execution
pandas 2+: for DataFrame support
For all other systems, we recommend to use a package dependency manager: Pick one of the installation methods below to install all dependencies for pyAMReX development in a consistent manner.
Conda (Linux/macOS/Windows)
Conda/Mamba are cross-compatible, user-level package managers.
Tip
We recommend to configure your conda to use the faster libmamba
dependency solver.
conda update -n base conda
conda install -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 pyamrex-cpu-mpich-dev -c conda-forge boost ccache cmake compilers git python numpy pandas scipy yt pkg-config make matplotlib mamba ninja mpich pip virtualenv
conda activate pyamrex-cpu-mpich-dev
# compile pyAMReX with -DAMReX_MPI=ON
# for pip, use: export AMREX_MPI=ON
conda create -n pyamrex-cpu-dev -c conda-forge boost ccache cmake compilers git python numpy pandas scipy yt pkg-config make matplotlib mamba ninja pip virtualenv
conda activate pyamrex-cpu-dev
# compile pyAMReX with -DAMReX_MPI=OFF
# for pip, use: export AMREX_MPI=OFF
For OpenMP support, you will further need:
conda install -c conda-forge libgomp
conda install -c conda-forge llvm-openmp
For Nvidia CUDA GPU support, you will need to have a recent CUDA driver installed or you can lower the CUDA version of the Nvidia cuda package and conda-forge to match your drivers and then add these packages:
conda install -c nvidia -c conda-forge cuda cupy
More info for CUDA-enabled ML packages.
Spack (Linux/macOS)
Spack is a user-level package manager. It is primarily written for Linux, with slightly less support for macOS, and future support for Windows.
Please see WarpX for now.
Brew (macOS/Linux)
Homebrew (Brew) is a user-level package manager primarily for Apple macOS, but also supports Linux.
brew update
brew tap openpmd/openpmd
brew install ccache
brew install cmake
brew install git
brew install libomp
brew unlink gcc
brew link --force libomp
brew install open-mpi
If you also want to compile with PSATD in RZ, you need to manually install BLAS++ and LAPACK++:
sudo mkdir -p /usr/local/bin/
sudo curl -L -o /usr/local/bin/cmake-easyinstall https://raw.githubusercontent.com/ax3l/cmake-easyinstall/main/cmake-easyinstall
sudo chmod a+x /usr/local/bin/cmake-easyinstall
cmake-easyinstall --prefix=/usr/local git+https://github.com/icl-utk-edu/blaspp.git \
-Duse_openmp=OFF -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON
cmake-easyinstall --prefix=/usr/local git+https://github.com/icl-utk-edu/lapackpp.git \
-Duse_cmake_find_lapack=ON -Dbuild_tests=OFF -DCMAKE_VERBOSE_MAKEFILE=ON
Compile pyAMReX with -DAMReX_MPI=ON
.
For pip
, use export AMREX_MPI=ON
.
APT (Debian/Ubuntu Linux)
The Advanced Package Tool (APT) is a system-level package manager on Debian-based Linux distributions, including Ubuntu.
sudo apt update
sudo apt install build-essential ccache cmake g++ git libhdf5-openmpi-dev libopenmpi-dev pkg-config python3 python3-matplotlib python3-numpy python3-pandas python3-pip python3-scipy python3-venv
# optional:
# for CUDA, either install
# https://developer.nvidia.com/cuda-downloads (preferred)
# or, if your Debian/Ubuntu is new enough, use the packages
# sudo apt install nvidia-cuda-dev libcub-dev
# compile pyAMReX with -DAMReX_MPI=ON
# for pip, use: export AMREX_MPI=ON
sudo apt update
sudo apt install build-essential ccache cmake g++ git libhdf5-dev pkg-config python3 python3-matplotlib python3-numpy python3-pandas python3-pip python3-scipy python3-venv
# optional:
# for CUDA, either install
# https://developer.nvidia.com/cuda-downloads (preferred)
# or, if your Debian/Ubuntu is new enough, use the packages
# sudo apt install nvidia-cuda-dev libcub-dev
# compile pyAMReX with -DAMReX_MPI=OFF
# for pip, use: export AMREX_MPI=OFF