This is an old revision of the document!
SPACK - a package manager for HPC systems
New SPACK without environments
Having worked with spack environments for some time, we have encountered several severe issues which have convinced us that we need to find a more practical way of maintaining software packages at VSC.
There are now three separate spack installation trees corresponding to the CPU/GPU architectures on VSC:
- skylake - Intel CPUs; works on Intel Skylake and Cascadelake CPUs
- zen - AMD CPUs; works on Zen 2 and 3 CPUs
- cuda-zen - AMD CPUs + NVIDIA GPUs; works on all nodes equipped with graphics cards
By default the spack installation tree suitable for the current compute/login node is activated and will be indicated by a prefix on the command line, e.g.:
zen [user@l51 ~]$
Read more at:
List available packages
Most software on VSC4/5 is installed via spack, to list available software packages use:
spack find
List all available packages compiled with a specific compiler:
spack find %gcc@12.2.0
List specific installed software packages use:
spack find openmpi
A specific version can be requested as well:
spack find openmpi@4.1.4
List a specific version compiled with a specific compiler:
spack find openmpi@4.1.4%gcc@12.2.0
The detail level of information can be specified with the following options:
spack find -l openmpi@4.1.4%gcc@12.2.0 spack find -lv openmpi@4.1.4%gcc@12.2.0 spack find -lvd openmpi@4.1.4%gcc@12.2.0
The latter lists all dependencies of the package.
Dependencies: dependencies of software packages can be specified with a ^
.
e.g.:
spack find -lvd py-scipy %intel@19.0.5.281 ^python@3.7.4 ^intel-mkl
This will list all available versions of py-scipy
which have been built with python@3.7.4
and any version of intel-mkl
.
List all currently loaded packages:
spack find --loaded
Load modules
The spack
command can be used to load software modules. The general form is:
spack load <package>
package
has to be a uniquely defined software package where all dependencies have been resolved, e.g.:
spack load openmpi@4.1.4%gcc@12.2.0
This will load the corresponding module, even if module list
will not show anything!
zen xyz@l51:~$ spack load openmpi@4.1.4%gcc@12.2.0 arch=linux-almalinux8-zen3 /2vqdnay zen xyz@l51:~$ module list No Modulefiles Currently Loaded. zen xyz@l51:~$ spack find --loaded -- linux-almalinux8-zen3 / gcc@12.2.0 --------------------------- autoconf@2.69 curl@7.85.0 hwloc@2.8.0 libgpg-error@1.46 m4@1.4.19 openssh@9.1p1 py-setuptools@65.5.0 util-linux-uuid@2.38.1 autoconf-archive@2022.02.11 diffutils@3.8 json-c@0.16 libiconv@1.16 meson@0.63.3 openssl@1.1.1s py-wheel@0.37.1 util-macros@1.19.3 automake@1.16.5 expat@2.4.8 krb5@1.19.3 libmd@1.0.4 mpfr@4.1.0 pcre2@10.39 python@3.9.15 xz@5.2.7 berkeley-db@18.1.40 gawk@5.1.1 libbsd@0.11.5 libpciaccess@0.16 munge@0.5.15 perl@5.36.0 readline@8.1.2 zlib@1.2.13 bison@3.8.2 gdbm@1.23 libedit@3.1-20210216 libsigsegv@2.13 ncurses@6.3 pigz@2.7 slurm@22.05.2.1 zstd@1.5.2 bzip2@1.0.8 gettext@0.21.1 libevent@2.1.12 libtool@2.4.7 ninja@1.11.1 pkgconf@1.8.0 sqlite@3.39.4 ca-certificates-mozilla@2022-10-11 glib@2.74.1 libffi@3.4.2 libxml2@2.10.1 numactl@2.0.14 pmix@4.1.2 tar@1.34 cmake@3.24.3 gmp@6.2.1 libgcrypt@1.10.1 lz4@1.9.4 openmpi@4.1.4 py-pip@22.2.2 texinfo@6.5 ==> 61 loaded packages
and is equivalent to loading the module as:
module load openmpi/4.1.4-gcc-12.2.0-2vqdnay
Alternatively a package can be loaded by using the unique hash of a package.
The option -l
will display the short hash of a package:
zen xyz@l51:~$ spack find -l openmpi@4.1.4%gcc@12.2.0 -- linux-almalinux8-zen3 / gcc@12.2.0 --------------------------- 2vqdnay openmpi@4.1.4 ==> 1 installed package
The hash 2vqdnay
uniquely identifies the package and can also be used to load the software module:
spack load /2vqdnay
Unload all currently loaded packages:
spack unload --all