Spack
Getting started
The official spack documentation can be found at https://spack.readthedocs.io/en/v0.21.1
In order to use Spack, you need to load the corresponding module first. The module name for each software stack that has a Spack module is listed below:
Software Stack | Module Name |
---|---|
SCC Modules (scc-lmod) | spack-user |
NHR Modules (nhr-lmod) | spack |
The HLRN Modules (hlrn-tmod) software stack doesn’t provide a Spack module.
Then, load it by
module load spack-user
module load spack
Please note: Some commands of Spack require extra shell functionality and you need to source the environment script. This will also be shown after you load the spack module:
source $SPACK_ROOT/share/spack/setup-env.sh
Now Spack is ready and you can use spack load
command to load necessary software or spack install SPEC
to install the software.
Loading software
You can find spack packages that are already installed using spack find
:
spack find py-numpy
You need to pick a specific version of those listed to load:
spack load py-numpy target=sapphirerapids
Installing software
In most cases, it is enough to know the package name to install the software. For instance, if you want to install zlib, then you can simply run the following command:
spack install zlib
In general, you need to provide a specification and dependencies for the command spack install
, where you can select versions, compiler, dependencies and variants.
To learn more about Spack specification, please visit Spack’s documentation.
Hardware Architectures
Since we have multiple CPU architectures, connection fabrics, and GPU architectures on the clusters; it can pay off to optimize your software for the architecture of the nodes it will run on.
For example, if you plan on running your software on a Cascadelake node, it can be accelerated by compiling it to use Cascadelake’s AVX512 instructions.
A package would be compiled by setting the target
in the spec to the desired CPU architecture like:
spack install gromacs target=cascadelake
The spack arch
command will print the full CPU and OS architecture/target of the node you are on (e.g. linux-rocky8-sapphirerapids
), and spack find
will show you what you have built for each architecture (architecture is in the headers).
The architecture/target is composed of the operating system (linux), the Linux distribution, and the CPU architecture.
Note that the architecture/target does not capture other important hardware features like the fabric (mainly MPI libraries and their dependencies) and CUDA architecture.
For CUDA, the cuda_arch
parameter should be set to the CUDA compute capability.
Make sure to install the software separately for every architecture you want it to run on from a node with that particular architecture. The easiest way to ensure you are on the right architecture is to start an interactive slurm job on the same partition (and same kind of node if a partition is mixed architecture) you want to use the software on. To learn more about Spack and how to install software you can go through its tutorial at https://spack-tutorial.readthedocs.io/en/latest/
Software installed as modules is already built for all targets separately.
The correct version is chosen automatically by module load
for the node it is running on.
This makes sure that the spack
or spack-user
module has right compilers and default configuration selected for the node.
Cross-compiling packages for a different CPU architectures than the node spack is running on is error prone when it is possible (some combinations are impossible) and should be avoided when possible.
The one exception to this is compiling packages for a compatible CPU with less features than the CPU on the node spack is running on (e.g. compiling for skylake_avx512
on a cascadelake
node), but even this requires care.
Also, cross-linux-distro builds (compiling for rocky8
on centos7
) are outright impossible with Spack.
The nodes currently supported for Spack and their architecture and partitions are given in the tables organized by cluster in the sections below.
Note that to reduce the total number of separate architectures, some are grouped together and rounded down to the lowest common denominator for CPU architectues and the minimum for CUDA architectue.
For example, the lowest common denominator of CPU architectures haswell
and broadwell
is haswell
, and CUDA architectures 70 and 75 is 70.
NHR
Nodes | CPU and OSArchitecture/Target | Fabric | cuda_arch | Partitions |
---|---|---|---|---|
Emmy Phase 1 | linux-centos7-skylake_avx512 | OPA | medium40*, large40* | |
Emmy Phase 2 | linux-centos7-cascadelake | OPA | standard96*, large96*, huge96* | |
Emmy Phase 3 | linux-rocky8-sapphirerapids | OPA | medium96s*, standard96s*, large96s*, and huge96s* | |
Grete Phase 1 (ggpu0X) | linux-rocky8-skylake_avx512 | IB | 70 | grete* except grete |
Grete Phase 2 (ggpu1XX, ggpu2XX) | linux-rocky8-zen2 | IB | 80 | grete* |
SCC
Nodes | CPU and OS Architecture/Target | Fabric | cuda_arch | Partitions |
---|---|---|---|---|
ampXXX | linux-scientific7-cascadelake | OPA | medium, int | |
dfaXXX, dsuXXX, gwdeXXX | linux-scientific7-haswell | medium, fat, fat+ | ||
agqXXX, agtXXX | linux-scientific7-cascadelake | OPA | 70 | gpu |
dgeXXX | linux-scientific7-broadwell | 52 | gpu, gpu-int, vis | |
dbnXX | linux-rocky8-zen3 | IB | cidbn | |
hhXXX | linux-rocky8-zen2 | RoCE | hh | |
saXXX | linux-rocky8-haswell | RoCE | sa | |
sgizXXX | linux-scientific7-skylake_avx512 | IB | int, sgiz |
The lowest common denominators by partition are
Partition | CPU and OS Architecture/Target | Fabric | cuda_arch |
---|---|---|---|
medium | linux-scientific7-haswell | OPA or nothing | |
fat | linux-scientific7-haswell | ||
fat+ | linux-scientific7-haswell | ||
int | linux-scientific7-skylake_avx512 | OPA or IB | |
gpu | linux-scientific7-broadwell | OPA or nothing | 61 |
gpu-int | linux-scientific7-broadwell | 52 | |
vis | linux-scientific7-broadwell | 52 | |
hh | linux-rocky8-zen2 | RoCE | |
sa | linux-rocky8-haswell | RoCE | |
sgiz | linux-scientific7-skylake_avx512 | IB |