.. seealso:: You will need to understand how to use `the terminal <http://www.ks.uiuc.edu/Training/Tutorials/Reference/unixprimer.html>`_, what are `environment variables <https://unix.stackexchange.com/questions/44990/what-is-the-difference-between-path-and-ld-library-path/45106#45106>`_ and please read our :ref:`compiling introduction <install-source>`.
Note
If you are a scientific user at a supercomputing facility we might have already prepared a software setup for you. See the :ref:`following chapter <install-profile>` if you can skip this step fully or in part by loading existing modules on those systems.
.. sectionauthor:: Axel Huebl, Klaus Steiniger, Sergei Bastrakov
Overview of inter-library dependencies for parallel execution of PIConGPU on a typical HPC system. Due to common binary incompatibilities between compilers, MPI and boost versions, we recommend to organize software with a version-aware package manager such as spack and to deploy a hierarchical module system such as lmod. An Lmod example setup can be found here.
- C++17 supporting compiler, e.g. GCC 7+ or Clang 6+
- if you want to build for Nvidia GPUs, check the CUDA supported compilers page
- note: be sure to build all libraries/dependencies with the same compiler version
- Debian/Ubuntu:
sudo apt-get install gcc-8 g++-8 build-essential
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-8
- Arch Linux:
sudo pacman --sync base-devel
- if the installed version of gcc is too new, compile an older gcc
- Spack:
spack install gcc@8.5.0
- make it the default in your packages.yaml or suffix all following
spack install
commands with a space and%gcc@8.5.0
- 3.18.0 or higher
- Debian/Ubuntu:
sudo apt-get install cmake file cmake-curses-gui
- Arch Linux:
sudo pacman --sync cmake
- Spack:
spack install cmake
- OpenMPI 1.7+ / MVAPICH2 1.8+ or similar
- for running on Nvidia GPUs, perform a GPU aware MPI install after installing CUDA
- Debian/Ubuntu:
sudo apt-get install libopenmpi-dev
- Arch Linux:
sudo pacman --sync openmpi
- Spack:
- GPU support:
spack install openmpi+cuda
- CPU only:
spack install openmpi
- GPU support:
- environment:
export MPI_ROOT=<MPI_INSTALL>
- as long as CUDA awareness (
openmpi+cuda
) is missing:export OMPI_MCA_mpi_leave_pinned=0
- 1.74.0+ (
program_options
,filesystem
,system
,math
,serialization
and header-only libs) - Debian/Ubuntu:
sudo apt-get install libboost-program-options-dev libboost-filesystem-dev libboost-system-dev libboost-math-dev libboost-serialization-dev
- Arch Linux:
sudo pacman --sync boost
- Spack:
spack install boost
- from source:
mkdir -p ~/src ~/lib
cd ~/src
curl -Lo boost_1_74_0.tar.gz https://boostorg.jfrog.io/artifactory/main/release/1.74.0/source/boost_1_74_0.tar.gz
tar -xzf boost_1_74_0.tar.gz
cd boost_1_74_0
./bootstrap.sh --with-libraries=filesystem,math,program_options,serialization,system --prefix=$HOME/lib/boost
./b2 cxxflags="-std=c++17" -j4 && ./b2 install
- environment: (assumes install from source in
$HOME/lib/boost
)export BOOST_ROOT=$HOME/lib/boost
export LD_LIBRARY_PATH=$BOOST_ROOT/lib:$LD_LIBRARY_PATH
- not required for the code, but for our workflows
- 1.7.9.5 or higher
- Debian/Ubuntu:
sudo apt-get install git
- Arch Linux:
sudo pacman --sync git
- Spack:
spack install git
- not required for the code, but for our workflows
- Debian/Ubuntu:
sudo apt-get install rsync
- Arch Linux:
sudo pacman --sync rsync
- Spack:
spack install rsync
- alpaka is included in the PIConGPU source code
- cupla is included in the PIConGPU source code
- only required for CUDA and HIP backends
- mallocMC is included in the PIConGPU source code
git clone https://github.com/ComputationalRadiationPhysics/picongpu.git $HOME/src/picongpu
- optional: update the source code with
cd $HOME/src/picongpu && git fetch && git pull
- optional: change to a different branch with
git branch
(show) andgit checkout <BranchName>
(switch)
- optional: update the source code with
- environment:
export PICSRC=$HOME/src/picongpu
export PIC_EXAMPLES=$PICSRC/share/picongpu/examples
export PATH=$PATH:$PICSRC
export PATH=$PATH:$PICSRC/bin
export PATH=$PATH:$PICSRC/src/tools/bin
export PYTHONPATH=$PICSRC/lib/python:$PYTHONPATH
- 11.0.0+
- required if you want to run on Nvidia GPUs
- Debian/Ubuntu:
sudo apt-get install nvidia-cuda-toolkit
- Arch Linux:
sudo pacman --sync cuda
- Spack:
spack install cuda
- at least one CUDA capable GPU
- compute capability:
sm_60
or higher - full list of CUDA GPUs and their compute capability
- More is always better. Especially, if we are talking GPUs :-)
- environment:
export CUDA_ROOT=<CUDA_INSTALL>
If you do not install the following libraries, you will not have the full amount of PIConGPU plugins. We recommend to install at least pngwriter and openPMD.
- 1.2.9+ (requires zlib)
- Debian/Ubuntu dependencies:
sudo apt-get install libpng-dev
- Arch Linux dependencies:
sudo pacman --sync libpng
- Spack:
spack install libpng
- from source:
mkdir -p ~/src ~/lib
cd ~/src
curl -Lo libpng-1.6.34.tar.gz ftp://ftp-osl.osuosl.org/pub/libpng/src/libpng16/libpng-1.6.34.tar.gz
tar -xf libpng-1.6.34.tar.gz
cd libpng-1.6.34
CPPFLAGS=-I$HOME/lib/zlib/include LDFLAGS=-L$HOME/lib/zlib/lib ./configure --enable-static --enable-shared --prefix=$HOME/lib/libpng
make
make install
- environment: (assumes install from source in
$HOME/lib/libpng
)export PNG_ROOT=$HOME/lib/libpng
export CMAKE_PREFIX_PATH=$PNG_ROOT:$CMAKE_PREFIX_PATH
export LD_LIBRARY_PATH=$PNG_ROOT/lib:$LD_LIBRARY_PATH
- 0.7.0+ (requires libpng, zlib, and optional freetype)
- Spack:
spack install pngwriter
- from source:
mkdir -p ~/src ~/lib
git clone -b 0.7.0 https://github.com/pngwriter/pngwriter.git ~/src/pngwriter/
cd ~/src/pngwriter
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/lib/pngwriter ..
make install
- environment: (assumes install from source in
$HOME/lib/pngwriter
)export CMAKE_PREFIX_PATH=$HOME/lib/pngwriter:$CMAKE_PREFIX_PATH
export LD_LIBRARY_PATH=$HOME/lib/pngwriter/lib:$LD_LIBRARY_PATH
- optional, but strongly recommended as most PIConGPU output requires it
- 0.14.3+
- Spack:
spack install openpmd-api
- For usage in PIConGPU, the openPMD API must have been built either with support for ADIOS2 or HDF5 (or both).
When building the openPMD API from source (described below), these dependencies must be built and installed first.
- For ADIOS2, CMake build instructions can be found in the official documentation.
Besides compression, the default configuration should generally be sufficient, the
CMAKE_INSTALL_PREFIX
should be set to a fitting location. Compression withc-blosc
is described below. - For HDF5, CMake build instructions can be found in the official documentation.
The parameters
-DHDF5_BUILD_CPP_LIB=OFF -DHDF5_ENABLE_PARALLEL=ON
are required, theCMAKE_INSTALL_PREFIX
should be set to a fitting location.
- For ADIOS2, CMake build instructions can be found in the official documentation.
Besides compression, the default configuration should generally be sufficient, the
- from source:
mkdir -p ~/src ~/lib
git clone -b 0.14.4 https://github.com/openPMD/openPMD-api.git ~/src/openPMD-api
cd ~/src/openPMD-api
mkdir build && cd build
cmake .. -DopenPMD_USE_MPI=ON -DCMAKE_INSTALL_PREFIX=~/lib/openPMD-api
Optionally, specify the parameters-DopenPMD_USE_ADIOS2=ON -DopenPMD_USE_HDF5=ON
. Otherwise, these parameters are set toON
automatically if CMake detects the dependencies on your system.make -j $(nproc) install
- environment:* (assumes install from source in
$HOME/lib/openPMD-api
)export CMAKE_PREFIX_PATH="$HOME/lib/openPMD-api:$CMAKE_PREFIX_PATH"
export LD_LIBRARY_PATH="$HOME/lib/openPMD-api/lib64:$HOME/lib/openPMD-api/lib:$LD_LIBRARY_PATH"
- If PIConGPU is built with openPMD output enabled, the JSON library
nlohmann_json will automatically be used, found in the
thirdParty/
directory. By setting the CMake parameterPIC_nlohmann_json_PROVIDER=extern
, CMake can be instructed to search for an installation of nlohmann_json externally. Refer to LICENSE.md for further information.
- not a direct dependency of PIConGPU, but an optional dependency for openPMD API with ADIOS2; installation is described here since it is lacking in documentation elsewhere
- general purpose compressor, used in ADIOS2 for in situ data reduction
- Debian/Ubuntu:
sudo apt-get install libblosc-dev
- Arch Linux:
sudo pacman --sync blosc
- Spack:
spack install c-blosc
- from source:
mkdir -p ~/src ~/lib
git clone -b v1.21.1 https://github.com/Blosc/c-blosc.git ~/src/c-blosc/
cd ~/src/c-blosc
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/lib/c-blosc -DPREFER_EXTERNAL_ZLIB=ON ..
make install
- environment: (assumes install from source in
$HOME/lib/c-blosc
)export BLOSC_ROOT=$HOME/lib/c-blosc
export CMAKE_PREFIX_PATH=$BLOSC_ROOT:$CMAKE_PREFIX_PATH
export LD_LIBRARY_PATH=$BLOSC_ROOT/lib:$LD_LIBRARY_PATH
- 1.4.0+
- requires boost (header only), IceT, Jansson, libjpeg (preferably libjpeg-turbo), libwebsockets (only for the ISAAC server, but not the plugin itself)
- enables live in situ visualization, see more here Plugin description
- Spack:
spack install isaac
- from source: build the in situ library and its dependencies as described in ISAAC's INSTALL.md
- environment: set environment variable
CMAKE_PREFIX_PATH
for each dependency and the ISAAC in situ library
- for developers: performance tracing support
- download 5.14.4 or higher, e.g. from www.tu-dresden.de
- from source:
mkdir -p ~/src ~/build ~/lib
cd ~/src
curl -Lo VampirTrace-5.14.4.tar.gz "http://wwwpub.zih.tu-dresden.de/~mlieber/dcount/dcount.php?package=vampirtrace&get=VampirTrace-5.14.4.tar.gz"
tar -xzf VampirTrace-5.14.4.tar.gz
cd VampirTrace-5.14.4
./configure --prefix=$HOME/lib/vampirtrace --with-cuda-dir=<CUDA_ROOT>
make all -j
make install
- environment: (assumes install from source in
$HOME/lib/vampirtrace
)export VT_ROOT=$HOME/lib/vampirtrace
export PATH=$VT_ROOT/bin:$PATH