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 --allMake sure to module load the packages you want Spack to find (or set other environment variables like PATH)
before running spack external find --all.
Some 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 curlDepending on the number of available cores on your platform, you can specify number of parallel build
processes to be used during the build of spec using -j option to spack (e.g., -j16).
One 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 manually from source (without using Spack to build THAPI):
spack build-env thapi bashThis will spawn a new shell with the correct environment variables and dependencies set for building THAPI manually. This is useful when building THAPI for your own development work.
- THAPI Spack package (and some of its dependencies) is known to run into build failures with NVHPC SDK (available on ALCF Polaris for example). Please make sure to use GNU programming environment whenever possible.
- Users have noticed
spackprocesses getting killed (due to timeout) on login nodes on both ALCF Aurora and Polaris. Use a compute node whenever possible.
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