This repository provides a Spack environment for installing and managing THAPI.
✍️Note: This guide assumes spack is installed and available in your PATH. If it is not, see How to Install Spack.
# Clone the THAPI-spack repository and add it as a Spack repo
git clone https://github.com/argonne-lcf/THAPI-spack
spack repo add ./THAPI-spack/
# Install THAPI
spack install thapiOnce installed, you can load THAPI with:
spack load thapispack external find can be used to find existing packages on the system known to Spack. This way you can
avoid building them when building THAPI. Use the following command before installing THAPI to find external
packages available on the system:
spack external find --allSome packages when found using spack external find are known to cause build failures. If you run into such
cases, use spack external find --exclude <pkg> so that Spack will build them instead of using the system
installed versions. For example:
spack external find --all --exclude bzip2 --exclude xz --exclude curlOne may also be able to reduce the time to install THAPI by using --concurrent-packages option in spack install
as below:
spack install --concurrent-packages 2 thapiDepending on the available number of CPU cores and how parallelizable the dependency graph is for the particular
specification, one may be able to specify more concurrent packages (as compared to 2 in the above example).
You can use Spack to install the required dependencies and set up the environment to build THAPI from source:
spack build-env thapi bashThis will spawn a new shell with the correct environment variables set for building THAPI manually.
develop, which is unstable. To ensure a reliable installation,
use the latest release of Spack.
To install spack:
git clone -c feature.manyFiles=true -b releases/latest https://github.com/spack/spack.git
. spack/share/spack/setup-env.sh