Run using spack

Spack is a package management tool which fetches, builds and installs multiple versions and configurations of the dependencies that phgasnets need in isolated environments.

A spack.yaml configuration file is included with the project containing the dependencies required.

Prerequisites:

  • Git for cloning repositories

  1. Clone the phgasnets repository and spack repository within.

git clone https://github.com/mpimd-csc/phgasnets.git
cd phgasnets

git clone --depth 1 https://github.com/spack/spack.git .spack
  1. Create, activate spack environment from within the project directory,

.spack/bin/spack env create phgasnets
eval "$(./.spack/bin/spack env activate --sh -p .)"
.spack/bin/spack install

This command should technically parse spack.yaml and install the C++ and Python dependencies required.

  1. Build phgasnets,

cmake -B build -S .
cmake --build build --parallel

Since you are in the spack environment, CMake should find all the right dependencies.

  1. Run the demos

./RUNME.sh

Tip

You can deactivate the spack environment using the following command:

eval "$(./.spack/bin/spack env deactivate --sh)"