Spack on Discovery
Spack is available on Discovery. As a user, you have read-only permission. This means that you are unable to install, uninstall and create packages.
You can only explore the available and installed packages. Discovery has different versions of Spack such as 0.13
and 0.16
. Those versions are located in /software/spack
.
To use a specific version of Spack you need to add it to your path. This can be accomplished by either:
-
Sourcing Spack setup script file of the desired version stored in
/software/spack
as follows:
source /software/spack/spack-{version}-env.sh
By sourcing this file, you make sure that all the cached files are removed and you can switch to that version with no issues. |
For example, to use 0.16
version, you type:
source /software/spack/spack-0.16-env.sh
-
Or, sourcing the
setup-env.sh
file of the intended version. This file is stored inshare/spack
of the directory of the version. The version directories are located in/software/spack
. For example, to use0.13
version, you type:
source /software/spack/0.13/share/spack/setup-env.sh
Then, you will be able to use Spack. Remember that you have read permission only. Therefore, you can list available packages using spack list
command.
Also, you can show the installed packages using spack find
command.
Which Version to Source
As stated above, there are different versions of Spack available on discovery. Suppose that you want to look at the spec of a specific software. Which version to source to get the spec of a that software?
First, you need to know which version was used to install the software by typing:
module avail
This will show all installed modules and where are they located. The following output shows that autoconf
module is available
and was installed using the version 0.16
of Spack (/software/spack/0.16/share/spack/modules/linux-centos7-x86_64
):
------------- /software/spack/0.16/share/spack/modules/linux-centos7-x86_64 --------------
autoconf/2.69-gcc-9.3.0-w2inowk
automake/1.16.2-gcc-9.3.0-gkuni3x
basilisk/latest-gcc-9.3.0-openmpi-ohisosv
...
To look at the spec of autoconf
, you need to source the 0.16
version as you learned in the previous section.
source /software/spack/spack-0.16-env.sh
Then, you need to know the hash of the module. You can see from the previous output that the hash of a module is the last part
that comes after the last -
. For autoconf
, autoconf/2.69-gcc-9.3.0-w2inowk
, the hash is w2inow
.
Now you can show the spec of autoconf
, you type:
spack spec /w2inowk
Output:
Input spec
--------------------------------
autoconf@2.69%gcc@9.3.0 arch=linux-centos7-x86_64
^m4@1.4.18%gcc@9.3.0+sigsegv patches=3877ab548f88597ab2327a2230ee048d2d07ace1062efe81fc92e91b7f39cd00,fc9b61654a3ba1a8d6cd78ce087e7c96366c290bc8d2c299f09828d793b853c8 arch=linux-centos7-x86_64
^libsigsegv@2.12%gcc@9.3.0 arch=linux-centos7-x86_64
^perl@5.32.0%gcc@9.3.0+cpanm+shared+threads arch=linux-centos7-x86_64
^berkeley-db@18.1.40%gcc@9.3.0 arch=linux-centos7-x86_64
^gdbm@1.18.1%gcc@9.3.0 arch=linux-centos7-x86_64
^readline@8.0%gcc@9.3.0 arch=linux-centos7-x86_64
^ncurses@6.2%gcc@9.3.0~symlinks+termlib arch=linux-centos7-x86_64
Concretized
--------------------------------
autoconf@2.69%gcc@9.3.0 arch=linux-centos7-x86_64
^m4@1.4.18%gcc@9.3.0+sigsegv patches=3877ab548f88597ab2327a2230ee048d2d07ace1062efe81fc92e91b7f39cd00,fc9b61654a3ba1a8d6cd78ce087e7c96366c290bc8d2c299f09828d793b853c8 arch=linux-centos7-x86_64
^libsigsegv@2.12%gcc@9.3.0 arch=linux-centos7-x86_64
^perl@5.32.0%gcc@9.3.0+cpanm+shared+threads arch=linux-centos7-x86_64
^berkeley-db@18.1.40%gcc@9.3.0 arch=linux-centos7-x86_64
^gdbm@1.18.1%gcc@9.3.0 arch=linux-centos7-x86_64
^readline@8.0%gcc@9.3.0 arch=linux-centos7-x86_64
^ncurses@6.2%gcc@9.3.0~symlinks+termlib arch=linux-centos7-x86_64
Discovery has a package repository called repo-nmsu stored in /software/spack . This repository has
some package recipes that neither are in the default repository nor required some customizations.
|