Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doku:spack [2021/08/26 07:02]
mhickel
doku:spack [2023/05/17 15:26] (current)
msiegel
Line 1: Line 1:
-== Finding Packages ==+===== SPACK - a package manager for HPC systems =====
  
-Most software on VSC4 is installed via spack, to list available software packages use:+[[https://spack.readthedocs.io/en/latest/basic_usage.html|Official documentation of SPACK]] 
 + 
 + 
 +==== 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.: 
 + 
 +<code> 
 +zen [user@l51 ~]$ 
 +</code> 
 + 
 +Read more at: 
 + 
 +[[doku:spack-transition | Transition to new SPACK without Environments]] 
 + 
 + 
 +==== List available packages ==== 
 + 
 +Most software on VSC4/5 is installed via spack, to list available software packages use:
  
 <code> <code>
Line 7: Line 33:
 </code> </code>
  
-List all available packages compiled with a specific compiler (gcc 9.1.0 in this example):+List all available packages compiled with a specific compiler:
  
 <code> <code>
-spack find %gcc@9.1.0+spack find %gcc@12.2.0 
 +</code> 
 + 
 +List specific installed software packages use: 
 + 
 +<code> 
 +spack find openmpi
 </code> </code>
  
Line 16: Line 48:
  
 <code> <code>
-spack find openmpi@4.1.0+spack find openmpi@4.1.4
 </code> </code>
  
Line 22: Line 54:
  
 <code> <code>
-spack find openmpi@4.1.0%gcc@9.1.0+spack find openmpi@4.1.4%gcc@12.2.0
 </code> </code>
  
 +The detail level of information can be specified with the following options:
 +
 +<code>
 +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
 +</code>
 +
 +The latter lists all dependencies of the package.
 +
 +**Dependencies**: dependencies of software packages can be specified with a ''^''.
 +e.g.: 
 +<code>
 +spack find -lvd py-scipy %intel@19.0.5.281 ^python@3.7.4 ^intel-mkl
 +</code>
 +
 +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:
 +<code>
 +spack find --loaded
 +</code>
 +
 +==== Load modules ====
 +
 +The ''spack'' command can be used to load software modules. The general form is:
 +<code>
 +spack load <package>
 +</code>
 +''package'' has to be a uniquely defined software package where all dependencies have been resolved, e.g.:
 +
 +<code>
 +spack load openmpi@4.1.4%gcc@12.2.0
 +</code>
 +
 +This will load the corresponding module, even if ''module list'' will not show anything!
 +<code>
 +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
 +</code>
 +
 +and is equivalent to loading the module as:
 +
 +<code>
 +module load openmpi/4.1.4-gcc-12.2.0-2vqdnay
 +</code>
 +
 +
 +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:
 +
 +<code>
 +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
 +
 +</code>
 +
 +The hash ''2vqdnay'' uniquely identifies the package and can also be used to load the software module:
 +
 +<code>
 +spack load /2vqdnay
 +</code>
 +
 +Unload all currently loaded packages:
 +<code>
 +spack unload --all
 +</code>
  
  • doku/spack.1629961367.txt.gz
  • Last modified: 2021/08/26 07:02
  • by mhickel