Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Most importantly, Spack is simple. It offers a simple spec syntax so that users can specify versions and configuration options concisely. Spack is also simple for package authors: package files are written in pure Python, and specs allow package authors to maintain a single file for many different builds of the same package.


How can I built my own python software stack using SPACK

Download  SPACK to your home directory (If using another directory, replace $HOME)

Code Block
languagebash
titleDownload and install from github
git clone https://github.com/spack/spack


Code Block
languagebash
titleTo use system spack as an upstream install
cd ${HOME}/spack
git checkout releases/v0.16
cp /share/Apps/usr/etc/spack/* ${HOME}/spack/etc/spack

Default target is x86_64. To build applications optimized for underlying cpu replace x86_64 on line 97 of packages.yaml with

  • ivybridge for Ivybridge nodes i.e. debug partition (will run on all partitions)
  • haswell for Haswell and Broadwell nodes i.e lts, im1080, eng, and engc partitions (will not run on debug partition)
  • skylake_avx512 for Skylake and Cascade lake nodes only i.e. enge, im2080, health, chem, hawcpu, hawkgpu, hawkmem and infolab partitions


Code Block
languagebash
titleAdd spack to your environment by sourcing the setup-env.sh (add to your .bashrc to always have spack in your path)
source ${HOME}/spack/share/spack/setup-env.sh


Code Block
languagebash
titleAdd compilers to spack
spack compiler add

  

Code Block
languagebash
titleFind an installed package e.g. numpy
spack find py-numpy

All python (r) packages have py- (r-) prefix


Code Block
languagebash
titleInstall a package, for e.g. JupyterLab
spack install py-jupyterlab


Code Block
languagebash
titleIf you want the spack built packages to be available for use with module command, modify the module path as follows
export MODULEPATH=${HOME}/spack/share/spack/modules/linux-centos8-x86_64:${MODULEPATH}


Click here to search for packages that can be built with SPACK.