See also

You will need to understand how to use the terminal.

Warning

Our spack package is still in beta state and is continuously improved. Please feel free to report any issues that you might encounter.

Spack

Section author: Axel Huebl

Preparation

First install spack itself via:

# get spack
git clone https://github.com/spack/spack.git $HOME/src/spack

# build spack's dependencies via spack :)
$HOME/src/spack/bin/spack bootstrap

# activate the spack environment
source $HOME/src/spack/share/spack/setup-env.sh

# install a supported compiler
spack compiler list | grep -q gcc@7.3.0 && spack install gcc@7.3.0 && spack load gcc@7.3.0 && spack compiler add

# add the PIConGPU repository
git clone https://github.com/ComputationalRadiationPhysics/spack-repo.git $HOME/src/spack-repo
spack repo add $HOME/src/spack-repo

Note

When you next time open a terminal or log back into the machine, make sure to activate the spack environment again via:

source $HOME/src/spack/share/spack/setup-env.sh

Install

The installation of the latest version of PIConGPU is now as easy as:

spack install picongpu %gcc@7.3.0

Use PIConGPU

PIConGPU can now be loaded with

spack load picongpu

For more information on variants of the picongpu package in spack run spack info picongpu and refer to the official spack documentation.

Note

PIConGPU can also run without a GPU! For example for our OpenMP backend, just specify the backend with backend=omp2b for the two commands above:

spack install picongpu backend=omp2b
spack load picongpu backend=omp2b

Note

If the install fails or you want to compile for CUDA 8.0, try using GCC 5.3.0:

spack compiler list | grep gcc@5.3.0 | spack install gcc@5.3.0 && spack load gcc@5.3.0 && spack compiler add
spack install picongpu %gcc@5.3.0
spack load picongpu %gcc@5.3.0

If the install fails or you want to compile for CUDA 9.0/9.1, try using GCC 5.5.0:

spack compiler list | grep gcc@5.5.0 | spack install gcc@5.5.0 && spack load gcc@5.5.0 && spack compiler add
spack install picongpu %gcc@5.5.0
spack load picongpu %gcc@5.5.0