Use SPack on Minerva

SPack is a package manager that provides a “modules” interface, able to handle multiple versions, dependencies, and build environments. It can be used together with, or as a replacement for, the old modules environment that has been used for a long time.

To use the latest SPack repository on Minerva (there are some older /home/SPACK* left), you must source a config file:

. /home/SPACK2021/share/spack/setup-env.sh

After that, you may use spack help. Most important commands I use:

You will have to make yourself familiar with the special characters used:

To load the o2x4itb hdf5@1.8.19~cxx~debug~fortran~hl+mpi+pic+shared~szip~threadsafe built with %gcc@7.3.0 you saw listed with the last find command, you may choose from the following options:

In general, spack load is slow, and prone to ambiguity errors. Use module list -t to identify such situations, and get the names of loaded modules one-per-line. Package dependencies are now resolved automatically (even if not invoked with -r).

IMPORTANT: The /home/SPACK2021/ tree is read-only (and there are no means yet to make it collaborative). Therefore spack install will not work for you! If you need a package that hasn't been installed yet, ask me (Steffen), if possible keep the right options (variants, includes) at hand!

(To be extended.)